2010-06-08 12:47:44 +00:00
|
|
|
-
|
2010-09-27 17:53:35 +00:00
|
|
|
In order to check account budget module in OpenERP I created a budget with few budget positions
|
2010-06-08 12:47:44 +00:00
|
|
|
-
|
|
|
|
Creating a crossovered.budget record
|
|
|
|
-
|
|
|
|
!record {model: crossovered.budget, id: crossovered_budget_budget0}:
|
|
|
|
code: B2011
|
2011-01-05 07:29:14 +00:00
|
|
|
date_from: !eval "'%s-01-01' %(datetime.now().year+1)"
|
|
|
|
date_to: !eval "'%s-12-31' %(datetime.now().year+1)"
|
|
|
|
name: !eval "'Budget %s' %(datetime.now().year+1)"
|
2010-06-08 12:47:44 +00:00
|
|
|
state: draft
|
|
|
|
-
|
|
|
|
I created two different budget lines
|
|
|
|
-
|
|
|
|
Modifying a crossovered.budget record
|
|
|
|
-
|
|
|
|
!record {model: crossovered.budget, id: crossovered_budget_budget0}:
|
|
|
|
crossovered_budget_line:
|
|
|
|
- analytic_account_id: account.analytic_consultancy
|
2011-01-05 07:29:14 +00:00
|
|
|
date_from: !eval "'%s-01-01' %(datetime.now().year+1)"
|
|
|
|
date_to: !eval "'%s-12-31' %(datetime.now().year+1)"
|
2010-06-08 12:47:44 +00:00
|
|
|
general_budget_id: account_budget.account_budget_post_purchase0
|
|
|
|
planned_amount: 10000.0
|
|
|
|
- analytic_account_id: account.analytic_super_product_trainings
|
2011-01-05 07:29:14 +00:00
|
|
|
date_from: !eval "'%s-09-01' %(datetime.now().year+1)"
|
|
|
|
date_to: !eval "'%s-09-30' %(datetime.now().year+1)"
|
2010-06-08 12:47:44 +00:00
|
|
|
general_budget_id: account_budget.account_budget_post_sales0
|
|
|
|
planned_amount: 400000.0
|
|
|
|
|
|
|
|
-
|
|
|
|
I check that Initially Budget is in "draft" state
|
|
|
|
-
|
|
|
|
!assert {model: crossovered.budget, id: crossovered_budget_budget0}:
|
|
|
|
- state == 'draft'
|
|
|
|
|
|
|
|
-
|
|
|
|
I pressed the confirm button to confirm the Budget
|
|
|
|
-
|
|
|
|
Performing a workflow action confirm on module crossovered.budget
|
|
|
|
-
|
|
|
|
!workflow {model: crossovered.budget, action: confirm, ref: crossovered_budget_budget0}
|
|
|
|
-
|
|
|
|
I check that budget is in "Confirmed" state
|
|
|
|
-
|
|
|
|
!assert {model: crossovered.budget, id: crossovered_budget_budget0}:
|
|
|
|
- state == 'confirm'
|
|
|
|
|
|
|
|
-
|
|
|
|
I pressed the validate button to validate the Budget
|
|
|
|
-
|
|
|
|
Performing a workflow action validate on module crossovered.budget
|
|
|
|
-
|
|
|
|
!workflow {model: crossovered.budget, action: validate, ref: crossovered_budget_budget0}
|
|
|
|
-
|
|
|
|
I check that budget is in "Validated" state
|
|
|
|
-
|
|
|
|
!assert {model: crossovered.budget, id: crossovered_budget_budget0}:
|
|
|
|
- state == 'validate'
|
|
|
|
|
|
|
|
-
|
2010-09-27 17:53:35 +00:00
|
|
|
I pressed the done button to set the Budget to "Done" state
|
2010-06-08 12:47:44 +00:00
|
|
|
-
|
|
|
|
Performing a workflow action done on module crossovered.budget
|
|
|
|
-
|
|
|
|
!workflow {model: crossovered.budget, action: done, ref: crossovered_budget_budget0}
|
|
|
|
-
|
|
|
|
I check that budget is in "done" state
|
|
|
|
-
|
|
|
|
!assert {model: crossovered.budget, id: crossovered_budget_budget0}:
|
|
|
|
- state == 'done'
|
|
|
|
|