Group only customer shipment by cost method
The return shipment does not have this field. Closes #12842
This commit is contained in:
1 parent
e66e35a0bd
commit
a241eb3f96
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