diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-03-18 11:53:55 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-03-18 11:53:55 +0700 |
| commit | 3f456ca27eaf98e5396da75f18e8106688491a46 (patch) | |
| tree | 4e51cbd0eb3e33fdf460cb3d11559a910d5fc29b | |
| parent | f2014f14ecd0fc471f7272e6f869c16d42175eaf (diff) | |
<iman> update chek product bom
| -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 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') |
