Skip to content
Permalink
Browse files

fixup! [IMP] mrp: block creating lot from workorder/produce wizard

  • Loading branch information...
Whenrow committed Mar 18, 2019
1 parent 07e0088 commit 9c3220b445f8e408e6eed41a91732a61bf5e4c6f
Showing with 3 additions and 3 deletions.
  1. +2 −2 addons/mrp/models/stock_picking.py
  2. +1 −1 addons/mrp/models/stock_production_lot.py
@@ -15,8 +15,8 @@ class StockPickingType(models.Model):
count_mo_late = fields.Integer(string="Number of Manufacturing Orders Late",
compute='_get_mo_count')
create_components_lots = fields.Boolean(
string="Create Components Lot",
help="Allow to create new lot/serial number for the components",
string="Create New Lots/Serial Numbers for Components",
help="Allow to create new lot/serial numbers for the components",
default=False,
)

@@ -13,7 +13,7 @@ def _check_edit_create(self):
if active_mo_id:
active_mo = self.env['mrp.production'].browse(active_mo_id)
if not active_mo.picking_type_id.create_components_lots:
raise UserError(_('You are not allowed to create or edit a lot or serial number for the components with this operation type. To change this, go on the operation type and tick the box "Create lots components".'))
raise UserError(_('You are not allowed to create or edit a lot or serial number for the components with the operation type "Manufacturing". To change this, go on the operation type and tick the box "Create New Lots/Serial Numbers for Components".'))

@api.model_create_multi
def create(self, vals_list):

0 comments on commit 9c3220b

Please sign in to comment.
You can’t perform that action at this time.