summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorVir (Open ERP) <vir@tinyerp.com>2010-07-22 15:24:17 +0530
committerVir (Open ERP) <vir@tinyerp.com>2010-07-22 15:24:17 +0530
commit2b7e8d8e1be6c1204400ee99f0b76d2e091dfa4d (patch)
tree20c3135c179beca343305732ecd879f8f770e0bd /addons
parentf9410727480f6c83c1fc15d063c6af2c40168de9 (diff)
[MOD] point_of_sale : small changes
bzr revid: vir@tinyerp.com-20100722095417-vqxon8qjyv6in94m
Diffstat (limited to 'addons')
-rw-r--r--addons/point_of_sale/wizard/pos_payment.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py
index 02bfb37968d..9052655073f 100644
--- a/addons/point_of_sale/wizard/pos_payment.py
+++ b/addons/point_of_sale/wizard/pos_payment.py
@@ -158,8 +158,8 @@ class pos_make_payment(osv.osv_memory):
if order.invoice_id:
inv_ids.append(order.invoice_id.id)
# continue
-# if not make_obj.partner_id:
-# raise osv.except_osv(_('Error'), _('Please provide a partner for the sale.'))
+ if not make_obj.partner_id:
+ raise osv.except_osv(_('Error'), _('Please provide a partner for the sale.'))
acc= make_obj.partner_id.property_account_receivable.id
inv = {
'name': 'Invoice from POS: '+order_name,
@@ -224,7 +224,11 @@ class pos_make_payment(osv.osv_memory):
if order_obj.browse(cr, uid, [active_id]):
if make_obj.partner_id and make_obj.invoice_wanted:
order_obj.write(cr, uid, [active_id],{'state':'paid'})
- return {}
+ if context.get('return'):
+ order_obj.write(cr, uid, [active_id],{'state':'done'})
+ else:
+ order_obj.write(cr, uid, [active_id],{'state':'paid'})
+ return self.print_report(cr, uid, ids, context)
# return self.create_invoice(cr, uid, ids, context)
else:
context.update({'flag': True})