2011-09-25 17:04:16 +00:00
|
|
|
-
|
2012-08-16 08:42:24 +00:00
|
|
|
I create a new PoS order with 2 units of PC1 at 450 EUR (Tax Incl) and 3 units of PCSC349 at 300 EUR. (Tax Excl)
|
2011-09-25 17:04:16 +00:00
|
|
|
-
|
|
|
|
!record {model: pos.order, id: pos_order_pos1}:
|
|
|
|
company_id: base.main_company
|
2012-06-19 07:16:24 +00:00
|
|
|
partner_id: base.res_partner_1
|
2011-09-25 17:04:16 +00:00
|
|
|
lines:
|
|
|
|
- name: OL/0001
|
2012-06-29 11:04:24 +00:00
|
|
|
product_id: product.product_product_3
|
2011-09-25 17:04:16 +00:00
|
|
|
price_unit: 450
|
|
|
|
discount: 5.0
|
|
|
|
qty: 2.0
|
|
|
|
- name: OL/0002
|
2012-06-29 11:04:24 +00:00
|
|
|
product_id: product.product_product_4
|
2011-09-25 17:04:16 +00:00
|
|
|
price_unit: 300
|
|
|
|
discount: 5.0
|
|
|
|
qty: 3.0
|
|
|
|
-
|
|
|
|
I click on the "Make Payment" wizard to pay the PoS order
|
|
|
|
-
|
2011-11-17 10:05:44 +00:00
|
|
|
!record {model: pos.make.payment, id: pos_make_payment_2, context: '{"active_id": ref("pos_order_pos1"), "active_ids": [ref("pos_order_pos1")]}' }:
|
2011-09-25 17:04:16 +00:00
|
|
|
amount: !eval >
|
|
|
|
(450*2 + 300*3*1.05)*0.95
|
|
|
|
-
|
|
|
|
I click on the validate button to register the payment.
|
|
|
|
-
|
|
|
|
!python {model: pos.make.payment}: |
|
|
|
|
self.check(cr, uid, [ref('pos_make_payment_2')], context={'active_id': ref('pos_order_pos1')} )
|
|
|
|
- |
|
|
|
|
I check that the order is marked as paid and there is no invoice attached to it
|
|
|
|
-
|
|
|
|
!python {model: pos.order}: |
|
|
|
|
order = self.browse(cr,uid,ref('pos_order_pos1'))
|
|
|
|
-
|
|
|
|
!assert {model: pos.order, id: pos_order_pos1, string: State not correct}:
|
|
|
|
- state == 'paid'
|
|
|
|
- not invoice_id
|
|
|
|
-
|
[REM] removed details_summary, sales_user, sales_user_today, payment_user reports, wizards and rml
[REM] dead code: pos_box_entries.py/xml, pos_box_out.py/xml, pos_return_view.py/xml
[ADD] lines, invoice, cashbox of the day, payment, receipt, users product reports converted to QWeb. Added YML tests for the bank statement reports.
[FIX] closed cashbox of the day sql using old fields in its queries, yml test not correctly generating an invoice from a pos order
bzr revid: sle@openerp.com-20140414104954-xj10wi640tyr3ufe
2014-04-14 10:49:54 +00:00
|
|
|
I set the order as invoiced
|
2011-09-25 17:04:16 +00:00
|
|
|
-
|
|
|
|
!workflow {model: pos.order, action: invoice, ref: pos_order_pos1}
|
[REM] removed details_summary, sales_user, sales_user_today, payment_user reports, wizards and rml
[REM] dead code: pos_box_entries.py/xml, pos_box_out.py/xml, pos_return_view.py/xml
[ADD] lines, invoice, cashbox of the day, payment, receipt, users product reports converted to QWeb. Added YML tests for the bank statement reports.
[FIX] closed cashbox of the day sql using old fields in its queries, yml test not correctly generating an invoice from a pos order
bzr revid: sle@openerp.com-20140414104954-xj10wi640tyr3ufe
2014-04-14 10:49:54 +00:00
|
|
|
-
|
|
|
|
I generate an invoice from the order
|
|
|
|
-
|
|
|
|
!python {model: pos.order}: |
|
|
|
|
invoice = self.action_invoice(cr, uid, [ref('pos_order_pos1')])
|
2011-09-25 17:04:16 +00:00
|
|
|
-
|
|
|
|
I test that the total of the attached invoice is correct
|
|
|
|
-
|
[REM] removed details_summary, sales_user, sales_user_today, payment_user reports, wizards and rml
[REM] dead code: pos_box_entries.py/xml, pos_box_out.py/xml, pos_return_view.py/xml
[ADD] lines, invoice, cashbox of the day, payment, receipt, users product reports converted to QWeb. Added YML tests for the bank statement reports.
[FIX] closed cashbox of the day sql using old fields in its queries, yml test not correctly generating an invoice from a pos order
bzr revid: sle@openerp.com-20140414104954-xj10wi640tyr3ufe
2014-04-14 10:49:54 +00:00
|
|
|
!assert {model: pos.order, id: pos_order_pos1, string: Invoice inconsistent with its origin order}:
|
|
|
|
- invoice_id.amount_total == 1795.5
|