Hardik Ansodariya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-578168-han 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-578168-han/+merge/121756
Hello,
Fixed the issue of payment line from POS touch screen.
Step to reproduce:
Create a order of 10(EUR).
select a cash journal for payment and change to 5(EUR) to cash journal.
select a bank journal with rest of amount validate it.
Statement line will be created of cash journal only with 10 (EUR) but it should
create for both
cash journal and back journal with respective amount.
With reference of maintenance case: 578168.
Kindly review it.
Thanks
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-578168-han/+merge/121756
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-578168-han.
=== 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-08-29 06:45:24 +0000
@@ -64,13 +64,14 @@
list.append(order_id)
# 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)
+ for statement_id in statement_ids:
+ data = {
+ 'journal': statement_id[2]['journal_id'],
+ 'amount': statement_id[2]['amount'],
+ 'payment_name': order['name'],
+ 'payment_date': statement_ids[0][2]['name'],
+ }
+ order_obj.add_payment(cr, uid, order_id, data, context=context)
return list
def unlink(self, cr, uid, ids, context=None):
@@ -278,8 +279,12 @@
curr_company = curr_c.id
order = self.browse(cr, uid, order_id, context=context)
ids_new = []
+ if data['amount'] + order.amount_paid > order.amount_total:
+ amount = order.amount_total - order.amount_paid
+ else:
+ amount = data['amount']
args = {
- 'amount': data['amount'],
+ 'amount': amount,
}
if 'payment_date' in data.keys():
args['date'] = data['payment_date']
_______________________________________________
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