openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04866
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-742100-ron into lp:openobject-addons
Rohan Nayani(openerp) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-742100-ron into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #742100 in OpenERP Addons: "[6.0] sale: wrong price calculation when changing UoM and pricelist based on other pricelist"
https://bugs.launchpad.net/openobject-addons/+bug/742100
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-742100-ron/+merge/55734
https://launchpad.net/bugs/742100
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-742100-ron/+merge/55734
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-742100-ron.
=== modified file 'product/pricelist.py'
--- product/pricelist.py 2011-03-24 14:02:50 +0000
+++ product/pricelist.py 2011-03-31 11:26:40 +0000
@@ -234,6 +234,7 @@
[res['base_pricelist_id']], product_id,
qty, context=context)[res['base_pricelist_id']]
ptype_src = self.browse(cr, uid, res['base_pricelist_id']).currency_id.id
+ uom_price_already_computed = True
price = currency_obj.compute(cr, uid, ptype_src, res['currency_id'], price_tmp, round=False)
elif res['base'] == -2:
# this section could be improved by moving the queries outside the loop:
=== modified file 'sale/sale.py'
--- sale/sale.py 2011-02-22 09:27:33 +0000
+++ sale/sale.py 2011-03-31 11:26:40 +0000
@@ -1111,6 +1111,8 @@
result['product_uos_qty'] = qty
result['th_weight'] = q * product_obj.weight # Round the quantity up
+ if not uom:
+ uom =product_obj.uom_id and product_obj.uom_id.id
if not uom2:
uom2 = product_obj.uom_id
if (product_obj.type=='product') and (product_obj.virtual_available * uom2.factor < qty * product_obj.uom_id.factor) \
Follow ups