Somesh Khare(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-581461-skh 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-581461-skh/+merge/132866

Hello Sir,

[FIX]POS: Multi payments journal are not recorded as required.

In the Point of Sale environment when you make payment through multi Journal 
the Payment shows on the view eg: If you create sale order with any producy 
with the price 100$ and try to pay this in Sale Journal as 50 and Cash Journal 
as 50. You will see the journal on the POS view. But in POS Backend when you 
open the Order the payment tab have the entry for the 1st journal with the 
amount 100, where it should have the entry for the selected journal.

Steps:
1. Create POS order with any product.
2. Try to make payment with multiple journals.
3. Validate the Order.
4. Open "PoS Backend/Reporting/All Sales Orders" and the Order see the payment 
tab.

This branch fixes this issue. Please share your view on it.

Thanks & Regards,
Somesh Khare
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-581461-skh/+merge/132866
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-581461-skh.
=== 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-11-05 10:55:26 +0000
@@ -61,16 +61,17 @@
             # the module behavior is the same when using the front-end or the back-end
             statement_ids = order.pop('statement_ids')
             order_id = self.create(cr, uid, order, context)
-            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 payments in statement_ids:
+                payment = payments[2]
+                order_obj.add_payment(cr, uid, order_id, data = {
+                    'journal': payment['journal_id'],
+                    'amount': payment['amount'],
+                    'payment_name': payment['name'],
+                    'payment_date': payment['name'],
+                }, context=context)
+            list.append(order_id)
         return list
 
     def unlink(self, cr, uid, ids, context=None):

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to