~a-camilli/openobject-italia/7.0-fix-labels_shipping_on_invoice

« back to all changes in this revision

Viewing changes to account_vat_period_end_statement/test/tax_computation.yml

[add] account_vat_period_end_statement

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-
 
2
  I create a new customer invoice
 
3
-
 
4
  !record {model: account.invoice, id: account_invoice_customer_0}:
 
5
    account_id: account.a_recv
 
6
    address_contact_id: base.res_partner_address_zen
 
7
    address_invoice_id: base.res_partner_address_zen
 
8
    company_id: base.main_company
 
9
    currency_id: base.EUR
 
10
    date_invoice: !eval time.strftime('%Y-%m-%d')
 
11
    type: out_invoice
 
12
    invoice_line:
 
13
      - account_id: account.a_sale
 
14
        name: '100'
 
15
        price_unit: 100
 
16
        quantity: 1.0
 
17
        invoice_line_tax_id:
 
18
            - account_tax_21
 
19
    journal_id: account.sales_journal
 
20
    partner_id: base.res_partner_3
 
21
    
 
22
-
 
23
  I confirm and open the invoice
 
24
-
 
25
  !workflow {model: account.invoice, ref: account_invoice_customer_0, action: invoice_open}
 
26
-
 
27
  I create a new supplier invoice
 
28
-
 
29
  !record {model: account.invoice, id: account_invoice_supplier_0}:
 
30
    account_id: account.a_pay
 
31
    address_contact_id: base.res_partner_address_7
 
32
    address_invoice_id: base.res_partner_address_7
 
33
    company_id: base.main_company
 
34
    currency_id: base.EUR
 
35
    date_invoice: !eval time.strftime('%Y-%m-%d')
 
36
    type: in_invoice
 
37
    invoice_line:
 
38
      - account_id: account.a_expense
 
39
        name: '50'
 
40
        price_unit: 50
 
41
        quantity: 1.0
 
42
        invoice_line_tax_id:
 
43
            - account_tax_21_credit
 
44
    journal_id: account.expenses_journal
 
45
    partner_id: base.res_partner_4
 
46
    
 
47
-
 
48
  I confirm and open the invoice
 
49
-
 
50
  !workflow {model: account.invoice, ref: account_invoice_supplier_0, action: invoice_open}
 
51
 
 
52
-
 
53
  I create the vat statement
 
54
-
 
55
  !python {model: account.vat.period.end.statement}: |
 
56
    period_id = self.pool.get('account.period').find(cr, uid, dt=time.strftime('%Y-%m-%d'))
 
57
    on_change_res = self.on_change_period_id(cr, uid, [], period_id)
 
58
    
 
59
  !record {model: account.vat.period.end.statement, id: account_vat_statement_0}:
 
60
    period_id: period_id 
 
61
    journal_id: account.miscellaneous_journal
 
62
    debit_vat_account_line_ids: on_change_res['value']['debit_vat_account_line_ids']
 
63
    credit_vat_account_line_ids: on_change_res['value']['credit_vat_account_line_ids']
 
64
    authority_vat_account_id: vat_authority
 
65
    payment_term_id: account_payment_term
 
66
-
 
67
  I confirm and open the statement
 
68
-
 
69
  !workflow {model: account.vat.period.end.statement, ref: account_vat_statement_0, action: create_move}