summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/menu.xml
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2020-04-14 09:39:25 +0000
committerVictor Feyens <vfe@odoo.com>2020-04-22 11:06:20 +0000
commitba4f0679e8c413a7ebd6c54ae0b8179e8359b782 (patch)
tree6d19adf3cd216c3f1b3c7cb2bff2530cbeea30fc /addons/web/static/src/xml/menu.xml
parent42ddda0023fabf5f6664c5b8d733f4feb2e3cff0 (diff)
[FIX] sale: correct product price when created inline
When sale_product_configurator is installed, products created/chosen on sales order lines are product template and not product.product. When creating a product on the fly, the context on the product_template_id field is wrong because applied to the product.template AND the product.product. Contrary to the automatic creation of a template when a product.product is created (orm-side), we have custom code in product ensuring that when a template is created, product.product(s) are created. But this step doesn't clear the context like the orm does. This means that the default_lst_price=0 in the context won't be applied for the product.template creation, but will be for the product.product creation: 1) product.template created 2) product.product creation, based on product.template vals * in the create, the call to _add_missing_default_values will give a default value for lst_price. * this will trigger the inverse_related for the field, resetting the template price. To avoid this problem, we modify the view to specify list_price instead of lst_price in the context, because this field will be protected by the orm because it is inherited from the product.template. closes odoo/odoo#49959 X-original-commit: 42fe38015796b1973245103c877357c14889bacc Related: odoo/enterprise#10108 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src/xml/menu.xml')
0 files changed, 0 insertions, 0 deletions