summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-03-18 13:14:12 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-03-18 13:14:12 +0700
commita06059e47feab3aa25c35652dfb83b8783273084 (patch)
tree8539ad87268ba1e9c757755cd4349b645999d4ee
parent4b3c012f617683cdcb85251ac2da30d40ea4e093 (diff)
<iman> fix code check bom-it
-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 4d632c71..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-it' in line.product_id.name or 'bom' in line.product_id.default_code if line.product_id.default_code else False:
+ 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')