Skip to content

Instantly share code, notes, and snippets.

View SButko's full-sized avatar

Silvija Butko SButko

View GitHub Profile
@SButko
SButko / odoo_upgrade_request.sh
Created October 1, 2021 09:40 — forked from olilau/odoo_upgrade_request.sh
Creates an Odoo upgrade request and uploads the database dump using SFTP.
#!/bin/bash
set -e
VERSION="0.3"
MAX_CMD_TRIES=30
MAX_SFTP_TRIES=100
# check sftp has the "put -a" command:
if man sftp | grep ' put.*local-path.*remote-path' | grep -q afPpr ;
@SButko
SButko / recompute_odoo_field
Created August 10, 2018 20:17 — forked from oerp-odoo/recompute_odoo_field.py
Recompute Odoo field from shell
# python3 odoo-bin shell -c odoo.conf -d <database>
model = env['some.model']
env.add_todo(model._fields['field_name'], model.search([]))
model.recompute()
env.cr.commit()