From 3adba48137d36dfb71a8835d71ca4517cad79fd8 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Mon, 19 Jul 2010 19:17:09 +0530 Subject: [PATCH] [FIX]: fix a problme bug/544287 - partner_bank to be partner_bank_id lp bug: https://launchpad.net/bugs/544287 fixed bzr revid: mga@tinyerp.com-20100719134709-7vuwjnto8s5p43jz --- addons/account/account.py | 30 +++++++++---------- addons/account/account_invoice_view.xml | 19 +++++++----- addons/account/invoice.py | 6 ++-- .../account/report/account_invoice_report.py | 6 ++-- .../report/account_invoice_report_view.xml | 2 +- addons/account_payment/account_move_line.py | 4 +-- addons/l10n_ch/account_invoice.xml | 10 +++---- addons/l10n_ch/account_move_line.py | 4 +-- addons/l10n_ch/invoice.py | 8 ++--- addons/l10n_ch/wizard/wizard_bvr.py | 8 ++--- 10 files changed, 50 insertions(+), 47 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 45d3cb4377c..9aadf24b7dd 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2572,12 +2572,10 @@ class wizard_multi_charts_accounts(osv.osv_memory): data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view')]) data = data_pool.browse(cr, uid, data_id[0]) view_id_cash = data.res_id - #view_id_cash = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal View')])[0] #TOFIX: why put fix name - + data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view_multi')]) data = data_pool.browse(cr, uid, data_id[0]) ref_acc_bank = data.res_id - #ref_acc_bank = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal (Multi-Currency) View')])[0] #TOFIX: why put fix name ref_acc_bank = obj_multi.chart_template_id.bank_account_view_id current_num = 1 @@ -2604,8 +2602,8 @@ class wizard_multi_charts_accounts(osv.osv_memory): if obj_multi.seq_journal: vals_seq={ - 'name': _('Bank Journal ') + vals['name'], - 'code': 'account.journal', + 'name': _('Bank Journal ') + vals['name'], + 'code': 'account.journal', } seq_id = obj_sequence.create(cr,uid,vals_seq) @@ -2661,9 +2659,9 @@ class wizard_multi_charts_accounts(osv.osv_memory): for position in obj_fiscal_position_template.browse(cr, uid, fp_ids): vals_fp = { - 'company_id' : company_id, - 'name' : position.name, - } + 'company_id' : company_id, + 'name' : position.name, + } new_fp = obj_fiscal_position.create(cr, uid, vals_fp) obj_tax_fp = self.pool.get('account.fiscal.position.tax') @@ -2671,18 +2669,18 @@ class wizard_multi_charts_accounts(osv.osv_memory): for tax in position.tax_ids: vals_tax = { - 'tax_src_id' : tax_template_ref[tax.tax_src_id.id], - 'tax_dest_id' : tax.tax_dest_id and tax_template_ref[tax.tax_dest_id.id] or False, - 'position_id' : new_fp, - } + 'tax_src_id' : tax_template_ref[tax.tax_src_id.id], + 'tax_dest_id' : tax.tax_dest_id and tax_template_ref[tax.tax_dest_id.id] or False, + 'position_id' : new_fp, + } obj_tax_fp.create(cr, uid, vals_tax) for acc in position.account_ids: vals_acc = { - 'account_src_id' : acc_template_ref[acc.account_src_id.id], - 'account_dest_id' : acc_template_ref[acc.account_dest_id.id], - 'position_id' : new_fp, - } + 'account_src_id' : acc_template_ref[acc.account_src_id.id], + 'account_dest_id' : acc_template_ref[acc.account_dest_id.id], + 'position_id' : new_fp, + } obj_ac_fp.create(cr, uid, vals_acc) #fially inactive the demo chart of accounts diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 90ef039e550..7572ae2aa59 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -5,7 +5,6 @@ - account.invoice.calendar account.invoice @@ -17,6 +16,7 @@ + account.invoice.graph account.invoice @@ -28,6 +28,7 @@ + account.invoice.line.tree account.invoice.line @@ -44,6 +45,7 @@ + account.invoice.line.form account.invoice.line @@ -74,6 +76,7 @@ + account.invoice.tax.tree account.invoice.tax @@ -89,6 +92,7 @@ + account.invoice.tax.form account.invoice.tax @@ -149,7 +153,7 @@