From 603126eb1d38e5ee9d9e51ea9183f8e2fbd2a516 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 30 Aug 2010 11:49:10 +0530 Subject: [PATCH] [FIX] Account: YAML for pay invoice wizard removed so update the yaml bzr revid: mra@mra-laptop-20100830061910-ayli8equauj3m7ur --- .../account/test/account_customer_invoice.yml | 86 ------------------- .../account/test/account_supplier_invoice.yml | 53 +----------- 2 files changed, 1 insertion(+), 138 deletions(-) diff --git a/addons/account/test/account_customer_invoice.yml b/addons/account/test/account_customer_invoice.yml index f8798d7d9e3..1084c76f4d2 100644 --- a/addons/account/test/account_customer_invoice.yml +++ b/addons/account/test/account_customer_invoice.yml @@ -54,89 +54,3 @@ !python {model: account.invoice}: | acc_id=self.browse(cr, uid, ref("account_invoice_customer0")) assert acc_id.move_id, "Move created" -- - I create a record for partial payment of 1000 EUR. -- - !record {model: account.invoice.pay, id: account_invoice_pay_first0}: - amount: 1000.0 - date: '2010-05-26' - journal_id: account.sales_journal - name: First payment for [PC3] Medium PC to Distrib PC - period_id: account.period_5 -- - I make partial payment by clicking on Partial Payment button -- - !python {model: account.invoice.pay}: | - self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_first0")], {"lang": - 'en_US', "active_model": "account.invoice", "tz": False, "record_id": 3, "active_ids": - [ref("account_invoice_customer0")], "type": "out_invoice", "active_id": ref("account_invoice_customer0"), - }) -- - I check that the invoice state is still open -- - !assert {model: account.invoice, id: account_invoice_customer0}: - - state == 'open' -- - I make second partial payment of 6000 EUR. -- - !record {model: account.invoice.pay, id: account_invoice_pay_second0}: - amount: 6000.0 - date: '2010-05-28' - journal_id: account.sales_journal - name: Second payment for [PC3] Medium PC to Distrib PC - period_id: account.period_5 -- - I make partial payment by clicking on Partial Payment button - -- - !python {model: account.invoice.pay}: | - self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_second0")], {"lang": - 'en_US', "active_model": "account.invoice", "tz": False, "record_id": 3, "active_ids": - [ref("account_invoice_customer0")], "type": "out_invoice", "active_id": ref("account_invoice_customer0"), - }) -- - I make final partial payment of 2000 EUR -- - !record {model: account.invoice.pay, id: account_invoice_pay_final0}: - amount: 2000.0 - date: '2010-05-30' - journal_id: account.sales_journal - name: Final payment for [PC3] Medium PC to Distrib PC - period_id: account.period_5 - -- - I make partial payment by clicking on Partial Payment button - -- - !python {model: account.invoice.pay}: | - self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_final0")], {"lang": - 'en_US', "active_model": "account.invoice", "tz": False, "record_id": 3, "active_ids": - [ref("account_invoice_customer0")], "type": "out_invoice", "active_id": ref("account_invoice_customer0"), - }) - -- - I check that the invoice state is now Done -- - !assert {model: account.invoice, id: account_invoice_customer0}: - - state == 'paid' -- - I check that an payment entry gets created in the account.move.line -- - !python {model: account.invoice}: | - acc_id=self.browse(cr, uid, ref("account_invoice_customer0")) - assert(acc_id.move_id) -- - I refund the invoice Using Refund Button -- - !record {model: account.invoice.refund, id: account_invoice_refund_0}: - description: Refund To China Export - period: account.period_5 -- - I clicked on refund button -- - !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.account_invoice_customer0")], "type": "out_invoice", "active_id": ref("account.account_invoice_customer0"), }) -- - I checked that a new entry with state "Draft" created in account move line - - diff --git a/addons/account/test/account_supplier_invoice.yml b/addons/account/test/account_supplier_invoice.yml index c5ed0087a92..7d1a54cffd6 100644 --- a/addons/account/test/account_supplier_invoice.yml +++ b/addons/account/test/account_supplier_invoice.yml @@ -32,55 +32,4 @@ I check that the invoice state is now "Open" - !assert {model: account.invoice, id: account_invoice_supplier0}: - - state == 'open' -- - I make a partial payment of 2000 EUR -- - !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 -- - I make partial payment by clicking on Partial Payment button -- - !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_supplier0")], "type": "in_invoice", "active_id": - ref("account_invoice_supplier0"), }) -- - I check that the invoice state is still "Open" -- - !assert {model: account.invoice, id: account_invoice_supplier0}: - - state == 'open' -- - I make final partial payment of 1000 EUR -- - !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 -- - I make partial payment by clicking on Partial Payment button -- - !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_supplier0")], "type": "in_invoice", "active_id": - ref("account_invoice_supplier0"), }) - -- - I check that the invoice state is now "Done" -- - !assert {model: account.invoice, id: account_invoice_supplier0}: - - state == 'paid' -- - I check that an payment entry gets created in the account move line -- - !python {model: account.invoice}: | - acc_id=self.browse(cr, uid, ref("account_invoice_supplier0")) - assert(acc_id.move_id) + - state == 'open' \ No newline at end of file