summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2014-12-12 15:46:54 +0100
committerDenis Ledoux <dle@odoo.com>2014-12-12 15:46:54 +0100
commit8ef286a12cb4e2e0fa45f7e17d7f59e838ca1677 (patch)
treecc09af6258761e4647092db0733095aa2dda2ed6
parent0b6078dfea9cd60f7273e431fe52dd8ff4863607 (diff)
parent162eb8443801fa7dbe8d3c4c48c17313d7c97f25 (diff)
[MERGE] forward port of branch saas-3 up to 162eb84
-rw-r--r--addons/sale_margin/sale_margin.py5
-rw-r--r--openerp/addons/base/res/res_country_data.xml2
2 files changed, 2 insertions, 5 deletions
diff --git a/addons/sale_margin/sale_margin.py b/addons/sale_margin/sale_margin.py
index b5c1821ab98..ec1bd83dd50 100644
--- a/addons/sale_margin/sale_margin.py
+++ b/addons/sale_margin/sale_margin.py
@@ -52,10 +52,7 @@ class sale_order_line(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
res[line.id] = 0
if line.product_id:
- if line.purchase_price:
- res[line.id] = round((line.price_unit*line.product_uos_qty*(100.0-line.discount)/100.0) -(line.purchase_price*line.product_uos_qty), 2)
- else:
- res[line.id] = round((line.price_unit*line.product_uos_qty*(100.0-line.discount)/100.0) -(line.product_id.standard_price*line.product_uos_qty), 2)
+ res[line.id] = round(line.price_subtotal - ((line.purchase_price or line.product_id.standard_price) * line.product_uos_qty), 2)
return res
_columns = {
diff --git a/openerp/addons/base/res/res_country_data.xml b/openerp/addons/base/res/res_country_data.xml
index 1bdd6a73460..b0f1863b2d3 100644
--- a/openerp/addons/base/res/res_country_data.xml
+++ b/openerp/addons/base/res/res_country_data.xml
@@ -948,7 +948,7 @@
<field name="name">Malaysia</field>
<field name="code">my</field>
<field name="image" type="base64" file="base/static/img/country_flags/my.png"></field>
- <field name="currency_id" ref="MXN"/>
+ <field name="currency_id" ref="MYR"/>
</record>
<record id="mz" model="res.country">
<field name="name">Mozambique</field>