2 I check the voucher module with user who is accountant.
5 uid: 'res_users_account_voucher_user'
8 In order to check account voucher module in OpenERP I create a customer voucher
10 !record {model: account.voucher, id: account_voucher_voucherforaxelor0, view: view_sale_receipt_form}:
12 account_id: account.cash
14 company_id: base.main_company
15 journal_id: account.sales_journal
16 name: Voucher for Axelor
19 - account_id: account.a_recv
21 name: Voucher for Axelor
22 partner_id: base.res_partner_12
23 period_id: account.period_6
27 I check that Initially customer voucher is in the "Draft" state
29 !assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
32 I compute the voucher to calculate the taxes by clicking Compute button
34 !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
37 I create voucher by clicking on Create button
39 !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
41 I clicked on Validate Button
43 !assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
47 I check that Moves get created for this voucher
49 !python {model: account.voucher}: |
50 acc_id=self.browse(cr, uid, ref("account_voucher_voucherforaxelor0"))
51 assert(acc_id.move_id)
55 Now I create a Vendor Voucher
57 !record {model: account.voucher, id: account_voucher_voucheraxelor0, view: view_voucher_filter_vendor}:
59 account_id: account.cash
61 company_id: base.main_company
62 journal_id: account.bank_journal
64 narration: PC Assemble SC234
66 - account_id: account.cash
69 partner_id: base.res_partner_12
70 period_id: account.period_6
74 I check that Initially vendor voucher is in the "Draft" state
76 !assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
79 I create voucher by clicking on Create button
81 !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucheraxelor0}
83 I check that the voucher state is "posted"
85 !assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
88 I check that moves get created for this voucher
90 !python {model: account.voucher}: |
91 acc_id=self.browse(cr, uid, ref("account_voucher_voucheraxelor0"))
92 assert(acc_id.move_id)