diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-12-29 14:53:39 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2016-12-29 14:54:06 +0100 |
| commit | 3667516a749c7056aa263b3c82679f526fff8cb2 (patch) | |
| tree | d7e063a4a295d1137a48e0ece541b80040e99f0a | |
| parent | 1879964116b9ca6635f46ef640748198832bd6a6 (diff) | |
[FIX] product_margin: computed values
After commit 9a479e6572, all values in the report are 0.0.
opw-695649
| -rw-r--r-- | addons/product_margin/models/product_product.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/product_margin/models/product_product.py b/addons/product_margin/models/product_product.py index 59127738157..64ae6c4f7a6 100644 --- a/addons/product_margin/models/product_product.py +++ b/addons/product_margin/models/product_product.py @@ -144,4 +144,6 @@ class ProductProduct(models.Model): res[val.id]['total_margin_rate'] = res[val.id]['turnover'] and res[val.id]['total_margin'] * 100 / res[val.id]['turnover'] or 0.0 if 'expected_margin_rate' in field_names: res[val.id]['expected_margin_rate'] = res[val.id]['sale_expected'] and res[val.id]['expected_margin'] * 100 / res[val.id]['sale_expected'] or 0.0 + for k, v in res[val.id].items(): + setattr(val, k, v) return res |
