From f9fe63780347c73d70f8d6a0b36a02cdb3704941 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 27 Jul 2012 03:52:02 +0200 Subject: Remplace all occurences of my_browse_rec.product_id.product_tmpl_id.field to my_browse_rec.product_id.field bzr revid: alexis@via.ecp.fr-20120727015202-7fylff5jr26sgxez --- addons/analytic_user_function/analytic_user_function.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/analytic_user_function') diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index cfb1aba10d1..e446afc393d 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -85,10 +85,10 @@ class hr_analytic_timesheet(osv.osv): res.setdefault('value',{}) res['value']= super(hr_analytic_timesheet, self).on_change_account_id(cr, uid, ids, account_id)['value'] res['value']['product_id'] = r.product_id.id - res['value']['product_uom_id'] = r.product_id.product_tmpl_id.uom_id.id + res['value']['product_uom_id'] = r.product_id.uom_id.id #the change of product has to impact the amount, uom and general_account_id - a = r.product_id.product_tmpl_id.property_account_expense.id + a = r.product_id.property_account_expense.id if not a: a = r.product_id.categ_id.property_account_expense_categ.id if not a: @@ -123,7 +123,7 @@ class hr_analytic_timesheet(osv.osv): res['value']['product_id'] = r.product_id.id #the change of product has to impact the amount, uom and general_account_id - a = r.product_id.product_tmpl_id.property_account_expense.id + a = r.product_id.property_account_expense.id if not a: a = r.product_id.categ_id.property_account_expense_categ.id if not a: -- cgit v1.2.3