summaryrefslogtreecommitdiff
path: root/fixco_custom/models/shipment_group.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-12-24 14:08:25 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-12-24 14:08:25 +0700
commit1c42785d665f1b4d459e468d9c0428bc6f767954 (patch)
tree66018f0a196315f3e4c116064d1f331c092662d5 /fixco_custom/models/shipment_group.py
parent5dc0eb722ba306ed2e81acad1b6ba7457717af44 (diff)
parent95bcefaef503bcbe787f71ff0aadd2aa2faa47d5 (diff)
Merge branch 'main' of bitbucket.org:altafixco/fixco-addons
merge
Diffstat (limited to 'fixco_custom/models/shipment_group.py')
-rw-r--r--fixco_custom/models/shipment_group.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/fixco_custom/models/shipment_group.py b/fixco_custom/models/shipment_group.py
index a2d90f0..01e0f6b 100644
--- a/fixco_custom/models/shipment_group.py
+++ b/fixco_custom/models/shipment_group.py
@@ -35,6 +35,12 @@ class ShipmentGroup(models.Model):
picking_lines = fields.One2many('picking.line', 'shipment_id', string='Picking Lines', auto_join=True)
related_count = fields.Integer(compute='_compute_related_count', string='Related Count')
receipt = fields.Char(string='Receipt', related='picking_lines.scan_receipt')
+ total_line = fields.Integer(string='Total Line', compute='_compute_total_line')
+
+ @api.depends('picking_lines')
+ def _compute_total_line(self):
+ for rec in self:
+ rec.total_line = len(rec.picking_lines)
def sync_product_to_picking_line(self):
for shipment in self: