diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index 323fac889be..dd2a996f6dd 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -90,6 +90,7 @@ Dashboard / Reports for Warehouse Management will include: 'res_config_view.xml', ], 'test': [ + 'test/stock_users.yml', 'stock_demo.yml', 'test/opening_stock.yml', 'test/shipment.yml', diff --git a/addons/stock/stock_demo.yml b/addons/stock/stock_demo.yml index b79fd68d509..64be92f8d06 100644 --- a/addons/stock/stock_demo.yml +++ b/addons/stock/stock_demo.yml @@ -1,3 +1,8 @@ +- + Only stock manager can create location,warehouse and product, so let's check data with giving the access rights of manager +- + !context + uid: 'res_users_stock_manager' - !record {model: stock.location, id: location_monitor}: name: chicago shop @@ -40,6 +45,11 @@ cost_method: average property_stock_account_input: account.conf_o_income property_stock_account_output: account.conf_o_expense +- + Stock user can handled production lot,inventory and picking, so let's check data with giving the access rights of user +- + !context + uid: 'res_users_stock_user' - !record {model: stock.production.lot, id: lot_monitor_0}: name: Lot0 for LCD Monitor diff --git a/addons/stock/test/stock_users.yml b/addons/stock/test/stock_users.yml new file mode 100644 index 00000000000..82d48197b0d --- /dev/null +++ b/addons/stock/test/stock_users.yml @@ -0,0 +1,20 @@ +- + Create a user as 'Stock Manager' +- + !record {model: res.users, id: res_users_stock_manager}: + company_id: base.main_company + name: Stock Manager + login: sam + password: sam + groups_id: + - stock.group_stock_manager +- + Create a user as 'Stock User' +- + !record {model: res.users, id: res_users_stock_user}: + company_id: base.main_company + name: Stock User + login: sau + password: sau + groups_id: + - stock.group_stock_user