Revert "[FIX] delivery: picking weight not updated sometime"
This commit is not needed (and not wanted) in saas~12.1 due to07bef887afthat convert field `move_ids_without_package` to a computed field with an invert method. The invert method writes on `move_lines`, which will recompute the value of `weight` field correctly. This reverts commitb2b395467f.
This commit is contained in:
@@ -111,7 +111,7 @@ class StockPicking(models.Model):
|
||||
for picking in self:
|
||||
picking.carrier_tracking_url = picking.carrier_id.get_tracking_link(picking) if picking.carrier_id and picking.carrier_tracking_ref else False
|
||||
|
||||
@api.depends('move_lines', 'move_ids_without_package')
|
||||
@api.depends('move_lines')
|
||||
def _cal_weight(self):
|
||||
for picking in self:
|
||||
picking.weight = sum(move.weight for move in picking.move_lines if move.state != 'cancel')
|
||||
|
||||
Reference in New Issue
Block a user