summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-03-18 11:53:55 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-03-18 11:53:55 +0700
commit3f456ca27eaf98e5396da75f18e8106688491a46 (patch)
tree4e51cbd0eb3e33fdf460cb3d11559a910d5fc29b
parentf2014f14ecd0fc471f7272e6f869c16d42175eaf (diff)
<iman> update chek product bom
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 4d186c8d..9d7be55a 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -983,7 +983,7 @@ class SaleOrder(models.Model):
def check_product_bom(self):
for order in self:
for line in order.order_line:
- if 'bom' in line.product_id.default_code.lower() or 'bom-it' in line.name.lower():
+ if 'bom-it' in line.name or 'bom' in line.product_id.default_code:
search_bom = self.env['mrp.production'].search([('product_id', '=', line.product_id.id)],order='name desc')
if search_bom:
confirmed_bom = search_bom.filtered(lambda x: x.state == 'confirmed')