Files
stock-logistics-warehouse/stock_move_location/models/stock_move.py
Joan Sisquella 7222cafdfc [MIG] stock_move_location to v12
[FIX] improvement move line generation
2020-12-02 07:39:43 +00:00

20 lines
579 B
Python

# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import api, fields, models
class StockMove(models.Model):
_inherit = "stock.move"
location_move = fields.Boolean(
string="Part of move location",
help="Whether this move is a part of stock_location moves",
)
@api.depends("location_move")
def _compute_show_details_visible(self):
super()._compute_show_details_visible()
for move in self.filtered(lambda x: x.location_move):
move.show_details_visible = True