Skip to content

Instantly share code, notes, and snippets.

@andrius-preimantas
Created December 4, 2015 13:31
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save andrius-preimantas/d0ce3f3993fafdbbb840 to your computer and use it in GitHub Desktop.
Save andrius-preimantas/d0ce3f3993fafdbbb840 to your computer and use it in GitHub Desktop.
Odoo server action to recompute stored fields
# Recompute amount_total for account.invoice
env.add_todo(model._fields['amount_total'], object)
model.recompute()
# where
# object - recordset of instances to recompute field for
# model - recordset instances model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment