Add outcome moves to stock move
It contains the stock moves for which the stock move is the origin.
This commit is contained in:
@@ -236,6 +236,8 @@ class Move(Workflow, ModelSQL, ModelView):
|
||||
'readonly': Eval('state') != 'draft',
|
||||
},
|
||||
help="The source of the stock move.")
|
||||
outcome_moves = fields.One2Many(
|
||||
'stock.move', 'origin', "Outcome Moves", readonly=True)
|
||||
origin_planned_date = fields.Date(
|
||||
"Origin Planned Date", readonly=True,
|
||||
help="When the stock was expected to be moved originally.")
|
||||
@@ -911,6 +913,12 @@ class Move(Workflow, ModelSQL, ModelView):
|
||||
def cancel(cls, moves):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def copy(cls, moves, default=None):
|
||||
default = default.copy() if default is not None else {}
|
||||
default.setdefault('outcome_moves', None)
|
||||
return super().copy(moves, default=default)
|
||||
|
||||
@classmethod
|
||||
def create(cls, vlist):
|
||||
pool = Pool()
|
||||
|
||||
Reference in New Issue
Block a user