Skip to content

Commit

Permalink
IMP: kit on create normal bom
Browse files Browse the repository at this point in the history
  • Loading branch information
mboscolo committed Sep 16, 2024
1 parent 2d4e661 commit dcb3083
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plm_engineering/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
"name": "PLM Engineering",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"author": "OmniaSolutions",
"website": "https://github.com/OmniaGit/odooplm",
"category": "Product Lifecycle Management",
Expand Down
3 changes: 3 additions & 0 deletions plm_engineering/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def get_previous_normal_bom(bomBrws, exclude_bom_id=False):
if new_bom_type not in ['normal', 'phantom']:
raise UserError(_("Could not convert source bom to %r" % new_bom_type))
product_template_id = obj_product_product_brw.product_tmpl_id.id
if bom_type.search_count([('product_tmpl_id', '=', product_template_id),
('type', '=', 'phantom')], order='engineering_revision DESC', limit=1):
return []
bom_brws_list = bom_type.search([('product_tmpl_id', '=', product_template_id),
('type', '=', new_bom_type)], order='engineering_revision DESC', limit=1)
if bom_brws_list:
Expand Down

0 comments on commit dcb3083

Please sign in to comment.