diff --git a/addons/mrp/__openerp__.py b/addons/mrp/__openerp__.py index 6e025ae2d90..2fde404bf12 100644 --- a/addons/mrp/__openerp__.py +++ b/addons/mrp/__openerp__.py @@ -77,6 +77,7 @@ Dashboard / Reports for MRP will include: #TODO: This yml tests are needed to be completely reviewed again because the product wood panel is removed in product demo as it does not suit for new demo context of computer and consultant company # so the ymls are too complex to change at this stage 'test': [ + 'test/multicompany.yml', # 'test/order_demo.yml', # 'test/order_process.yml', # 'test/cancel_order.yml', diff --git a/addons/mrp/test/multicompany.yml b/addons/mrp/test/multicompany.yml new file mode 100644 index 00000000000..06d927afc65 --- /dev/null +++ b/addons/mrp/test/multicompany.yml @@ -0,0 +1,16 @@ +- + Set the current user as multicompany user +- + !context + uid: 'stock.multicompany_user' + +- + check no error on getting default mrp.production values in multicompany setting +- + !python {model: mrp.production}: | + location_obj = self.pool.get('stock.location') + fields = ['location_src_id', 'location_dest_id'] + defaults = self.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context) + for field in fields: + if defaults[field] != False: + assert location_obj.check_access_rule(cr, uid, defaults[field], 'read', context), "unreadable location %s" % field