-
- In order to test account invoice i create a new supplier invoice
+ In order to test account invoice I create a new supplier invoice
-
- Creating a account.invoice record
--
- !record {model: account.invoice, id: account_invoice_1}:
+ !record {model: account.invoice, id: account_invoice_supplier0}:
account_id: account.a_pay
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
reference_type: none
type: in_invoice
-
- I check that Initially supplier invoice is in the draft state
+ I check that Initially supplier invoice state is "Draft"
-
- !assert {model: account.invoice, id: account_invoice_1}:
+ !assert {model: account.invoice, id: account_invoice_supplier0}:
- state == 'draft'
-
I change the state of invoice to open by clicking Validate button
-
- Performing a workflow action invoice_open on module account.invoice
--
- !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_1}
--
- I check that the invoice state is now open
--
- !assert {model: account.invoice, id: account_invoice_1}:
- - state == 'open'
--
- I make a partial payment of 2000 by clicking on Pay Invoice button
--
- Creating a account.invoice.pay record
--
- !record {model: account.invoice.pay, id: account_invoice_pay_firstpaymenttoaxelorforbasicpc0}:
- amount: 2000.0
- date: '2010-05-29'
- journal_id: account.sales_journal
- name: First Payment to Axelor for Basic PC
- period_id: account.period_5
-
--
- Performing an osv_memory action pay_and_reconcile on module account.invoice.pay
--
- !python {model: account.invoice.pay}: |
- self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_firstpaymenttoaxelorforbasicpc0")],
- {"lang": 'en_US', "active_model": "account.invoice", "tz": False, "record_id":
- 25, "active_ids": [ref("account_invoice_1")], "type": "in_invoice", "active_id":
- ref("account_invoice_1"), })
--
- I check that the invoice state is still open
--
- !assert {model: account.invoice, id: account_invoice_1}:
- - state == 'open'
--
- I make final partial payment of 1000 by clicking on Pay Invoice button
--
- Creating a account.invoice.pay record
--
- !record {model: account.invoice.pay, id: account_invoice_pay_finalpaymenttoaxelorforbasicpc0}:
- amount: 1000.0
- date: '2010-06-17'
- journal_id: account.sales_journal
- name: Final Payment to Axelor for Basic PC
- period_id: account.period_5
-
-
--
- Performing an osv_memory action pay_and_reconcile on module account.invoice.pay
--
- !python {model: account.invoice.pay}: |
- self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_finalpaymenttoaxelorforbasicpc0")],
- {"lang": 'en_US', "active_model": "account.invoice", "tz": False, "record_id":
- 25, "active_ids": [ref("account_invoice_1")], "type": "in_invoice", "active_id":
- ref("account_invoice_1"), })
-
--
- I check that the invoice state is now Done
--
- !assert {model: account.invoice, id: account_invoice_1}:
- - state == 'paid'
+ !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_supplier0}
-
- I check that an payment entry gets created in the account.move.line
+ I check that the invoice state is now "Open"
-
- !python {model: account.invoice}: |
- acc_id=self.browse(cr, uid, ref("account_invoice_1"))
- assert(acc_id.move_id)
-#-
-# I refund the invoice
-#-
-# Creating a account.invoice.refund record
-#-
-# !record {model: account.invoice.refund, id: account_invoice_refund_0}:
-# date: '2010-06-22'
-# description: 'Refund By Axelor '
-#
-#
-#-
-# Performing an osv_memory action invoice_refund on module account.invoice.refund
-#-
-# !python {model: account.invoice.refund}: |
-# self.invoice_refund(cr, uid, [ref("account_invoice_refund_0")], {"lang": 'en_US',
-# "tz": False, "active_model": "account.invoice", "active_ids": [ref("account_invoice_1")],
-# "type": "in_invoice", "active_id": ref("account_invoice_1"), })
-
-
-
+ !assert {model: account.invoice, id: account_invoice_supplier0}:
+ - state == 'open'
\ No newline at end of file