[REF] stock: move line: add tracking fields
These fields aren't use in the main form views because we prepare the context before opening the move lines wizard, but we need them in the barcode client action because it is using a form view on this model without clean possibility to prepare the context.
This commit is contained in:
@@ -45,12 +45,15 @@ class StockMoveLine(models.Model):
|
||||
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)
|
||||
state = fields.Selection(related='move_id.state', store=True, related_sudo=False)
|
||||
is_initial_demand_editable = fields.Boolean(related='move_id.is_initial_demand_editable')
|
||||
is_locked = fields.Boolean(related='move_id.is_locked', default=True, readonly=True)
|
||||
consume_line_ids = fields.Many2many('stock.move.line', 'stock_move_line_consume_rel', 'consume_line_id', 'produce_line_id', help="Technical link to see who consumed what. ")
|
||||
produce_line_ids = fields.Many2many('stock.move.line', 'stock_move_line_consume_rel', 'produce_line_id', 'consume_line_id', help="Technical link to see which line was produced with this. ")
|
||||
reference = fields.Char(related='move_id.reference', store=True, related_sudo=False)
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user