Kirti Savalia(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-576829-ksa into
lp:openobject-addons/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576829-ksa/+merge/114827
Hello,
Fixed the problem multiple payment types for point of sale does not work.
steps to reproduce
---------------------
selecting 2 payment types for a Point of Sale order.
eg. payment total = R35.
Payments made = R10 Cash and R25 Credit Card.
only has payment of $35 cash instead of both Cash and Credit Card.
Thanks
KSA
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576829-ksa/+merge/114827
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-576829-ksa.
=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py 2012-02-13 16:12:01 +0000
+++ point_of_sale/point_of_sale.py 2012-07-13 10:31:18 +0000
@@ -62,15 +62,16 @@
statement_ids = order.pop('statement_ids')
order_id = self.create(cr, uid, order, context)
list.append(order_id)
+ for data in statement_ids:
# call add_payment; refer to wizard/pos_payment for data structure
# add_payment launches the 'paid' signal to advance the workflow to the 'paid' state
- data = {
- 'journal': statement_ids[0][2]['journal_id'],
- 'amount': order['amount_paid'],
- 'payment_name': order['name'],
- 'payment_date': statement_ids[0][2]['name'],
- }
- order_obj.add_payment(cr, uid, order_id, data, context=context)
+ data = {
+ 'journal': data[2]['journal_id'],
+ 'amount': data[2]['amount'],
+ 'payment_name': order['name'],
+ 'payment_date': data[2]['name'],
+ }
+ order_obj.add_payment(cr, uid, order_id, data, context=context)
return list
def unlink(self, cr, uid, ids, context=None):
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp