From 49b5a5ba2542d8906c0602e67f46f1e7ac9bf1bd Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Mon, 20 Aug 2018 12:02:33 +0200 Subject: [PATCH] [REF] stock: remove unused field from_loc and to_loc On move lines the field from_loc and to_loc are not used anymore --- addons/stock/models/stock_move_line.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/addons/stock/models/stock_move_line.py b/addons/stock/models/stock_move_line.py index 9db945ea4f0..ed567ed0c9f 100644 --- a/addons/stock/models/stock_move_line.py +++ b/addons/stock/models/stock_move_line.py @@ -41,8 +41,6 @@ class StockMoveLine(models.Model): owner_id = fields.Many2one('res.partner', 'Owner', help="Owner of the quants") location_id = fields.Many2one('stock.location', 'From', required=True) location_dest_id = fields.Many2one('stock.location', 'To', required=True) - from_loc = fields.Char(compute='_compute_location_description') - to_loc = fields.Char(compute='_compute_location_description') lots_visible = fields.Boolean(compute='_compute_lots_visible') picking_type_use_create_lots = fields.Boolean(related='picking_id.picking_type_id.use_create_lots', readonly=True) picking_type_use_existing_lots = fields.Boolean(related='picking_id.picking_type_id.use_existing_lots', readonly=True) @@ -55,11 +53,6 @@ class StockMoveLine(models.Model): tracking = fields.Selection(related='product_id.tracking', readonly=True) picking_type_entire_packs = fields.Boolean(related='picking_id.picking_type_id.show_entire_packs', readonly=True) - def _compute_location_description(self): - for operation, operation_sudo in izip(self, self.sudo()): - operation.from_loc = '%s%s' % (operation_sudo.location_id.name, operation.product_id and operation_sudo.package_id.name or '') - operation.to_loc = '%s%s' % (operation_sudo.location_dest_id.name, operation_sudo.result_package_id.name or '') - @api.one @api.depends('picking_id.picking_type_id', 'product_id.tracking') def _compute_lots_visible(self):