summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorFlorimond Husquinet (fhu) <fhu@odoo.com>2019-09-05 06:52:39 +0000
committerfw-bot <otis@odoo.com>2019-09-12 09:39:23 +0000
commit0fe86d4b4061b0bc1be713a7bed1850c9aadb11f (patch)
tree880ee127c85555be6055133c661c03683745d63a /addons/web/static/src/js/fields/basic_fields.js
parent26c62cbb4401bffb72ce77fee481ca84b77a8143 (diff)
[FIX] mrp_bom_cost: compute price from bom ensure one fail
- Activate mrp bom cost. - Create a BoM for a product - The Compute "Price from BoM" button appear on the product template below the Cost field. - Click the button. Before this commit: Probably because dynamic variant creation is activated and there is no variants, the ensure_one fails with 0 records actually passed to the function. Additionally, if all the BoM are for variants and there is no BoM for the template, then there is a division by 0 exception. After this commit: A test is performed to avoid calling the function with 0 records. A test is performed to avoid a division by 0 exception. closes odoo/odoo#36761 Opw: 2064884 X-original-commit: 42264002070c8acbb781bd111d8a0c31e2ad9716 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions