[MERGE]merge fka's branch for changes done in other module which are suggested
bzr revid: sgo@tinyerp.com-20130318061320-j7gquchn4qt6wej3
This commit is contained in:
commit
8ef0677a23
|
@ -57,6 +57,7 @@ up a management by affair.
|
|||
],
|
||||
'demo': ['hr_timesheet_demo.xml'],
|
||||
'test': [
|
||||
'test/hr_timesheet_users.yml',
|
||||
'test/test_hr_timesheet.yml',
|
||||
'test/hr_timesheet_report.yml',
|
||||
'test/hr_timesheet_demo.yml',
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
-
|
||||
Give the access rights of Hr Officer to create employee.
|
||||
-
|
||||
!context
|
||||
uid: 'res_hr_timesheet_officer'
|
||||
-
|
||||
!record {model: hr.analytic.timesheet, id: working_hours_coding, view: False}:
|
||||
user_id: base.user_demo
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
-
|
||||
Create a user as 'HR Manager'
|
||||
-
|
||||
!record {model: res.users, id: res_hr_timesheet_manager}:
|
||||
company_id: base.main_company
|
||||
name: HR manager
|
||||
login: hrtm
|
||||
password: hrtm
|
||||
groups_id:
|
||||
- base.group_hr_manager
|
||||
-
|
||||
Create a user as 'HR Officer'
|
||||
-
|
||||
!record {model: res.users, id: res_hr_timesheet_officer}:
|
||||
company_id: base.main_company
|
||||
name: HR Officer
|
||||
login: hrto
|
||||
password: hrto
|
||||
groups_id:
|
||||
- base.group_hr_user
|
||||
-
|
||||
Create a user as 'Employee'
|
||||
-
|
||||
!record {model: res.users, id: res_hr_timesheet_employee}:
|
||||
company_id: base.main_company
|
||||
name: Employee
|
||||
login: empt
|
||||
password: empt
|
||||
groups_id:
|
||||
- base.group_user
|
|
@ -1,6 +1,11 @@
|
|||
-
|
||||
In order to test hr_timesheet Module in OpenERP, I make "Sign In/Sign Out for Project" to encode and
|
||||
track time spent on the different projects.
|
||||
-
|
||||
Give the access rights of Hr Officer to create employee.
|
||||
-
|
||||
!context
|
||||
uid: 'res_hr_timesheet_officer'
|
||||
-
|
||||
I create employee "Quentin Paolino" as "User".
|
||||
-
|
||||
|
@ -9,6 +14,11 @@
|
|||
name: Quentin Paolino
|
||||
parent_id: 'hr.employee_al'
|
||||
user_id: 'base.user_demo'
|
||||
-
|
||||
Give the access rights of Employee to Sign In/Sign Out in Project.
|
||||
-
|
||||
!context
|
||||
uid: 'res_hr_timesheet_employee'
|
||||
-
|
||||
On "Sign In/Sign Out by Project" wizard i click on "Sign In/Sign Out" button of this wizard.
|
||||
-
|
||||
|
|
|
@ -70,7 +70,7 @@ So, that we can compare the theoretic delay and real delay.
|
|||
'mrp_operations_demo.yml'
|
||||
],
|
||||
'test': [
|
||||
# 'test/workcenter_operations.yml',
|
||||
'test/workcenter_operations.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
|
|
|
@ -1,6 +1,19 @@
|
|||
-
|
||||
Create a user as 'MRP User'
|
||||
-
|
||||
!record {model: res.users, id: res_mrp_operation_user}:
|
||||
company_id: base.main_company
|
||||
name: MRP User
|
||||
login: maou
|
||||
password: maou
|
||||
groups_id:
|
||||
- mrp.group_mrp_user
|
||||
-
|
||||
In order to test mrp_operations with OpenERP, I refer created production order of PC Assemble SC349
|
||||
with routing - Manual Component's Assembly to test complete production process with respect of workcenter.
|
||||
with routing - Manual Component's Assembly to test complete production process with respect of workcenter with giving access rights of MRP User.
|
||||
-
|
||||
!context
|
||||
uid: 'res_mrp_operation_user'
|
||||
-
|
||||
I compute the production order.
|
||||
-
|
||||
|
@ -92,7 +105,7 @@
|
|||
I print a Barcode Report of Operation line.
|
||||
-
|
||||
!python {model: mrp_operations.operation.code}: |
|
||||
import netsvc, tools, os
|
||||
from openerp import netsvc, tools
|
||||
(data, format) = netsvc.LocalService('report.mrp.code.barcode').create(cr, uid, [ref('mrp_operations.mrp_op_1'),ref('mrp_operations.mrp_op_2'),ref('mrp_operations.mrp_op_3'),ref('mrp_operations.mrp_op_4'),ref('mrp_operations.mrp_op_5')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-barcode_report.'+format), 'wb+').write(data)
|
||||
|
@ -101,7 +114,7 @@
|
|||
I print Workcenter's Barcode Report.
|
||||
-
|
||||
!python {model: mrp.workcenter}: |
|
||||
import netsvc, tools, os
|
||||
from openerp import netsvc, tools
|
||||
(data, format) = netsvc.LocalService('report.mrp.wc.barcode').create(cr, uid, [ref('mrp.mrp_workcenter_0'),ref('mrp.mrp_workcenter_1')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-workcenter_barcode_report.'+format), 'wb+').write(data)
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
|
@ -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'.
|
||||
-
|
||||
|
|
|
@ -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'.
|
||||
-
|
||||
|
|
|
@ -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"))
|
||||
|
|
|
@ -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'.
|
||||
-
|
||||
|
|
|
@ -53,6 +53,7 @@ It allows the manager to quickly check the issues, assign them and decide on the
|
|||
],
|
||||
'demo': ['project_issue_demo.xml'],
|
||||
'test': [
|
||||
'test/issue_users.yml',
|
||||
'test/subscribe_issue.yml',
|
||||
'test/issue_process.yml',
|
||||
'test/cancel_issue.yml',
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
-
|
||||
Project user can cancelled issue, so let's check data with giving the access rights of user.
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_project_issue_user'
|
||||
-
|
||||
In order to test process of issue tracking in OpenERP, I cancel the unqualified Issue.
|
||||
-
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
-
|
||||
Test the whole create project issue with project user.
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_project_issue_user'
|
||||
-
|
||||
!record {model: project.issue, id: project_task_1, view: False}:
|
||||
task_id: 'project.project_task_17'
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
-
|
||||
Project user can subscribe issue, so let's check data with giving the access rights of user.
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_project_issue_user'
|
||||
-
|
||||
In order to test process of issue tracking in OpenERP, I Open the Issue.
|
||||
-
|
||||
|
@ -40,11 +45,21 @@
|
|||
-
|
||||
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in open state}:
|
||||
- state == 'open'
|
||||
-
|
||||
Only project manager can create Task for Issue, so let's check data with giving the access rights of manager.
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_project_issue_manager'
|
||||
-
|
||||
I create Task for Issue.
|
||||
-
|
||||
!python {model: project.issue}: |
|
||||
self.convert_issue_task(cr, uid, [ref("crm_case_buginaccountsmodule0")])
|
||||
-
|
||||
After resolving Issue Project user can close issue, so let's check data with giving the access rights of user.
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_project_issue_user'
|
||||
-
|
||||
I close Issue after resolving it
|
||||
-
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
-
|
||||
Create a user as 'Project manager'
|
||||
-
|
||||
!record {model: res.users, id: res_users_project_issue_manager}:
|
||||
company_id: base.main_company
|
||||
name: Project Manager
|
||||
login: prim
|
||||
password: prim
|
||||
groups_id:
|
||||
- project.group_project_manager
|
||||
-
|
||||
Create a user as 'Project user'
|
||||
-
|
||||
!record {model: res.users, id: res_users_project_issue_user}:
|
||||
company_id: base.main_company
|
||||
name: Project User
|
||||
login: priu
|
||||
password: priu
|
||||
groups_id:
|
||||
- project.group_project_user
|
|
@ -1,5 +1,10 @@
|
|||
-
|
||||
In Order to test process of Issue in OpenERP, Custmer send the issue by email.
|
||||
Project user can subscribe issue, so let's check data with giving the access rights of user.
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_project_issue_user'
|
||||
-
|
||||
In Order to test process of Issue in OpenERP, Customer send the issue by email.
|
||||
-
|
||||
!python {model: mail.thread}: |
|
||||
from openerp import addons
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
-
|
||||
Salesman can also cancel order therfore test with that user which have salesman rights,
|
||||
Salesman can also cancel order therefore test with that user which have salesman rights,
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_salesman'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
-
|
||||
Sales manager can only delete order therfore test with that user which have sales manager rights,
|
||||
Sales manager can only delete order therefore test with that user which have sales manager rights,
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_salesmanager'
|
||||
|
|
|
@ -59,7 +59,8 @@ You can choose flexible invoicing methods:
|
|||
],
|
||||
'data': ['sale_stock_data.xml'],
|
||||
'demo_xml': ['sale_stock_demo.xml'],
|
||||
'test': ['test/cancel_order_sale_stock.yml',
|
||||
'test': ['test/sale_stock_users.yml',
|
||||
'test/cancel_order_sale_stock.yml',
|
||||
'test/picking_order_policy.yml',
|
||||
'test/prepaid_order_policy.yml',
|
||||
'test/sale_order_onchange.yml',
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
-
|
||||
In order to test the cancel sale order.
|
||||
In order to test the cancel sale order with that user which have salesman rights.
|
||||
First I confirm order.
|
||||
-
|
||||
!context
|
||||
uid: 'res_sale_stock_salesman'
|
||||
-
|
||||
!workflow {model: sale.order, action: order_confirm, ref: sale.sale_order_8}
|
||||
-
|
||||
|
@ -8,7 +11,7 @@
|
|||
-
|
||||
!python {model: stock.picking}: |
|
||||
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
|
||||
first_picking = self.browse(cr, uid, delivery_orders[0], context=context)
|
||||
first_picking = self.browse(cr, uid, delivery_orders[0])
|
||||
if first_picking.force_assign(cr, uid, first_picking):
|
||||
first_move = first_picking.move_lines[0]
|
||||
values = {'move%s'%(first_move.id): {'product_qty': 2, 'product_uom':ref('product.product_uom_unit')}}
|
||||
|
@ -20,12 +23,22 @@
|
|||
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
|
||||
last_delivery_order_id = delivery_orders[0]
|
||||
self.pool.get('stock.picking').signal_button_cancel(cr, uid, [last_delivery_order_id])
|
||||
-
|
||||
Only Stock User can change data related warehouse therefore test with that user which have stcok user rights,
|
||||
-
|
||||
!context
|
||||
uid: 'res_stock_user'
|
||||
-
|
||||
I run the scheduler.
|
||||
-
|
||||
!python {model: procurement.order}: |
|
||||
|
||||
self.run_scheduler(cr, uid)
|
||||
-
|
||||
Salesman can also check order therefore test with that user which have salesman rights,
|
||||
-
|
||||
!context
|
||||
uid: 'res_sale_stock_salesman'
|
||||
-
|
||||
I check order status in "Ship Exception".
|
||||
-
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
-
|
||||
In order to test process of the Sale Order,
|
||||
In order to test process of the Sale Order with access rights of saleman,
|
||||
-
|
||||
!context
|
||||
uid: 'res_sale_stock_salesman'
|
||||
-
|
||||
First I check the total amount of the Quotation before Approved.
|
||||
-
|
||||
|
@ -33,11 +36,21 @@
|
|||
assert procurement.product_qty == order_line.product_uom_qty, "Qty is not correspond."
|
||||
assert procurement.product_uom.id == order_line.product_uom.id, "UOM is not correspond."
|
||||
assert procurement.procure_method == order_line.type, "Procurement method is not correspond."
|
||||
-
|
||||
Only stock user can change data related warehouse therefore test with that user which have stock user rights,
|
||||
-
|
||||
!context
|
||||
uid: 'res_stock_user'
|
||||
-
|
||||
I run the scheduler.
|
||||
-
|
||||
!python {model: procurement.order}: |
|
||||
self.run_scheduler(cr, uid)
|
||||
-
|
||||
Salesman can also check order therefore test with that user which have salesman rights,
|
||||
-
|
||||
!context
|
||||
uid: 'res_sale_stock_salesman'
|
||||
-
|
||||
I check the details of delivery order after confirmed quotation.
|
||||
-
|
||||
|
@ -128,6 +141,11 @@
|
|||
assert inv_line.price_unit == so_line.price_unit , "Price Unit is not correspond."
|
||||
assert inv_line.quantity == (so_line.product_uos and so_line.product_uos_qty) or so_line.product_uom_qty , "Product qty is not correspond."
|
||||
assert inv_line.price_subtotal == so_line.price_subtotal, "Price sub total is not correspond."
|
||||
-
|
||||
Only Stock manager can open the Invoice therefore test with that user which have stock manager rights,
|
||||
-
|
||||
!context
|
||||
uid: 'res_stock_manager'
|
||||
-
|
||||
I open the Invoice.
|
||||
-
|
||||
|
@ -149,6 +167,11 @@
|
|||
journal_ids[0], ref('account.cash'),
|
||||
ref('account.period_8'), journal_ids[0],
|
||||
name='test')
|
||||
-
|
||||
To test process of the Sale Order with access rights of saleman,
|
||||
-
|
||||
!context
|
||||
uid: 'res_sale_stock_salesman'
|
||||
-
|
||||
I check the order after paid invoice.
|
||||
-
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
-
|
||||
Now I confirm the Quotation with "Pay before delivery" policy.
|
||||
Now I confirm the Quotation with "Pay before delivery" policy with access rights of salesman.
|
||||
-
|
||||
!context
|
||||
uid: 'res_sale_stock_salesman'
|
||||
-
|
||||
!workflow {model: sale.order, action: order_confirm, ref: sale.sale_order_4}
|
||||
-
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
-
|
||||
Only sales manager Creates product so let's check with access rights of salemanager.
|
||||
-
|
||||
!context
|
||||
uid: 'res_sale_stock_salesmanager'
|
||||
-
|
||||
In order to test the onchange of the Sale Order, I create a product
|
||||
-
|
||||
|
@ -5,6 +10,11 @@
|
|||
name: 'Devil Worship Book'
|
||||
list_price: 66.6
|
||||
procure_method: 'make_to_order'
|
||||
-
|
||||
In sale order to test process of onchange of Sale Order with access rights of saleman.
|
||||
-
|
||||
!context
|
||||
uid: 'res_sale_stock_salesman'
|
||||
-
|
||||
Now i create a sale order that uses my new product
|
||||
-
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
-
|
||||
Create a user as 'Salesmanager'
|
||||
-
|
||||
!record {model: res.users, id: res_sale_stock_salesmanager}:
|
||||
company_id: base.main_company
|
||||
name: Sales manager
|
||||
login: ssm
|
||||
password: ssm
|
||||
groups_id:
|
||||
- base.group_sale_manager
|
||||
-
|
||||
Create a user as 'Salesman'
|
||||
-
|
||||
!record {model: res.users, id: res_sale_stock_salesman}:
|
||||
company_id: base.main_company
|
||||
name: Salesman
|
||||
login: ssu
|
||||
password: ssu
|
||||
groups_id:
|
||||
- base.group_sale_salesman_all_leads
|
||||
-
|
||||
Create a user as 'Stock User'
|
||||
-
|
||||
!record {model: res.users, id: res_stock_user}:
|
||||
company_id: base.main_company
|
||||
name: Stock User
|
||||
login: sau
|
||||
password: sau
|
||||
groups_id:
|
||||
- stock.group_stock_user
|
||||
-
|
||||
Create a user as 'Stock Manager'
|
||||
-
|
||||
!record {model: res.users, id: res_stock_manager}:
|
||||
company_id: base.main_company
|
||||
name: Stock Manager
|
||||
login: sam
|
||||
password: sam
|
||||
email: admin@portal.example.com
|
||||
groups_id:
|
||||
- stock.group_stock_manager
|
Loading…
Reference in New Issue