2
I create a new customer invoice
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
10
date_invoice: !eval time.strftime('%Y-%m-%d')
13
- account_id: account.a_sale
19
journal_id: account.sales_journal
20
partner_id: base.res_partner_3
23
I confirm and open the invoice
25
!workflow {model: account.invoice, ref: account_invoice_customer_0, action: invoice_open}
27
I create a new supplier invoice
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
35
date_invoice: !eval time.strftime('%Y-%m-%d')
38
- account_id: account.a_expense
43
- account_tax_21_credit
44
journal_id: account.expenses_journal
45
partner_id: base.res_partner_4
48
I confirm and open the invoice
50
!workflow {model: account.invoice, ref: account_invoice_supplier_0, action: invoice_open}
53
I create the vat statement
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)
59
!record {model: account.vat.period.end.statement, id: account_vat_statement_0}:
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
67
I confirm and open the statement
69
!workflow {model: account.vat.period.end.statement, ref: account_vat_statement_0, action: create_move}