[IMP] account: remove invoice addresss
[odoo/odoo.git] / addons / account / test / account_invoice_state.yml
1 -
2   In order to test Confirm Draft Invoice wizard I create an invoice and confirm it with this wizard
3 -
4   !record {model: account.invoice, id: account_invoice_state}:
5     account_id: account.a_recv
6     address_contact_id: base.res_partner_address_3000
7     company_id: base.main_company
8     currency_id: base.EUR
9     invoice_line:
10       - account_id: account.a_sale
11         name: '[PC1] Basic PC'
12         price_unit: 450.0
13         quantity: 1.0
14         product_id: product.product_product_pc1
15         uos_id: product.product_uom_unit
16     journal_id: account.bank_journal
17     partner_id: base.res_partner_desertic_hispafuentes
18     reference_type: none
19 -
20   I check that Initially customer invoice state is "Draft"
21 -
22   !assert {model: account.invoice, id: account_invoice_state}:
23     - state == 'draft'
24 -
25   I called the "Confirm Draft Invoices" wizard
26 -
27   !record {model: account.invoice.confirm, id: account_invoice_confirm_0}:
28     {}
29 -
30   I clicked on Confirm Invoices Button
31 -
32   !python {model: account.invoice.confirm}: |
33     self.invoice_confirm(cr, uid, [ref("account_invoice_confirm_0")], {"lang": 'en_US',
34       "tz": False, "active_model": "account.invoice", "active_ids": [ref("account_invoice_state")],
35       "type": "out_invoice", "active_id": ref("account_invoice_state"), })
36 -
37   I check that customer invoice state is "Open"
38 -
39   !assert {model: account.invoice, id: account_invoice_state}:
40     - state == 'open'
41 -
42   I Modified the journal record so it can cancel invoice
43 -
44   !record {model: account.journal, id: account.bank_journal}:
45     update_posted: 1
46
47
48 -
49   In order to check the "Cancel Selected Invoices" wizard in openerp I cancelled this open invoice using this wizard
50 -
51   !record {model: account.invoice.cancel, id: account_invoice_cancel_0}:
52     {}
53
54 -
55   I clicked on Cancel Invoices Button
56 -
57   !python {model: account.invoice.cancel}: |
58     self.invoice_cancel(cr, uid, [ref("account_invoice_cancel_0")], {"lang": 'en_US',
59       "tz": False, "active_model": "account.invoice", "active_ids": [ref("account_invoice_state")],
60       "type": "out_invoice", "active_id": ref("account_invoice_state"), })
61
62 -
63   I check that customer invoice is in the cancel state
64 -
65   !assert {model: account.invoice, id: account_invoice_state}:
66     - state == 'cancel'
67