implement Uber delivery integration in sale.order and update docker-compose container names
This commit is contained in:
parent
c33f40a809
commit
833d3e3c31
@ -68,6 +68,10 @@ class SaleOrder(models.Model):
|
||||
# Lock the price on the carrier record itself temporarily (SUDO) to satisfy Odoo's check_carrier
|
||||
carrier.sudo().write({'fixed_price': amount})
|
||||
|
||||
# Remove any existing delivery lines first to prevent accumulation
|
||||
# We do this manually because our protection in online_orders blocks the automatic removal
|
||||
self.order_line.filtered(lambda l: l.is_delivery).sudo().unlink()
|
||||
|
||||
# Apply to order
|
||||
self.sudo().set_delivery_line(carrier, amount)
|
||||
self.sudo().write({'carrier_id': carrier.id})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user