Amit Dodiya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-16968-ado into 
lp:openobject-addons/6.0.

Requested reviews:
  Jay Vora (OpenERP) (jvo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-16968-ado/+merge/74728

Hello Sir,

This fixes the following :

"[FIX] : On stock return with no exchange, the tax value is not hitting in Cash 
Register"

"[FIX]: On stock return, with no exchange, the particular returned stock is
not increasing in the stock location rather its decreasing again"

thanks,
Amit
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-16968-ado/+merge/74728
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-16968-ado.
=== modified file 'point_of_sale/wizard/pos_return.py'
--- point_of_sale/wizard/pos_return.py	2011-01-14 00:11:01 +0000
+++ point_of_sale/wizard/pos_return.py	2011-09-09 07:39:24 +0000
@@ -184,6 +184,8 @@
         property_obj= self.pool.get("ir.property")
         uom_obj =self. pool.get('product.uom')
         statementl_obj = self.pool.get('account.bank.statement.line')
+        tax_obj = self.pool.get('account.tax')
+        cur_obj = self.pool.get('res.currency')
         wf_service = netsvc.LocalService("workflow")
         #Todo :Need to clean the code
         if active_id:
@@ -215,6 +217,12 @@
                     if line.id:
                         try:
                             qty = data['return%s' %line.id]
+                            if order_id.price_type == 'tax_excluded':
+                            	for c in tax_obj.compute_all(cr, uid, line.product_id.taxes_id, \
+                                                 line.price_unit * (1-(line.discount or 0.0)/100.0), \
+                                                 qty, line.product_id, line.order_id.partner_id)['taxes']:
+                                                 
+                            		amount += c.get('amount', 0.0)
                             amount += qty * line.price_unit
                         except :
                             qty = line.qty
@@ -223,9 +231,9 @@
                             'product_uos_qty': uom_obj._compute_qty(cr, uid, qty ,line.product_id.uom_id.id),
                             'picking_id': new_picking,
                             'product_uom': line.product_id.uom_id.id,
-                            'location_id': location_id,
+                            'location_id': stock_dest_id,
                             'product_id': line.product_id.id,
-                            'location_dest_id': stock_dest_id,
+                            'location_dest_id': location_id,
                             'name': '%s (return)' %order_id.name,
                             'date': date_cur
                         })

_______________________________________________
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

Reply via email to