From 3cb540be3962a3415db094e165af4c675201a94a Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 14 May 2010 15:02:50 +0530 Subject: [PATCH] [IMP] point_of_sale: improve the yml bzr revid: sbh@tinyerp.com-20100514093250-g60bdqefpwp7bcsx --- addons/point_of_sale/test/pos_test.yml | 19 +++++++++++++++++-- addons/point_of_sale/wizard/pos_payment.py | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/test/pos_test.yml b/addons/point_of_sale/test/pos_test.yml index 42bcc515ca4..b61de0613d4 100644 --- a/addons/point_of_sale/test/pos_test.yml +++ b/addons/point_of_sale/test/pos_test.yml @@ -335,6 +335,7 @@ product_id: product_product_lgviewtysmart0 qty: 10.0 qty_rfd: 0.0 + partner_id: base.res_partner_agrolait name: POS/001 price_type: tax_excluded pricelist_id: product.list0 @@ -461,5 +462,19 @@ - !python {model: pos.return}: | self.create_returns2(cr, uid, [ref("pos_return_0")], {"lang": "en_US", "active_model": - "pos.order", "active_ids": [ref("point_of_sale.pos_order_pos0")], "tz": - False, "active_id": ref("point_of_sale.pos_order_pos0"), }) + "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": + False, "active_id": ref("pos_order_pos0"), }) +- + Creating a pos.confirm record +- + !record {model: pos.confirm, id: pos_confirm_0}: + {} + +- + I have close this order +- + !python {model: pos.confirm}: | + self.action_confirm(cr, uid, [ref("pos_confirm_0")], {"lang": "en_US", "active_model": + "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"), + }) + diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py index b20d3db8b5e..d7cb3414814 100644 --- a/addons/point_of_sale/wizard/pos_payment.py +++ b/addons/point_of_sale/wizard/pos_payment.py @@ -112,7 +112,7 @@ class pos_make_payment(osv.osv_memory): order = self.pool.get('pos.order').browse(cr, uid, active_id) if order.amount_total == order.amount_paid: - res['arch'] = """
+ result['arch'] = """