mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[IMP] delivery_purolator: leave carrier_price unchanged during shipping
H11065
This commit is contained in:
@@ -353,7 +353,7 @@ class ProviderPurolator(models.Model):
|
||||
|
||||
picking.carrier_tracking_ref = shipment_pin
|
||||
shipping_data = {
|
||||
'exact_price': 0.0, # TODO How can we know?!
|
||||
'exact_price': picking.carrier_price, # price is set during planning
|
||||
'tracking_number': shipment_pin,
|
||||
}
|
||||
res.append(shipping_data)
|
||||
|
||||
@@ -136,9 +136,11 @@ class TestPurolator(TransactionCase):
|
||||
|
||||
# Basic case: no qty done or packages or anything at all really
|
||||
# it makes sense to be able to do 'something' in this case
|
||||
picking.carrier_price = 50.0
|
||||
picking.send_to_shipper()
|
||||
self.assertTrue(picking.carrier_tracking_ref)
|
||||
self.assertEqual(picking.message_attachment_count, 1) # has tracking label now
|
||||
self.assertEqual(picking.carrier_price, 50.0) # price is set during planning and should remain unchanged
|
||||
|
||||
# Void
|
||||
picking.cancel_shipment()
|
||||
|
||||
Reference in New Issue
Block a user