summaryrefslogtreecommitdiff
path: root/fixco_custom/models/shipment_group.py
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2026-01-12 11:08:39 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2026-01-12 11:08:39 +0700
commitbf7d9f44c24a80bd8fd142ab5a57c0ba32c081ef (patch)
treeda7f9c412345f4e6d7f393b5177a3f7d118a1ae9 /fixco_custom/models/shipment_group.py
parent57dee69f10404610c9b2cac8268f78ebd92a9b19 (diff)
parentf68b59fe48c186eab40783b993c27c2fc2491832 (diff)
Merge branch 'main' of https://bitbucket.org/altafixco/fixco-addons into bills_add_item_po
merge
Diffstat (limited to 'fixco_custom/models/shipment_group.py')
-rw-r--r--fixco_custom/models/shipment_group.py5
1 files changed, 5 insertions, 0 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: