Skip to content

Instantly share code, notes, and snippets.

@oerp-odoo
Last active August 11, 2018 11:36
Show Gist options
  • Save oerp-odoo/751742ec2a291e2ad3d6b3dc0ff5ce4a to your computer and use it in GitHub Desktop.
Save oerp-odoo/751742ec2a291e2ad3d6b3dc0ff5ce4a to your computer and use it in GitHub Desktop.
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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment