2010-05-27 13:25:40 +00:00
|
|
|
-
|
2010-06-08 12:47:44 +00:00
|
|
|
In order to test account invoice I create a new supplier invoice
|
2010-05-27 13:25:40 +00:00
|
|
|
-
|
2010-06-08 12:47:44 +00:00
|
|
|
!record {model: account.invoice, id: account_invoice_supplier0}:
|
2010-05-27 13:25:40 +00:00
|
|
|
account_id: account.a_pay
|
|
|
|
address_contact_id: base.res_partner_address_3000
|
|
|
|
address_invoice_id: base.res_partner_address_3000
|
|
|
|
check_total: 3000.0
|
|
|
|
company_id: base.main_company
|
|
|
|
currency_id: base.EUR
|
|
|
|
invoice_line:
|
|
|
|
- account_id: account.a_expense
|
|
|
|
name: '[PC1] Basic PC'
|
|
|
|
price_unit: 300.0
|
|
|
|
product_id: product.product_product_pc1
|
|
|
|
quantity: 10.0
|
|
|
|
uos_id: product.product_uom_unit
|
|
|
|
journal_id: account.expenses_journal
|
|
|
|
partner_id: base.res_partner_desertic_hispafuentes
|
|
|
|
reference_type: none
|
|
|
|
type: in_invoice
|
|
|
|
-
|
2010-06-08 12:47:44 +00:00
|
|
|
I check that Initially supplier invoice state is "Draft"
|
2010-05-27 13:25:40 +00:00
|
|
|
-
|
2010-06-08 12:47:44 +00:00
|
|
|
!assert {model: account.invoice, id: account_invoice_supplier0}:
|
2010-05-27 13:25:40 +00:00
|
|
|
- state == 'draft'
|
|
|
|
-
|
|
|
|
I change the state of invoice to open by clicking Validate button
|
|
|
|
-
|
2010-06-08 12:47:44 +00:00
|
|
|
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_supplier0}
|
2010-05-27 13:25:40 +00:00
|
|
|
-
|
2010-06-08 12:47:44 +00:00
|
|
|
I check that the invoice state is now "Open"
|
2010-05-27 13:25:40 +00:00
|
|
|
-
|
2010-06-08 12:47:44 +00:00
|
|
|
!assert {model: account.invoice, id: account_invoice_supplier0}:
|
2010-08-30 06:19:10 +00:00
|
|
|
- state == 'open'
|