summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-07-25 03:54:24 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-07-25 03:54:24 +0000
commit1183eecfa3696152713470efa0ee873966ff7514 (patch)
tree7333cfdd05b5dff9a7ff0c727234aa637316ec88
parenta919ec1f975dc5095c521da33ed6d616aafe6cc5 (diff)
parent75a2be041bc684aa539cc078382c41f095183823 (diff)
Merged in fix_shipment_group_customer (pull request #366)
<miqdad> fix when creating shipment group not getting the partner id
-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):