[MERGE] sync with latest trunk
[odoo/odoo.git] / addons / account / test / account_supplier_invoice.yml
1 -
2   In order to test account invoice I create a new supplier invoice
3 -
4   !record {model: account.invoice, id: account_invoice_supplier0}:
5     account_id: account.a_pay
6     address_contact_id: base.res_partner_address_3000
7     address_invoice_id: base.res_partner_address_3000
8     check_total: 3000.0
9     company_id: base.main_company
10     currency_id: base.EUR
11     invoice_line:
12       - account_id: account.a_expense
13         name: '[PC1] Basic PC'
14         price_unit: 300.0
15         product_id: product.product_product_pc1
16         quantity: 10.0
17         uos_id: product.product_uom_unit
18     journal_id: account.expenses_journal
19     partner_id: base.res_partner_desertic_hispafuentes
20     reference_type: none
21     type: in_invoice
22 -
23   I check that Initially supplier invoice state is "Draft"
24 -
25   !assert {model: account.invoice, id: account_invoice_supplier0}:
26     - state == 'draft'
27 -
28   I change the state of invoice to open by clicking Validate button
29 -
30   !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_supplier0}
31 -
32   I check that the invoice state is now "Open"
33 -
34   !assert {model: account.invoice, id: account_invoice_supplier0}:
35     - state == 'open'