3 In order to check account voucher module in OpenERP I create a customer voucher
5 !record {model: account.voucher, id: account_voucher_voucherforaxelor0}:
6 account_id: account.cash
7 company_id: base.main_company
9 journal_id: account.bank_journal
10 name: Voucher for Axelor
13 - account_id: account.a_recv
15 name: Voucher for Axelor
16 partner_id: base.res_partner_desertic_hispafuentes
17 period_id: account.period_6
21 I check that Initially customer voucher is in the "Draft" state
23 !assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
26 I change the state of voucher to "proforma" by clicking PRO-FORMA button
28 !workflow {model: account.voucher, action: open_voucher, ref: account_voucher_voucherforaxelor0}
30 I check that the voucher state is now "proforma"
32 !assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
35 I create voucher by clicking on Create button
37 !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
39 I check that the voucher state is "Waiting for re-checking"
41 !assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
44 I clicked on Validate Button
46 !workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucherforaxelor0}
48 I check that the voucher state is "posted"
50 !assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
54 I check that Moves get created for this voucher
56 !python {model: account.voucher}: |
57 acc_id=self.browse(cr, uid, ref("account_voucher_voucherforaxelor0"))
58 assert(acc_id.move_id)
62 Now I create a Vendor Voucher
64 !record {model: account.voucher, id: account_voucher_voucheraxelor0}:
65 account_id: account.cash
66 company_id: base.main_company
68 journal_id: account.bank_journal
72 - account_id: account.cash
75 period_id: account.period_6
79 I check that Initially vendor voucher is in the "Draft" state
81 !assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
84 I change the state of voucher to "proforma" by clicking PRO-FORMA button
86 !workflow {model: account.voucher, action: open_voucher, ref: account_voucher_voucheraxelor0}
88 I check that the voucher state is now "proforma"
90 !assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
93 I create voucher by clicking on Create button
95 !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucheraxelor0}
97 I check that the voucher state is "Waiting for re-checking"
99 !assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
102 I clicked on Validate Button
104 !workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucheraxelor0}
106 I check that the voucher state is "posted"
108 !assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
112 I check that moves get created for this voucher
114 !python {model: account.voucher}: |
115 acc_id=self.browse(cr, uid, ref("account_voucher_voucheraxelor0"))
116 assert(acc_id.move_id)