Merge lp:~unifield-team/unifield-server/us-1110 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 3893
Proposed branch: lp:~unifield-team/unifield-server/us-1110
Merge into: lp:unifield-server
Diff against target: 44 lines (+6/-6)
2 files modified
bin/addons/purchase_followup/purchase_followup.py (+3/-3)
bin/addons/purchase_followup/sale_purchase.py (+3/-3)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-1110
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+300726@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/purchase_followup/purchase_followup.py'
--- bin/addons/purchase_followup/purchase_followup.py 2014-05-14 14:04:42 +0000
+++ bin/addons/purchase_followup/purchase_followup.py 2016-07-21 08:32:14 +0000
@@ -42,15 +42,15 @@
42 Return the shipped rate of a PO line42 Return the shipped rate of a PO line
43 '''43 '''
44 uom_obj = self.pool.get('product.uom')44 uom_obj = self.pool.get('product.uom')
45 line_value = line.price_subtotal45 line_value = line.product_qty
46 move_value = 0.0046 move_value = 0.00
47 for move in line.move_ids:47 for move in line.move_ids:
48 if move.state == 'done':48 if move.state == 'done':
49 product_qty = uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, line.product_uom.id)49 product_qty = uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, line.product_uom.id)
50 if move.type == 'out':50 if move.type == 'out':
51 move_value -= product_qty*move.price_unit51 move_value -= product_qty
52 elif move.type == 'in':52 elif move.type == 'in':
53 move_value += product_qty*move.price_unit53 move_value += product_qty
5454
55 return round((move_value/line_value)*100, 2)55 return round((move_value/line_value)*100, 2)
5656
5757
=== modified file 'bin/addons/purchase_followup/sale_purchase.py'
--- bin/addons/purchase_followup/sale_purchase.py 2014-03-14 10:29:03 +0000
+++ bin/addons/purchase_followup/sale_purchase.py 2016-07-21 08:32:14 +0000
@@ -44,14 +44,14 @@
44 amount_total = 0.0044 amount_total = 0.00
45 amount_received = 0.0045 amount_received = 0.00
46 for line in order.order_line:46 for line in order.order_line:
47 amount_total += line.product_qty*line.price_unit47 amount_total += line.product_qty
48 for move in line.move_ids:48 for move in line.move_ids:
49 if move.state == 'done':49 if move.state == 'done':
50 move_qty = uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, line.product_uom.id)50 move_qty = uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, line.product_uom.id)
51 if move.type == 'out':51 if move.type == 'out':
52 amount_received -= move_qty*line.price_unit52 amount_received -= move_qty
53 elif move.type == 'in':53 elif move.type == 'in':
54 amount_received += move_qty*line.price_unit54 amount_received += move_qty
55 elif move.type == 'internal':55 elif move.type == 'internal':
56 # not taken into account56 # not taken into account
57 pass57 pass

Subscribers

People subscribed via source and target branches

to all changes: