diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-03-18 13:04:17 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-03-18 13:04:17 +0700 |
| commit | 4b3c012f617683cdcb85251ac2da30d40ea4e093 (patch) | |
| tree | 9332e2311be3940142000f5e1c86bc413dadc96a | |
| parent | 3f456ca27eaf98e5396da75f18e8106688491a46 (diff) | |
<iman> fix code
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 9d7be55a..4d632c71 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.name or 'bom' in line.product_id.default_code: + if 'bom-it' in line.product_id.name or 'bom' in line.product_id.default_code 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') |
