Merge lp:~openerp-dev/openobject-addons/6.0-opw-16968-ado into lp:openobject-addons/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Approved
Approved by: Rifakat Husen (OpenERP)
Approved revision: 4807
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-16968-ado
Merge into: lp:openobject-addons/6.0
Diff against target: 37 lines (+10/-2)
1 file modified
point_of_sale/wizard/pos_return.py (+10/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-16968-ado
Reviewer Review Type Date Requested Status
Rifakat Husen (OpenERP) (community) Approve
Naresh(OpenERP) Pending
Jay Vora (Serpent Consulting Services) Pending
Review via email: mp+74728@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Dear Amit,

Your fix treats the problem very well.

Thanks for your work,
Rifakat

review: Approve

Unmerged revisions

4807. By Amit Dodiya (OpenERP)

[FIX]: POS functionality for return wizard

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'point_of_sale/wizard/pos_return.py'
2--- point_of_sale/wizard/pos_return.py 2011-01-14 00:11:01 +0000
3+++ point_of_sale/wizard/pos_return.py 2011-09-09 07:39:24 +0000
4@@ -184,6 +184,8 @@
5 property_obj= self.pool.get("ir.property")
6 uom_obj =self. pool.get('product.uom')
7 statementl_obj = self.pool.get('account.bank.statement.line')
8+ tax_obj = self.pool.get('account.tax')
9+ cur_obj = self.pool.get('res.currency')
10 wf_service = netsvc.LocalService("workflow")
11 #Todo :Need to clean the code
12 if active_id:
13@@ -215,6 +217,12 @@
14 if line.id:
15 try:
16 qty = data['return%s' %line.id]
17+ if order_id.price_type == 'tax_excluded':
18+ for c in tax_obj.compute_all(cr, uid, line.product_id.taxes_id, \
19+ line.price_unit * (1-(line.discount or 0.0)/100.0), \
20+ qty, line.product_id, line.order_id.partner_id)['taxes']:
21+
22+ amount += c.get('amount', 0.0)
23 amount += qty * line.price_unit
24 except :
25 qty = line.qty
26@@ -223,9 +231,9 @@
27 'product_uos_qty': uom_obj._compute_qty(cr, uid, qty ,line.product_id.uom_id.id),
28 'picking_id': new_picking,
29 'product_uom': line.product_id.uom_id.id,
30- 'location_id': location_id,
31+ 'location_id': stock_dest_id,
32 'product_id': line.product_id.id,
33- 'location_dest_id': stock_dest_id,
34+ 'location_dest_id': location_id,
35 'name': '%s (return)' %order_id.name,
36 'date': date_cur
37 })