summaryrefslogtreecommitdiff
path: root/addons/stock/models/stock_move.py
diff options
context:
space:
mode:
authorWilliam Henrotin <whe@odoo.com>2020-04-27 11:56:02 +0200
committerSimon Lejeune <sle@openerp.com>2020-06-15 16:59:41 +0200
commit0e2765f5fd0ca0079f1f024ec3a1448b6d2ea3db (patch)
tree90ea03d1aca1bf87a080775e7db07977b645c5cc /addons/stock/models/stock_move.py
parent1b6421285c6bc4c61be3242cea30c2813251cbc7 (diff)
[REF] mrp: no more produce wizard
Use a view similar as the pickings one. task-2241471
Diffstat (limited to 'addons/stock/models/stock_move.py')
-rw-r--r--addons/stock/models/stock_move.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py
index fc724f57590..08a9fc9c7a4 100644
--- a/addons/stock/models/stock_move.py
+++ b/addons/stock/models/stock_move.py
@@ -219,7 +219,7 @@ class StockMove(models.Model):
else:
move.show_details_visible = (((consignment_enabled and move.picking_id.picking_type_id.code != 'incoming') or
show_details_visible or move.has_tracking != 'none') and
- (move.state != 'draft' or (move.picking_id.immediate_transfer and move.state == 'draft')) and
+ move._show_details_in_draft() and
move.picking_id.picking_type_id.show_operations is False)
def _compute_show_reserved_availability(self):
@@ -1653,3 +1653,7 @@ class StockMove(models.Model):
mtso_free_qties_by_loc[move.location_id][move.product_id.id] -= needed_qty
else:
move.procure_method = 'make_to_order'
+
+ def _show_details_in_draft(self):
+ self.ensure_one()
+ return self.state != 'draft' or (self.picking_id.immediate_transfer and self.state == 'draft')