From d3905268bc08f08db34669b8e90045fc2fb6f8f6 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Thu, 14 Mar 2013 16:24:11 +0530 Subject: [PATCH] [IMP] give access rights in yml of mrp repair bzr revid: fka@tinyerp.com-20130314105411-cgqik9a6grk0pqjl --- addons/mrp_repair/__openerp__.py | 3 ++- addons/mrp_repair/test/mrp_repair_users.yml | 20 +++++++++++++++++++ .../test/test_mrp_repair_afterinv.yml | 5 ++++- .../mrp_repair/test/test_mrp_repair_b4inv.yml | 5 ++++- .../test/test_mrp_repair_cancel.yml | 5 ++++- .../test/test_mrp_repair_noneinv.yml | 5 ++++- 6 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 addons/mrp_repair/test/mrp_repair_users.yml diff --git a/addons/mrp_repair/__openerp__.py b/addons/mrp_repair/__openerp__.py index 26480e975ce..a274cbc3ef4 100644 --- a/addons/mrp_repair/__openerp__.py +++ b/addons/mrp_repair/__openerp__.py @@ -52,7 +52,8 @@ The following topics should be covered by this module: 'mrp_repair_report.xml', ], 'demo': ['mrp_repair_demo.yml'], - 'test': ['test/test_mrp_repair_noneinv.yml', + 'test': ['test/mrp_repair_users.yml', + 'test/test_mrp_repair_noneinv.yml', 'test/test_mrp_repair_b4inv.yml', 'test/test_mrp_repair_afterinv.yml', 'test/test_mrp_repair_cancel.yml', diff --git a/addons/mrp_repair/test/mrp_repair_users.yml b/addons/mrp_repair/test/mrp_repair_users.yml new file mode 100644 index 00000000000..dee61653209 --- /dev/null +++ b/addons/mrp_repair/test/mrp_repair_users.yml @@ -0,0 +1,20 @@ +- + Create a user as 'MRP Repair Manager' +- + !record {model: res.users, id: res_mrp_repair_manager}: + company_id: base.main_company + name: MRP Manager + login: marm + password: marm + groups_id: + - mrp.group_mrp_manager +- + Create a user as 'MRP Repair User' +- + !record {model: res.users, id: res_mrp_repair_user}: + company_id: base.main_company + name: MRP User + login: maru + password: maru + groups_id: + - mrp.group_mrp_user \ No newline at end of file diff --git a/addons/mrp_repair/test/test_mrp_repair_afterinv.yml b/addons/mrp_repair/test/test_mrp_repair_afterinv.yml index 5ceb3f9b02b..583518ee7de 100644 --- a/addons/mrp_repair/test/test_mrp_repair_afterinv.yml +++ b/addons/mrp_repair/test/test_mrp_repair_afterinv.yml @@ -1,5 +1,8 @@ - - In order to test Invoice Method 'After Repair'. + In order to test Invoice Method 'After Repair' with giving the access rights of mrp user. +- + !context + uid: 'res_mrp_repair_user' - I confirm Repair order taking Invoice Method 'After Repair'. - diff --git a/addons/mrp_repair/test/test_mrp_repair_b4inv.yml b/addons/mrp_repair/test/test_mrp_repair_b4inv.yml index 47e301cd0bd..0b31c3970de 100644 --- a/addons/mrp_repair/test/test_mrp_repair_b4inv.yml +++ b/addons/mrp_repair/test/test_mrp_repair_b4inv.yml @@ -1,5 +1,8 @@ - - Now I test for Invoice Method 'Before Repair'. + Now I test for Invoice Method 'Before Repair' with giving the access rights of mrp user. +- + !context + uid: 'res_mrp_repair_user' - I confirm Repair order for Invoice Method 'Before Repair'. - diff --git a/addons/mrp_repair/test/test_mrp_repair_cancel.yml b/addons/mrp_repair/test/test_mrp_repair_cancel.yml index ee0e9c379e7..83a8b901fd3 100644 --- a/addons/mrp_repair/test/test_mrp_repair_cancel.yml +++ b/addons/mrp_repair/test/test_mrp_repair_cancel.yml @@ -1,6 +1,9 @@ - In order to test the cancel flow of mrp_repair module, - I start by creating new copy Repair order for "PC Assemble SC234" product. + I start by creating new copy Repair order for "PC Assemble SC234" product with giving access rights of mrp user. +- + !context + uid: 'res_mrp_repair_user' - !python {model: mrp.repair}: | copy_id = self.copy(cr, uid, ref("mrp_repair_rmrp1")) diff --git a/addons/mrp_repair/test/test_mrp_repair_noneinv.yml b/addons/mrp_repair/test/test_mrp_repair_noneinv.yml index 4334af01958..1e411e45605 100644 --- a/addons/mrp_repair/test/test_mrp_repair_noneinv.yml +++ b/addons/mrp_repair/test/test_mrp_repair_noneinv.yml @@ -1,5 +1,8 @@ - - In order to test "mrp_repair" module, I start with confirm state, and start repair. + In order to test "mrp_repair" module, I start with confirm state, and start repair with giving the access rights of mrp user. +- + !context + uid: 'res_mrp_repair_user' - I confirm Repair order for Invoice Method 'No Invoice'. -