Skip to content

Instantly share code, notes, and snippets.

@nvn-odoo
nvn-odoo / odoo_upgrade_request.sh
Created July 19, 2019 11:29 — forked from olilau/odoo_upgrade_request.sh
Creates an Odoo upgrade request and uploads the database dump using SFTP.
#!/bin/bash
set -e
command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed. Aborting."; exit 1; }
command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; }
MAX_CMD_TRIES=100
BASE_WORK_DIR=${HOME}/odoo_upgrade_request
quants = env['stock.quant'].search([])
move_line_ids = []
warning = ''
for quant in quants:
move_lines = env["stock.move.line"].search([
('product_id', '=', quant.product_id.id),
('location_id', '=', quant.location_id.id),
('lot_id', '=', quant.lot_id.id),
('package_id', '=', quant.package_id.id),
('owner_id', '=', quant.owner_id.id),
quants = env['stock.quant'].search([])
move_line_ids = []
warning = ''
for quant in quants:
move_lines = env["stock.move.line"].search([
('product_id', '=', quant.product_id.id),
('location_id', '=', quant.location_id.id),
('lot_id', '=', quant.lot_id.id),
('package_id', '=', quant.package_id.id),
@nvn-odoo
nvn-odoo / odoo_download_with_sftp.sh
Created April 24, 2020 17:47 — forked from olilau/odoo_download_with_sftp.sh
Download an upgraded Odoo database using SFTP.
#!/bin/bash
set -e
command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed. Aborting."; exit 1; }
command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; }
# REQUIRED PARAMETERS:
REQUEST_ID="17654"
KEY="0zWIetJPo7kIWSxVWKUDTQ=="
@nvn-odoo
nvn-odoo / odoo_upgrade.sh
Created April 24, 2020 17:48 — forked from olilau/odoo_upgrade.sh
Upload your database on upgrade.odoo.com
#!/bin/bash
set -e
command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed. Aborting."; exit 1; }
command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; }
MAX_CMD_TRIES=100
BASE_WORK_DIR=${HOME}/odoo_upgrade