[REF] stock: remove unused field from_loc and to_loc

On move lines the field from_loc and to_loc are not used anymore
This commit is contained in:
Pierre Masereel
2018-08-20 13:14:45 +02:00
parent 8c6a363e85
commit 49b5a5ba25
-7
View File
@@ -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):