Skip to content

Commit

Permalink
[FIX] delivery: update carrier also on delivery
Browse files Browse the repository at this point in the history
Create a sale order, add a product and shipping line
Confirm
Update shipping cost changing carrier
Save

Carrier on picking is not updated with the change

opw-2496008

closes #72859

Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
  • Loading branch information
agr-odoo committed Jun 28, 2021
1 parent b35b893 commit a824cd8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/delivery/models/sale_order.py
Expand Up @@ -111,6 +111,8 @@ def _create_delivery_line(self, carrier, price_unit):
values['name'] += '\n' + 'Free Shipping'
if self.order_line:
values['sequence'] = self.order_line[-1].sequence + 1
if self.picking_ids:
self.picking_ids.write({'carrier_id': carrier.id})
sol = SaleOrderLine.sudo().create(values)
return sol

Expand Down

0 comments on commit a824cd8

Please sign in to comment.