From 8c0b23c23925ecadeb753ed93919dbe2cbea4370 Mon Sep 17 00:00:00 2001 From: Adrien Dieudonne Date: Thu, 12 Apr 2018 09:41:17 +0200 Subject: [PATCH] [FIX] mrp: quick create bom on new mo Before this commit, an error was raised when you tried to create a new bill of material on a new manufacturing order. In fact, the name_create RPC returned 'false' and slow_create() wasn't executed. By adding _rec_name (as in 10.0) on the corresponding model, the RPC call will raise an error that will be caught by quick_create and forces slow_create(). Closes #9761 --- addons/mrp/mrp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index e427e0f45e4..72cdf5380b3 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -148,6 +148,7 @@ class mrp_bom(osv.osv): _name = 'mrp.bom' _description = 'Bill of Material' _inherit = ['mail.thread'] + _rec_name = 'product_tmpl_id' _columns = { 'code': fields.char('Reference', size=16),