Merge lp:~openerp-dev/openobject-addons/trunk-bug-1082409-hip into lp:openobject-addons

Proposed by Hiral Patel (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1082409-hip
Merge into: lp:openobject-addons
Diff against target: 25 lines (+3/-1)
2 files modified
product_visible_discount/product_visible_discount.py (+2/-0)
sale/sale.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1082409-hip
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+141587@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

8484. By Hiral Patel (OpenERP)

[MERGE] Merge with lp:openobject-addons

8483. By Hiral Patel (OpenERP)

[trunk] Change the price based on uom change

8482. By Hiral Patel (OpenERP)

[trunk] Can not change UOM on Sales Order Line

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'product_visible_discount/product_visible_discount.py'
2--- product_visible_discount/product_visible_discount.py 2012-12-06 14:56:32 +0000
3+++ product_visible_discount/product_visible_discount.py 2013-01-02 09:18:24 +0000
4@@ -91,6 +91,8 @@
5 discount = (new_list_price - price) / new_list_price * 100
6 result['price_unit'] = new_list_price
7 result['discount'] = discount
8+ if uom != product.uom_id.id:
9+ result['price_unit'] = price
10 else:
11 result['discount'] = 0.0
12 return res
13
14=== modified file 'sale/sale.py'
15--- sale/sale.py 2012-12-21 16:48:08 +0000
16+++ sale/sale.py 2013-01-02 09:18:24 +0000
17@@ -918,7 +918,7 @@
18 elif uom: # whether uos is set or not
19 default_uom = product_obj.uom_id and product_obj.uom_id.id
20 q = product_uom_obj._compute_qty(cr, uid, uom, qty, default_uom)
21- result['product_uom'] = default_uom
22+ result['product_uom'] = uom
23 if product_obj.uos_id:
24 result['product_uos'] = product_obj.uos_id.id
25 result['product_uos_qty'] = qty * product_obj.uos_coeff

Subscribers

People subscribed via source and target branches

to all changes: