summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorRémi Rahir <rar@odoo.com>2020-07-17 10:25:39 +0000
committerRémi Rahir <rar@odoo.com>2020-07-23 09:21:18 +0000
commit3d08f7d4c87fe83d1aae8cf3d9107bbfadf850bc (patch)
treedc271b0bc23d0cfed88b1c6bb8d34bf59d3f621c /addons/web/static/src/js/fields/basic_fields.js
parentb8df9444162302494d61722af2502139cf5179ce (diff)
[FIX] sale_timesheet: correctly trigger compute
Revision fad3ed7ce4828275e92e8f748dbb7cdc4156fb57 introduced a forced recompute of `billable_type` which unfortunately has repercutions (compute triggers) upon every single task of a project, meaning that it will not scale properly as the number of tasks grows and it is now called everytime we want to access a project view form whch is a terrible performance drop. The underlying issue that it tried to address was that the field billable_type was not correctly computed when deleting the linked sale_order_id from the project. This happens because when deleting a record, it is PSQL that sets relational m2o value (in this cas sale_order_id to NULL and the ORM has no way to catch that information. A proper fix consists to change the dependency of the computed field from the m2o to one of its fields. This will properly mark 'billable_type' to be recomputed when unlinking the sale order. Note that to avoid useless recomputation which would lead to the sale result, we rely on a filed that should not change once the sale order is created. closes odoo/odoo#54817 X-original-commit: 4f2b532c3ef4ebd9beb2a448f59c4e645ba1e8a1 Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions