Remplace all occurences of my_browse_rec.product_id.product_tmpl_id.field to my_brows...
[odoo/odoo.git] / addons / hr_timesheet_invoice / wizard / hr_timesheet_invoice_create.py
index c9b2439..bf5fc1b 100644 (file)
@@ -117,7 +117,7 @@ class account_analytic_line(osv.osv):
 
                 taxes = product.taxes_id
                 tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
-                account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id
+                account_id = product.property_account_income.id or product.categ_id.property_account_income_categ.id
                 if not account_id:
                     raise osv.except_osv(_("Configuration Error"), _("No income account defined for product '%s'") % product.name)
                 curr_line = {