summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-03-18 21:00:27 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-03-18 21:00:27 +0700
commite2b8fad9eabeed935c1c15c4ab60e9d2e2a71cf1 (patch)
tree849dc1e78b57416ec5e0bb0c0f76fa432578cc9e
parente7a1a6a1fbbc7e74291471d2abc9487511a8a861 (diff)
parenta06059e47feab3aa25c35652dfb83b8783273084 (diff)
Merge branch 'odoo-backup' into md_selisih
-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..67434105 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.lower() or 'bom' in line.product_id.default_code.lower() if line.product_id.default_code else False:
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')