lase@odoo.com 6fcd31cc21 [FIX] mrp_subcontracting : generates BOM for dynamic attributes
Current Behavior:

Traceback when printing the BOM overview.

Expected behavior:

Generates a PDF of the BOM overview even if the information displayed
is entirely relevant.

Steps to reproduce:

Inventory > Configuration > Products > Attributes

Create an attribute with Variants Creation Mode set to "Dynamically".

Create a new product with this single attribute and multiple values.

Create a BOM for this product with BOM Type set to "Subcontracting".

Print the BOM overview.

Cause of the issue:

Creating such a product generates a 'product.template' that is not
associated to any variant and hence does not correspond to any
'product.product'. As a result the function_get_bom_data made can not
apply the method _select_seller properly in that case.

Notes:

 - There is no error if a variant was manually created for that product.
 - If the Variants Creation Mode set to "Dynamically" a variant is still
   automatically created to be associated to the product tempalte so
   that the erro does not rise.

Fix:

As the _select_seller method is only defined for product.product
and not for product.template, we can not not apply it here.
Furhtermore, since the additional informations provided by the
override of the method get_bom_data in the the BOM overview will
not be relevant without the existence of a variant, we skip this part of
the code when the argument of _select_seller is not valid.

opw-3698050

closes odoo/odoo#156346

X-original-commit: b983026f004d4958d2a47a0dac9b1b54e24ab04c
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Lancelot Semal (lase) <lase@odoo.com>
2024-03-05 14:22:22 +00:00
2024-02-21 11:28:04 +00:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

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

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%