mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
@@ -160,6 +160,18 @@ class MrpBomLine(models.Model):
|
||||
if self.bom_product_template_attribute_value_ids:
|
||||
self._check_variants_validity()
|
||||
|
||||
def _skip_bom_line(self, product):
|
||||
# Make this method compatible to work with NewIds
|
||||
res = super()._skip_bom_line(product)
|
||||
|
||||
return res and (
|
||||
len(
|
||||
set(product.product_template_attribute_value_ids.ids)
|
||||
& set(self.bom_product_template_attribute_value_ids.ids)
|
||||
)
|
||||
!= len(self.bom_product_template_attribute_value_ids.attribute_id)
|
||||
)
|
||||
|
||||
|
||||
class MrpBom(models.Model):
|
||||
_inherit = "mrp.bom"
|
||||
|
||||
@@ -32,9 +32,6 @@ class ReportBomStructure(models.AbstractModel):
|
||||
if to_ignore_line_ids:
|
||||
for to_ignore_line_id in to_ignore_line_ids:
|
||||
bom.bom_line_ids = [(3, to_ignore_line_id, 0)]
|
||||
product = bom._get_component_template_product(
|
||||
line, product, line.product_id
|
||||
)
|
||||
components, total = super()._get_bom_lines(
|
||||
bom, bom_quantity, product, line_id, level
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user