Skip to content

Commit

Permalink
[14.0][FIX] repair_sale_order, keep shipping address after trigger pa…
Browse files Browse the repository at this point in the history
…rtner onchange on sale order creation
  • Loading branch information
ChrisOForgeFlow authored and PauBForgeFlow committed Dec 22, 2023
1 parent 40c680f commit 69e4342
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions repair_sale_order/models/repair_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ def action_create_sale_order(self):
sale_order = order_model.create(sale_order_data)
orders |= sale_order
self.onchange_partner_id()
partner_shipping_id = False
if sale_order.partner_shipping_id != sale_order.partner_id:
partner_shipping_id = sale_order.partner_shipping_id
sale_order.onchange_partner_id()
if partner_shipping_id:
sale_order.partner_shipping_id = partner_shipping_id
for line in rec.operations:
sale_order_line = order_line_model.create(
line._get_sale_line_data(sale_order)
Expand Down

0 comments on commit 69e4342

Please sign in to comment.