Group only customer shipment by cost method
The return shipment does not have this field. Closes #12842 (grafted from 2a6a862914abf8a107923e2c0985fa2ac7600aa2) --HG-- branch : 7.0
This commit is contained in:
1 parent
c8d657892c
commit
8574efced0
1 file changed
+7
-2
@@ -368,8 +368,13 @@ class Sale(metaclass=PoolMeta):
|
||||
return cost_line
|
||||
|
||||
def _get_shipment_grouping_fields(self, shipment):
|
||||
return super()._get_shipment_grouping_fields(shipment) + [
|
||||
'cost_method', 'carrier']
|
||||
pool = Pool()
|
||||
ShipmentOut = pool.get('stock.shipment.out')
|
||||
fields = super()._get_shipment_grouping_fields(shipment)
|
||||
fields.append('carrier')
|
||||
if isinstance(shipment, ShipmentOut):
|
||||
fields.append('cost_method')
|
||||
return fields
|
||||
|
||||
@property
|
||||
def shipment_cost_amount(self):
|
||||
|
||||
Reference in new issue
Block a user