From b189887a46aada97504a1319a4e709dd2daa6e68 Mon Sep 17 00:00:00 2001 From: "Darshan Kalola (OpenERP)" Date: Wed, 15 Jan 2014 15:12:20 +0530 Subject: [PATCH] [IMP]remove unnecessary yml change from point of sale and keep as it is. bzr revid: dka@tinyerp.com-20140115094220-w708vknkeh913r9x --- addons/point_of_sale/test/01_order_to_payment.yml | 14 +++++++------- addons/point_of_sale/test/02_order_to_invoice.yml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/point_of_sale/test/01_order_to_payment.yml b/addons/point_of_sale/test/01_order_to_payment.yml index 1f2713763c4..bf201affc4a 100644 --- a/addons/point_of_sale/test/01_order_to_payment.yml +++ b/addons/point_of_sale/test/01_order_to_payment.yml @@ -81,12 +81,12 @@ discount: 0.0 qty: 3.0 - - I check that the total of the order is equal to 450*2 + 300*3*1.10 and the tax of the order is equal to 900 -(450 * 2) + 300*1.10*3 + I check that the total of the order is equal to 450*2 + 300*3*1.05 and the tax of the order is equal to 900 -(450 * 2 / 1.1) + 300*0.05*3 - !python {model: pos.order}: | order = self.browse(cr, uid, ref('pos_order_pos0')) - assert(abs(order.amount_total - (450*2 + 300*3*1.10)) < 0.01), "The order has a wrong amount, tax included" - assert(abs(order.amount_tax - (900-(450*2) + 300*0.10*3)) < 0.01), "The order has a wrong tax amount" + assert(abs(order.amount_total - (450*2 + 300*3*1.05)) < 0.01), "The order has a wrong amount, tax included" + assert(abs(order.amount_tax - (900-(450*2/1.1) + 300*0.05*3)) < 0.01), "The order has a wrong tax amount" - I want to add a global discount of 5 percent using the wizard - @@ -99,11 +99,11 @@ self.apply_discount(cr, uid, [ref("pos_discount_0")], {"active_model": "pos.order", "active_ids": [ref("pos_order_pos0")], "active_id": ref("pos_order_pos0"), }) - - I check that the total of the order is now equal to (450*2 + 300*3*1.10)*0.95 + I check that the total of the order is now equal to (450*2 + 300*3*1.05)*0.95 - !python {model: pos.order}: | order = self.browse(cr, uid, ref('pos_order_pos0')) - assert(abs(order.amount_total - (450*2 + 300*3*1.10)*0.95) < 0.01), "The order has a wrong total including tax and discounts" + assert(abs(order.amount_total - (450*2 + 300*3*1.05)*0.95) < 0.01), "The order has a wrong total including tax and discounts" - I click on the "Make Payment" wizard to pay the PoS order with a partial amount of 100.0 EUR - @@ -124,13 +124,13 @@ - !python {model: pos.make.payment}: | defs = self.default_get(cr, uid, ['amount'], {'active_id': ref('pos_order_pos0')}) - assert abs(defs['amount'] - ((450*2 + 300*3*1.10)*0.95-100.0)) < 0.01, "The remaining balance is incorrect" + assert abs(defs['amount'] - ((450*2 + 300*3*1.05)*0.95-100.0)) < 0.01, "The remaining balance is incorrect" - I pay the remaining balance. - !record {model: pos.make.payment, id: pos_make_payment_1, context: '{"active_id": ref("pos_order_pos0"), "active_ids": [ref("pos_order_pos0")]}' }: amount: !eval > - (450*2 + 300*3*1.10)*0.95-100.0 + (450*2 + 300*3*1.05)*0.95-100.0 - I click on the validate button to register the payment. - diff --git a/addons/point_of_sale/test/02_order_to_invoice.yml b/addons/point_of_sale/test/02_order_to_invoice.yml index c7b45ed11ce..bd76eb08a9c 100644 --- a/addons/point_of_sale/test/02_order_to_invoice.yml +++ b/addons/point_of_sale/test/02_order_to_invoice.yml @@ -20,7 +20,7 @@ - !record {model: pos.make.payment, id: pos_make_payment_2, context: '{"active_id": ref("pos_order_pos1"), "active_ids": [ref("pos_order_pos1")]}' }: amount: !eval > - (450*2 + 300*3*1.10)*0.95 + (450*2 + 300*3*1.05)*0.95 - I click on the validate button to register the payment. - @@ -43,4 +43,4 @@ I test that the total of the attached invoice is correct - !assert {model: pos.order, id: pos_order_pos1, string: Invoice not correct}: - - amount_total == (450*2 + 300*3*1.10)*0.95 + - amount_total == (450*2 + 300*3*1.05)*0.95