diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-01-10 11:44:59 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-01-10 11:44:59 +0700 |
| commit | 0c21e4c4395ab54aa0f4fde0d19a5705dc12cd49 (patch) | |
| tree | e6c5a7018ddb6de5a1e680674bdfede13a251db7 | |
| parent | 4cedbbdded01c7d8db115a93e5ab3337404f86a4 (diff) | |
<Miqdad> Fix check bundling
| -rwxr-xr-x | fixco_custom/models/stock_picking.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fixco_custom/models/stock_picking.py b/fixco_custom/models/stock_picking.py index c2d5150..a3101d3 100755 --- a/fixco_custom/models/stock_picking.py +++ b/fixco_custom/models/stock_picking.py @@ -70,9 +70,14 @@ class StockPicking(models.Model): def check_qty_bundling_product(self): for line in self.move_ids_without_package: - if '(Bundle Component)' in line.sale_line_id.name: - if line.forecast_availability < 1 or line.quantity_done < 1: - raise UserError('Barang Bundling : %s Quantity Done tidak boleh 0' % line.product_id.display_name) + if line.sale_line_id and line.sale_line_id.name: + if '(Bundle Component)' in line.sale_line_id.name: + if line.forecast_availability < 1 or line.quantity_done < 1: + raise UserError( + 'Barang Bundling : %s Quantity Done tidak boleh 0' + % line.product_id.display_name + ) + def check_qty_done_stock(self): for line in self.move_line_ids_without_package: |
