6c736a7795cc249c01b6ad44fb4246930472f796
Versions
--------
15.0+
Steps
-----
1. Go to Purchase;
2. create a Vendor Pricelist;
3. select a Product, a Product Variant & a Unit Price;
4. empty the Product field & save;
5. create a RFQ;
6. add the Product Variant from the Vendor Pricelist.
Issue
-----
The product's price remains 0.
Cause
-----
The `seller_ids` field in `product.template` creates one-to-many
relation with `product.supplierinfo`'s `product_tmpl_id` field. While it
is possible to select a specific product variant and have the product
field empty, this renders the Vendor Pricelist unavailable for Purchase
Orders.
Solution
--------
Add a `_sanitize_vals` method to `product.supplierinfo` to be used on
create/write, which ensures that if there's a `product_id`, the record's
`product_tmpl_id` is consistent with it. This allows for record imports
to be usable & consistent when only a variant is specified.
Also backport a modified `onchange` method added in
5537090f1c. Originally it only reset
`product_id` if `product_tmpl_id` was changed to a different non-falsy
value. Modified, it also resets `product_id` if `product_tmpl_id` is
changed to a falsy value, as it would otherwise just re-add the removed
value on create/write after this commit.
opw-3664524
closes odoo/odoo#151210
X-original-commit: 572122335a04126385115d892b027371bbabbe7e
Signed-off-by: Levi Siuzdak <sile@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%