diff options
| author | Mahendra barad <mba@openerp.com> | 2015-05-14 15:31:34 +0530 |
|---|---|---|
| committer | Josse Colpaert <jco@odoo.com> | 2015-06-23 14:00:43 +0200 |
| commit | 75d7bbb46e100b7ffda091a11183d4ed14d3bbed (patch) | |
| tree | 107ccd62ba2aef250d3110dd9070996ec4ecf668 /addons/account_analytic_analysis/account_analytic_analysis.py | |
| parent | bfbc22cdc20c88889661bb68d6321ec61fda4d0b (diff) | |
[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
Diffstat (limited to 'addons/account_analytic_analysis/account_analytic_analysis.py')
| -rw-r--r-- | addons/account_analytic_analysis/account_analytic_analysis.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index ba787c038c0..5c6c682f79a 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -660,7 +660,7 @@ class account_analytic_account(osv.osv): if not journal_ids: raise UserError(_('Please define a sale journal for the company "%s".') % (contract.company_id.name or '', )) - partner_payment_term = partner.property_payment_term and partner.property_payment_term.id or False + partner_payment_term = partner.property_payment_term_id and partner.property_payment_term_id.id or False currency_id = False if contract.pricelist_id: @@ -671,7 +671,7 @@ class account_analytic_account(osv.osv): currency_id = contract.company_id.currency_id.id invoice = { - 'account_id': partner.property_account_receivable.id, + 'account_id': partner.property_account_receivable_id.id, 'type': 'out_invoice', 'partner_id': partner.id, 'currency_id': currency_id, @@ -693,9 +693,9 @@ class account_analytic_account(osv.osv): for line in contract.recurring_invoice_line_ids: res = line.product_id - account_id = res.property_account_income.id + account_id = res.property_account_income_id.id if not account_id: - account_id = res.categ_id.property_account_income_categ.id + account_id = res.categ_id.property_account_income_categ_id.id account_id = fpos_obj.map_account(cr, uid, fiscal_position, account_id) taxes = res.taxes_id or False |
