~savoirfairelinux-openerp/openerp-usa/openerp-usa

« back to all changes in this revision

Viewing changes to account_voucher_credits_us/account_voucher_credits_us/test/account_voucher.yml

  • Committer: Sinoj Sebastian
  • Date: 2011-12-20 08:13:31 UTC
  • Revision ID: ssebastian@novapointgroup.com-20111220081331-10la9pb56q41n8rd
Updated all modules with latest versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
-
3
 
  In order to check account voucher module in OpenERP I create a customer voucher
4
 
-
5
 
  !record {model: account.voucher, id: account_voucher_voucherforaxelor0}:
6
 
    account_id: account.cash
7
 
    company_id: base.main_company
8
 
    currency_id: base.EUR
9
 
    journal_id: account.bank_journal
10
 
    name: Voucher for Axelor
11
 
    narration: Basic Pc
12
 
    line_ids:
13
 
      - account_id: account.a_recv
14
 
        amount: 1000.0
15
 
        name: Voucher for Axelor
16
 
        partner_id: base.res_partner_desertic_hispafuentes
17
 
    period_id: account.period_6
18
 
    reference_type: none
19
 
 
20
 
-
21
 
  I check that Initially customer voucher is in the "Draft" state
22
 
-
23
 
  !assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
24
 
    - state == 'draft'
25
 
-
26
 
  I compute the voucher to calculate the taxes by clicking Cpmpute button
27
 
-
28
 
  !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
29
 
-
30
 
  I check that the voucher state is now "proforma"
31
 
-
32
 
  !assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
33
 
    - state == 'proforma'
34
 
-
35
 
  I create voucher by clicking on Create button
36
 
-
37
 
  !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
38
 
-
39
 
  I clicked on Validate Button
40
 
-
41
 
  !assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
42
 
    - state == 'posted'
43
 
 
44
 
-
45
 
  I check that Moves get created for this voucher
46
 
-
47
 
  !python {model: account.voucher}: |
48
 
    acc_id=self.browse(cr, uid, ref("account_voucher_voucherforaxelor0"))
49
 
    assert(acc_id.move_id)
50
 
 
51
 
 
52
 
-
53
 
  Now I create a Vendor Voucher
54
 
-
55
 
  !record {model: account.voucher, id: account_voucher_voucheraxelor0}:
56
 
    account_id: account.cash
57
 
    company_id: base.main_company
58
 
    currency_id: base.EUR
59
 
    journal_id: account.bank_journal
60
 
    name: Voucher Axelor
61
 
    narration: Basic PC
62
 
    line_ids:
63
 
      - account_id: account.cash
64
 
        amount: 1000.0
65
 
        name: Voucher Axelor
66
 
    period_id: account.period_6
67
 
    reference_type: none
68
 
 
69
 
-
70
 
  I check that Initially vendor voucher is in the "Draft" state
71
 
-
72
 
  !assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
73
 
    - state == 'draft'
74
 
-
75
 
  I change the state of voucher to "proforma" by clicking PRO-FORMA button
76
 
-
77
 
  !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucheraxelor0}
78
 
-
79
 
  I check that the voucher state is now "proforma"
80
 
-
81
 
  !assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
82
 
    - state == 'proforma'
83
 
-
84
 
  I create voucher by clicking on Create button
85
 
-
86
 
  !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucheraxelor0}
87
 
-
88
 
  I check that the voucher state is "posted"
89
 
-
90
 
  !assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
91
 
    - state == 'posted'
92
 
-
93
 
  I check that moves get created for this voucher
94
 
-
95
 
  !python {model: account.voucher}: |
96
 
    acc_id=self.browse(cr, uid, ref("account_voucher_voucheraxelor0"))
97
 
    assert(acc_id.move_id)