diff --git a/addons/delivery/models/stock_picking.py b/addons/delivery/models/stock_picking.py index 7ef3df53719..d10411c99ad 100644 --- a/addons/delivery/models/stock_picking.py +++ b/addons/delivery/models/stock_picking.py @@ -106,10 +106,10 @@ class StockPicking(models.Model): picking.weight = sum(move.weight for move in picking.move_lines if move.state != 'cancel') @api.multi - def do_transfer(self): + def action_done(self): # TDE FIXME: should work in batch self.ensure_one() - res = super(StockPicking, self).do_transfer() + res = super(StockPicking, self).action_done() if self.carrier_id and self.carrier_id.integration_level == 'rate_and_ship': self.send_to_shipper() diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index 9c24a04c0f4..213c54a4c7a 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -635,7 +635,12 @@ class Picking(models.Model): self.write({'date_done': fields.Datetime.now()}) return True - do_transfer = action_done #TODO:replace later + # Backward compatibility + # Problem with fixed reference to a function: + # it doesn't allow for overriding action_done() through do_transfer + # get rid of me in master (and make me private ?) + def do_transfer(self): + return self.action_done() def _check_move_lines_map_quant_package(self, package): """ This method checks that all product of the package (quant) are well present in the move_line_ids of the picking. """