summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorWilliam Henrotin <whe@odoo.com>2020-04-01 11:38:17 +0000
committerArnold Moyaux <arm@odoo.com>2020-06-18 11:35:38 +0000
commitf979e3e093409fb043ed83b5d6764c272096c923 (patch)
tree36e2d83c9a929cad83e729179c27b118d4de3770 /addons/web/static/src/js/fields/basic_fields.js
parente617aa91c536093f481da28b0cf061a6abe55b2a (diff)
[FIX] product: editing uom on product.product
Updating the uom_id on a product_product will eventually change also the uom_po_id to have them belonging to the same category. Saving the update call write() on product with a dict of two values (uom_id and uom_po_id) As product.product is inherited from product.template, the write() on the corresponding product_template is called but in this case 2 times for each values. The first time, only uom_id is updated. The _check_uom constraint is triggered and obviously failed. The uom_po_id on the template is not yet updated. This commit makes the sync in the beginning of write() of product.template. Which means before calling the constraint. This commit also makes the onchanges on uom_id acts the same between product.product and product.template. Task : 2197818 closes odoo/odoo#48714 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions