[IMP] account_payment: Improved sentence formation in ymls.
bzr revid: uco@tinyerp.com-20111222060253-5yf56zm2jkx6fctt
This commit is contained in:
parent
8ff2693b8f
commit
a8e600ed71
|
@ -52,8 +52,8 @@ This module provides :
|
|||
'demo_xml': ['account_payment_demo.xml'],
|
||||
'test': [
|
||||
'test/account_payment_demo.yml',
|
||||
'test/draft2cancel_payment_order.yml',
|
||||
'test/draft2done_payment_order.yml',
|
||||
'test/cancel_payment_order.yml',
|
||||
'test/payment_order_process.yml',
|
||||
'test/account_payment_report.yml'
|
||||
],
|
||||
'installable': True,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
-
|
||||
In order to test the PDF reports defined on Account Payment, Print a Payment Order
|
||||
In order to test the PDF reports defined on Account Payment, I print a Payment Order report.
|
||||
-
|
||||
!python {model: payment.order}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.payment.order').create(cr, uid, [ref('payment_order_1')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account_payment-payment_order_report.'+format), 'wb+').write(data)
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account_payment-payment_order_report.'+format), 'wb+').write(data)
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
-
|
||||
In order to test the process of cancelling the payment order,
|
||||
-
|
||||
I confirm payment order.
|
||||
-
|
||||
!workflow {model: payment.order, action: open, ref: payment_order_1}
|
||||
-
|
||||
I check that payment order is now "Confirmed".
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be 'Confirmed'.}:
|
||||
- state == 'open'
|
||||
-
|
||||
Now, I cancel the payment order.
|
||||
-
|
||||
!workflow {model: payment.order, action: cancel, ref: payment_order_1}
|
||||
-
|
||||
I check that payment order is now "Cancelled".
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be 'Cancelled'.}:
|
||||
- state == 'cancel'
|
||||
-
|
||||
I again set the payment order to draft.
|
||||
-
|
||||
!python {model: payment.order}: |
|
||||
self.set_to_draft(cr, uid, [ref("payment_order_1")])
|
||||
-
|
||||
I check that payment order is now "Draft".
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be in 'Draft' state.}:
|
||||
- state == 'draft'
|
|
@ -1,30 +0,0 @@
|
|||
-
|
||||
In order to test the process of payment order
|
||||
-
|
||||
I confirm payment order.
|
||||
-
|
||||
!workflow {model: payment.order, action: open, ref: payment_order_1}
|
||||
-
|
||||
I check that Payment order is now "Confirmed".
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be 'Confirmed' state}:
|
||||
- state == 'open'
|
||||
-
|
||||
In order to not payment line so I perform action to change the state of payment order to "cancel".
|
||||
-
|
||||
!workflow {model: payment.order, action: cancel, ref: payment_order_1}
|
||||
-
|
||||
I check that Payment order is now "cancelled".
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be in 'Confirmed' state}:
|
||||
- state == 'cancel'
|
||||
-
|
||||
I set the payment order in "Draft" state.
|
||||
-
|
||||
!python {model: payment.order}: |
|
||||
self.set_to_draft(cr, uid, [ref("payment_order_1")])
|
||||
-
|
||||
I check that Payment order is now "draft".
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be in 'Draft' state}:
|
||||
- state == 'draft'
|
|
@ -1,16 +1,16 @@
|
|||
-
|
||||
In order to test the process of supplier invoice, I enter the amount for a total of invoice
|
||||
In order to test the process of payment order, I start with the supplier invoice.
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
self.write(cr, uid, [ref('account.demo_invoice_0')], {'check_total': 14})
|
||||
-
|
||||
In order to test account move line of journal, I check that there is no move attached to the invoice at draft
|
||||
In order to test account move line of journal, I check that there is no move attached to the invoice.
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
invoice = self.browse(cr, uid, ref("account.demo_invoice_0"))
|
||||
assert (not invoice.move_id), "Move wrongly created at draft"
|
||||
assert (not invoice.move_id), "Moves are wrongly created for invoice."
|
||||
-
|
||||
I change the state of invoice to "open".
|
||||
I open the invoice.
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account.demo_invoice_0}
|
||||
-
|
||||
|
@ -19,28 +19,26 @@
|
|||
!assert {model: account.invoice, id: account.demo_invoice_0, severity: error, string: Invoice should be in 'Open' state}:
|
||||
- state == 'open'
|
||||
-
|
||||
I change the state of Payment Order to "Confirmed".
|
||||
I confirm the payment order.
|
||||
-
|
||||
!workflow {model: payment.order, action: open, ref: payment_order_1}
|
||||
-
|
||||
I check that Payment order is now "Confirmed".
|
||||
I check that payment order is now "Confirmed".
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be in 'Confirmed' state}:
|
||||
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be 'Confirmed'.}:
|
||||
- state == 'open'
|
||||
-
|
||||
I create a record for payment order create.
|
||||
-
|
||||
!record {model: payment.order.create, id: payment_order_create_0}:
|
||||
duedate: !eval time.strftime('%Y-%m-%d')
|
||||
-
|
||||
I perform a action to search the entries for create a payment line
|
||||
I search for the invoice entries to make the payment.
|
||||
-
|
||||
!python {model: payment.order.create}: |
|
||||
self.search_entries(cr, uid, [ref("payment_order_create_0")], {
|
||||
"active_model": "payment.order", "active_ids": [ref("payment_order_1")],
|
||||
"active_id": ref("payment_order_1"), })
|
||||
-
|
||||
In order to make entries in payment line, I create a entries.
|
||||
I create payment lines entries.
|
||||
-
|
||||
!python {model: payment.order.create}: |
|
||||
invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account.demo_invoice_0"))
|
||||
|
@ -50,7 +48,7 @@
|
|||
"active_model": "payment.order", "active_ids": [ref("payment_order_1")],
|
||||
"active_id": ref("payment_order_1")})
|
||||
-
|
||||
I check a payment line is created with proper data.
|
||||
I check that payment line is created with proper data.
|
||||
-
|
||||
!python {model: payment.order}: |
|
||||
invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account.demo_invoice_0"))
|
||||
|
@ -59,27 +57,27 @@
|
|||
|
||||
assert payment_line.move_line_id, "move line is not created in payment line."
|
||||
assert invoice.move_id.name == payment_line.ml_inv_ref.number, "invoice reference number is not same created."
|
||||
assert invoice.partner_id == payment_line.partner_id, "partner is not same created."
|
||||
assert invoice.date_due == payment_line.ml_maturity_date, "due date is not same created."
|
||||
assert invoice.amount_total == payment_line.amount, "payment amount is not same created."
|
||||
assert invoice.partner_id == payment_line.partner_id, "Partner is not correct."
|
||||
assert invoice.date_due == payment_line.ml_maturity_date, "Due date is not correct."
|
||||
assert invoice.amount_total == payment_line.amount, "Payment amount is not correct."
|
||||
-
|
||||
I change the state of payment order to "done".
|
||||
After making all payments, I finish the payment order.
|
||||
-
|
||||
!python {model: payment.order}: |
|
||||
self.set_done(cr, uid, [ref("payment_order_1")])
|
||||
-
|
||||
I check that Payment order is now "done".
|
||||
I check that payment order is now "Done".
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be in 'Done' state}:
|
||||
- state == 'done'
|
||||
-
|
||||
I check a payment order is done with proper data.
|
||||
I check that payment order is done with proper data.
|
||||
-
|
||||
!python {model: payment.order}: |
|
||||
payment = self.browse(cr, uid, ref("payment_order_1"))
|
||||
assert payment.date_done, "date is not created after done payment order"
|
||||
assert payment.date_done, "Date is not created."
|
||||
-
|
||||
I create a record for bank statement.
|
||||
I create a bank statement.
|
||||
-
|
||||
!record {model: account.bank.statement, id: account_bank_statement_1}:
|
||||
balance_end_real: 0.0
|
||||
|
@ -89,7 +87,7 @@
|
|||
name: /
|
||||
period_id: account.period_10
|
||||
-
|
||||
In order to make entries in bank statement line, I import payment order lines.
|
||||
I import payment order lines for the bank statement.
|
||||
-
|
||||
!python {model: account.payment.populate.statement}: |
|
||||
payment = self.pool.get('payment.order').browse(cr, uid, ref("payment_order_1"))
|
||||
|
@ -106,4 +104,4 @@
|
|||
line_id = self.browse(cr, uid,payment.line_ids[0].id,context)
|
||||
assert line_id.info_owner, "Owner Account not proper."
|
||||
assert line_id.info_partner, "Destination Account not proper."
|
||||
assert line_id.ml_inv_ref, "Invoice reference is not proper."
|
||||
assert line_id.ml_inv_ref, "Invoice reference is not proper."
|
Loading…
Reference in New Issue