diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-01-12 11:08:39 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-01-12 11:08:39 +0700 |
| commit | bf7d9f44c24a80bd8fd142ab5a57c0ba32c081ef (patch) | |
| tree | da7f9c412345f4e6d7f393b5177a3f7d118a1ae9 | |
| parent | 57dee69f10404610c9b2cac8268f78ebd92a9b19 (diff) | |
| parent | f68b59fe48c186eab40783b993c27c2fc2491832 (diff) | |
Merge branch 'main' of https://bitbucket.org/altafixco/fixco-addons into bills_add_item_po
merge
| -rw-r--r-- | fixco_custom/models/shipment_group.py | 5 | ||||
| -rwxr-xr-x | fixco_custom/models/stock_picking.py | 11 | ||||
| -rw-r--r-- | fixco_custom/views/report_picking_list_new.xml | 4 |
3 files changed, 15 insertions, 5 deletions
diff --git a/fixco_custom/models/shipment_group.py b/fixco_custom/models/shipment_group.py index 4912ce3..12d1fc6 100644 --- a/fixco_custom/models/shipment_group.py +++ b/fixco_custom/models/shipment_group.py @@ -37,6 +37,11 @@ class ShipmentGroup(models.Model): receipt = fields.Char(string='Receipt', related='picking_lines.scan_receipt') total_line = fields.Integer(string='Total Line', compute='_compute_total_line') + @api.onchange('picking_lines') + def _onchange_limit_lines(self): + if len(self.picking_lines) >= 100: + raise UserError("Maksimal 100 picking line per shipment.") + @api.depends('picking_lines') def _compute_total_line(self): for rec in self: 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: diff --git a/fixco_custom/views/report_picking_list_new.xml b/fixco_custom/views/report_picking_list_new.xml index a10e231..673e394 100644 --- a/fixco_custom/views/report_picking_list_new.xml +++ b/fixco_custom/views/report_picking_list_new.xml @@ -80,8 +80,8 @@ <div style="text-align: center; margin-bottom: 15px;"> <!-- Barcode --> <div style="text-center: center; margin-bottom: 10px;"> - <img t-att-src="'https://xpanel.fixcomart.com/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('QR', o.name, 100, 100)" - style="width:250px;height:250px;" alt="QR Code"/> + <img t-att-src="'https://xpanel.fixcomart.com/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('QR', o.name, 150, 150)" + style="width:150px;height:150px;" alt="QR Code"/> </div> <t t-if="was_printed_map.get(o.id)"> <div class="duplicate-watermark"> |
