From 75d7bbb46e100b7ffda091a11183d4ed14d3bbed Mon Sep 17 00:00:00 2001 From: Mahendra barad Date: Thu, 14 May 2015 15:31:34 +0530 Subject: [REF]Account: Refactoring the account, Change some fields name according to new api guidelines code improvement code improvement payment_method to payment_method_id writeoff_account to writeoff_account_id property_account_receivable to property_account_receivable_id property_account_payable to property_account_payable_id property_account_expense_categ to property_account_expense_categ_id property_account_income_categ to property_account_income_categ_id property_account_expense to property_account_expense_id property_account_income to property_account_income_id property_account_expense_categ fix sale_tax to sale_tax_id and default_sale_tax to default_sale_tax_id purchase_tax to purchase_tax_id and default_purchase_tax to default_purchase_tax_id ref_companies to ref_companies_ids property_account_position to property_account_position_id property_payment_term to property_payment_term_id property_supplier_payment_term to property_supplier_payment_term_id bank_accounts_id to bank_accounts_ids payment_method fix after rebase user_type after rebase payment_method fix after rebase after rebase invoice to invoice_id fix payment_method_id after rebase code improvement [IMP]user_type to user_type_id [IMP]property_stock_account_input_categ, property_stock_account_output_categ to _id [IMP]improve after rebase [IMP]fix type [IMP]Account: code improvement --- addons/analytic_user_function/analytic_user_function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 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 0b9c48a7dbb..c0e3c7f9c88 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -100,9 +100,9 @@ class account_analytic_line(osv.osv): res['product_id'] = product.id res['uom_id'] = product.uom_id.id - expense_account = product.property_account_expense.id + expense_account = product.property_account_expense_id.id if not expense_account: - expense_account = product.categ_id.property_account_expense_categ.id + expense_account = product.categ_id.property_account_expense_categ_id.id if not expense_account: raise UserError(_('There is no expense account defined for this product: "%s" (id:%d)') % (product.name, product.id,)) res['general_account_id'] = expense_account -- cgit v1.2.3