summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/shipment_group.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-07-28 14:53:27 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-07-28 14:53:27 +0700
commit7a356e16bf338a5dce36d95abe74ed740562e30f (patch)
treece36eddac42b09190cc37cdd293aa6e29dc881ba /indoteknik_custom/models/shipment_group.py
parent08508e14d6697d8c05316b31a39b9ce6fd305665 (diff)
parent84c8e3f8494971a26ed8e303d8584a3caaaa5859 (diff)
Merge remote-tracking branch 'origin/odoo-backup' into odoo-backup
Diffstat (limited to 'indoteknik_custom/models/shipment_group.py')
-rw-r--r--indoteknik_custom/models/shipment_group.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/shipment_group.py b/indoteknik_custom/models/shipment_group.py
index 4969c35a..7203b566 100644
--- a/indoteknik_custom/models/shipment_group.py
+++ b/indoteknik_custom/models/shipment_group.py
@@ -36,6 +36,8 @@ class ShipmentGroup(models.Model):
def create(self, vals):
vals['number'] = self.env['ir.sequence'].next_by_code('shipment.group') or '0'
result = super(ShipmentGroup, self).create(vals)
+ if result.shipment_line and result.shipment_line[0].partner_id:
+ result.partner_id = result.shipment_line[0].partner_id.id
return result
class ShipmentGroupLine(models.Model):