diff options
| author | Martin Trigaux <mat@odoo.com> | 2015-10-20 08:53:40 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2015-10-20 08:53:40 +0200 |
| commit | eca1983aef4ca7db04ddd469e1512fe93155a692 (patch) | |
| tree | 7075095bde62651761f28b3a3228175af981d3cf /addons/account/models/account_analytic_line.py | |
| parent | f75dcfe4b0eab32cc23784974b623def87aa468b (diff) | |
[FIX] account: analytic entries onchange
Broken on_change, comparing id and recordset
Fixes #9144
Diffstat (limited to 'addons/account/models/account_analytic_line.py')
| -rw-r--r-- | addons/account/models/account_analytic_line.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/account/models/account_analytic_line.py b/addons/account/models/account_analytic_line.py index 68ac8cbff8a..0152730f22f 100644 --- a/addons/account/models/account_analytic_line.py +++ b/addons/account/models/account_analytic_line.py @@ -27,16 +27,16 @@ class AccountAnalyticLine(models.Model): result = 0.0 prod_accounts = self.product_id.product_tmpl_id._get_product_accounts() - unit = self.product_uom_id.id + unit = self.product_uom_id account = prod_accounts['expense'] if not unit or self.product_id.uom_po_id.category_id.id != unit.category_id.id: - unit = self.product_id.uom_po_id.id + unit = self.product_id.uom_po_id ctx = dict(self._context or {}) if unit: # price_get() will respect a 'uom' in its context, in order # to return a default price for those units - ctx['uom'] = unit + ctx['uom'] = unit.id # Compute based on pricetype amount_unit = self.product_id.with_context(ctx).price_get('standard_price')[self.product_id.id] |
