diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-07-25 10:47:56 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-07-25 10:47:56 +0700 |
| commit | 75a2be041bc684aa539cc078382c41f095183823 (patch) | |
| tree | b3534741ed4e009bc2466f8ae294b0ccfb2b0f6d | |
| parent | 36a53535dbdc5777266fd9276b4c557259dab6be (diff) | |
<miqdad> fix when creating shipment group not getting the partner id
| -rw-r--r-- | indoteknik_custom/models/shipment_group.py | 2 |
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): |
