2010-06-11 13:17:33 +00:00
|
|
|
-
|
|
|
|
In order to check account voucher module in OpenERP I create a customer voucher
|
|
|
|
-
|
2012-10-04 16:15:42 +00:00
|
|
|
!record {model: account.voucher, id: account_voucher_voucherforaxelor0, view: view_sale_receipt_form}:
|
|
|
|
type: sale
|
2010-06-11 13:17:33 +00:00
|
|
|
account_id: account.cash
|
2010-10-20 13:36:16 +00:00
|
|
|
amount: 1000.0
|
2010-06-11 13:17:33 +00:00
|
|
|
company_id: base.main_company
|
2013-05-02 22:59:37 +00:00
|
|
|
journal_id: account.sales_journal
|
2010-06-11 13:17:33 +00:00
|
|
|
name: Voucher for Axelor
|
|
|
|
narration: Basic Pc
|
2010-10-20 13:36:16 +00:00
|
|
|
line_cr_ids:
|
2010-06-11 13:17:33 +00:00
|
|
|
- account_id: account.a_recv
|
|
|
|
amount: 1000.0
|
|
|
|
name: Voucher for Axelor
|
2012-06-20 12:03:05 +00:00
|
|
|
partner_id: base.res_partner_12
|
2010-06-11 13:17:33 +00:00
|
|
|
period_id: account.period_6
|
2010-10-20 13:36:16 +00:00
|
|
|
reference: none
|
2010-06-11 13:17:33 +00:00
|
|
|
|
|
|
|
-
|
|
|
|
I check that Initially customer voucher is in the "Draft" state
|
|
|
|
-
|
|
|
|
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
|
|
|
- state == 'draft'
|
|
|
|
-
|
2010-09-27 14:48:08 +00:00
|
|
|
I compute the voucher to calculate the taxes by clicking Compute button
|
2010-06-11 13:17:33 +00:00
|
|
|
-
|
2010-08-14 14:57:42 +00:00
|
|
|
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
|
2010-10-20 13:36:16 +00:00
|
|
|
|
2010-06-11 13:17:33 +00:00
|
|
|
-
|
|
|
|
I create voucher by clicking on Create button
|
|
|
|
-
|
|
|
|
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
|
|
|
|
-
|
|
|
|
I clicked on Validate Button
|
|
|
|
-
|
|
|
|
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
|
|
|
- state == 'posted'
|
|
|
|
|
|
|
|
-
|
|
|
|
I check that Moves get created for this voucher
|
|
|
|
-
|
|
|
|
!python {model: account.voucher}: |
|
|
|
|
acc_id=self.browse(cr, uid, ref("account_voucher_voucherforaxelor0"))
|
|
|
|
assert(acc_id.move_id)
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
Now I create a Vendor Voucher
|
|
|
|
-
|
2012-10-04 16:15:42 +00:00
|
|
|
!record {model: account.voucher, id: account_voucher_voucheraxelor0, view: view_voucher_filter_vendor}:
|
|
|
|
type: purchase
|
2010-06-11 13:17:33 +00:00
|
|
|
account_id: account.cash
|
2010-10-20 13:36:16 +00:00
|
|
|
amount: 1000.0
|
2010-06-11 13:17:33 +00:00
|
|
|
company_id: base.main_company
|
|
|
|
journal_id: account.bank_journal
|
|
|
|
name: Voucher Axelor
|
2012-08-16 08:42:24 +00:00
|
|
|
narration: PC Assemble SC234
|
2010-10-20 13:36:16 +00:00
|
|
|
line_dr_ids:
|
2010-06-11 13:17:33 +00:00
|
|
|
- account_id: account.cash
|
|
|
|
amount: 1000.0
|
|
|
|
name: Voucher Axelor
|
2012-06-20 12:03:05 +00:00
|
|
|
partner_id: base.res_partner_12
|
2010-06-11 13:17:33 +00:00
|
|
|
period_id: account.period_6
|
2010-10-20 13:36:16 +00:00
|
|
|
reference: none
|
2010-06-11 13:17:33 +00:00
|
|
|
|
|
|
|
-
|
|
|
|
I check that Initially vendor voucher is in the "Draft" state
|
|
|
|
-
|
|
|
|
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
|
|
|
- state == 'draft'
|
|
|
|
-
|
|
|
|
I create voucher by clicking on Create button
|
|
|
|
-
|
|
|
|
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucheraxelor0}
|
|
|
|
-
|
|
|
|
I check that the voucher state is "posted"
|
|
|
|
-
|
|
|
|
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
|
|
|
- state == 'posted'
|
|
|
|
-
|
|
|
|
I check that moves get created for this voucher
|
|
|
|
-
|
|
|
|
!python {model: account.voucher}: |
|
|
|
|
acc_id=self.browse(cr, uid, ref("account_voucher_voucheraxelor0"))
|
|
|
|
assert(acc_id.move_id)
|