From e195be20f73a6889cd7a6a6d111deed6eff8e89b Mon Sep 17 00:00:00 2001 From: vra Date: Wed, 15 Sep 2010 10:53:35 +0530 Subject: [PATCH 01/56] [IMP] account: configuration chart - change the internal type of new generated cash and bank account in to Liquidity type. bzr revid: vra@tinyerp.com-20100915052335-7hftw69dmu8gvbrd --- addons/account/configurable_account_chart.xml | 4 ++-- addons/account/installer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/configurable_account_chart.xml b/addons/account/configurable_account_chart.xml index dee402d7f5d..ecffb6cef12 100644 --- a/addons/account/configurable_account_chart.xml +++ b/addons/account/configurable_account_chart.xml @@ -187,8 +187,8 @@ 1104 Bank Current Account - other - + view + diff --git a/addons/account/installer.py b/addons/account/installer.py index ef3ac72a261..415879e6de8 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -266,7 +266,7 @@ class account_installer(osv.osv_memory): vals_bnk = {'name': val.acc_name or '', 'currency_id': val.currency_id.id or False, 'code': str(110400 + code_cnt), - 'type': 'other', + 'type': 'liquidity', 'user_type': type, 'parent_id':new_account, 'company_id': company_id.id } From 2f4e994ea22a3211d1eb6cf8a959ab5857871c67 Mon Sep 17 00:00:00 2001 From: "pap (openerp)" Date: Wed, 15 Sep 2010 11:30:36 +0530 Subject: [PATCH 02/56] [IMP] Account: improved rml for general ledger landscape report bzr revid: pap@tinyerp.co.in-20100915060036-3d7cqf13xmbavba5 --- .../account/report/account_general_ledger_landscape.rml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml index ab338c43c32..0a4df727701 100644 --- a/addons/account/report/account_general_ledger_landscape.rml +++ b/addons/account/report/account_general_ledger_landscape.rml @@ -247,7 +247,7 @@ - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] + [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] Date JNRL @@ -266,10 +266,10 @@ [[ repeatIn(get_children_accounts(a,data['form']), 'o') ]] - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] + [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - + [[ o.code ]] [[ o.name ]] @@ -298,7 +298,7 @@ [[ line['lref'] ]] [[ line['move'] ]] [[ line['lname'] ]] - [[ strip_name(line['line_corresp'],15) ]] + [[ line['line_corresp'] ]] [[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]] [[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]] [[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]] From fc97015a62575a4839e32f921af109561d71502f Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 15 Sep 2010 11:40:46 +0530 Subject: [PATCH 03/56] [IMP] Account: Rename surplus to profit/loss bzr revid: mra@mra-laptop-20100915061046-d0v0p9mc8xe9vy2j --- addons/account/account.py | 2 +- addons/account/company.py | 2 +- addons/account/company_view.xml | 4 +- addons/account/configurable_account_chart.xml | 86 +++++++++---------- addons/account/demo/account_minimal.xml | 2 +- .../wizard/account_report_balance_sheet.py | 4 +- .../l10n_chart_uk_minimal/l10n_uk_chart.xml | 4 +- addons/l10n_in/l10n_in_chart.xml | 6 +- 8 files changed, 55 insertions(+), 55 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index b1c19476548..f461be1b2ed 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2361,7 +2361,7 @@ class account_chart_template(osv.osv): 'property_account_income_categ': fields.many2one('account.account.template','Income Category Account'), 'property_account_expense': fields.many2one('account.account.template','Expense Account on Product Template'), 'property_account_income': fields.many2one('account.account.template','Income Account on Product Template'), - 'property_reserve_and_surplus_account': fields.many2one('account.account.template', 'Reserve and Surplus Account', domain=[('type', '=', 'payable')] , help='This Account is used for transferring Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profilt & Loss Report'), + 'property_reserve_and_surplus_account': fields.many2one('account.account.template', 'Reserve and Profit/Loss Account', domain=[('type', '=', 'payable')] , help='This Account is used for transferring Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profilt & Loss Report'), } account_chart_template() diff --git a/addons/account/company.py b/addons/account/company.py index 0fe56fca859..873a65c415e 100644 --- a/addons/account/company.py +++ b/addons/account/company.py @@ -29,7 +29,7 @@ class res_company(osv.osv): 'account.account', type='many2one', relation='account.account', - string="Reserve and Surplus Account", + string="Reserve and Profit/Loss Account", method=True, view_load=True, domain="[('type', '=', 'payable')]", diff --git a/addons/account/company_view.xml b/addons/account/company_view.xml index 692c7960bbf..a9e6815f975 100644 --- a/addons/account/company_view.xml +++ b/addons/account/company_view.xml @@ -15,7 +15,7 @@ - + res.company.form.inherit @@ -24,7 +24,7 @@ - + diff --git a/addons/account/configurable_account_chart.xml b/addons/account/configurable_account_chart.xml index ecffb6cef12..58399db3111 100644 --- a/addons/account/configurable_account_chart.xml +++ b/addons/account/configurable_account_chart.xml @@ -125,7 +125,7 @@ view - + 10 Fixed Assets @@ -133,7 +133,7 @@ view - + 100 Fixed Asset Account @@ -141,7 +141,7 @@ other - + 11 Net Current Assets @@ -149,7 +149,7 @@ view - + 110 Current Assets @@ -157,7 +157,7 @@ view - + 1101 Purchased Stocks @@ -165,7 +165,7 @@ other - + 1102 Debtors @@ -174,7 +174,7 @@ - + 1103 Tax Paid @@ -182,7 +182,7 @@ other - + 1104 Bank Current Account @@ -190,7 +190,7 @@ view - + 111 Current Liabilities @@ -198,7 +198,7 @@ view - + 1111 Creditors @@ -207,7 +207,7 @@ - + 1112 Tax Received @@ -215,17 +215,17 @@ other - + 1113 - Reserve and Surplus Account + Reserve and Profit/Loss Account payable - - + + @@ -243,7 +243,7 @@ view - + 200 Product Sales @@ -251,7 +251,7 @@ other - + 21 Cost of Sales @@ -259,7 +259,7 @@ view - + 210 Cost of Goods Sold @@ -267,7 +267,7 @@ other - + 22 Overheads @@ -275,7 +275,7 @@ view - + 220 Expenses @@ -317,7 +317,7 @@ Tax Received Rate S (15%) - + Tax Received Rate R (5%) @@ -327,14 +327,14 @@ Tax Received Rate X (Exempt) - + Tax Received Rate O (Out of scope) - + Tax Paid @@ -344,7 +344,7 @@ Tax Paid Rate S (15%) - + Tax Paid Rate R (5%) @@ -354,7 +354,7 @@ Tax Paid Rate X (Exempt) - + Tax Paid Rate O (Out of scope) @@ -362,9 +362,9 @@ - + - + Tax Bases @@ -379,7 +379,7 @@ Taxable Purchases Rated S (15%) - + Taxable Purchases Rated R (5%) @@ -389,34 +389,34 @@ Taxable Purchases Type X (Exempt) - + Taxable Purchases Type O (Out of scope) - + Base of Taxable Sales - + Taxable Sales Rated S (15%) - + Taxable Sales Rated R (5%) - + Taxable Sales Type X (Exempt) - + Taxable Sales Type O (Out of scope) @@ -550,19 +550,19 @@ sale - - - + + + - - + + Normal Taxes - + Tax Exempt @@ -587,7 +587,7 @@ - + @@ -595,7 +595,7 @@ - - + + diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index 9a60eebced5..d925dfa02ed 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -199,7 +199,7 @@ X1113 - Reserve and Surplus - (test) + Reserve and Profit/Loss - (test) payable diff --git a/addons/account/wizard/account_report_balance_sheet.py b/addons/account/wizard/account_report_balance_sheet.py index ebe3b4c8ba8..30ee28d17ff 100644 --- a/addons/account/wizard/account_report_balance_sheet.py +++ b/addons/account/wizard/account_report_balance_sheet.py @@ -34,7 +34,7 @@ class account_bs_report(osv.osv_memory): _columns = { 'display_type': fields.boolean("Landscape Mode"), - 'reserve_account_id': fields.many2one('account.account', 'Reserve & Surplus Account',required = True, + 'reserve_account_id': fields.many2one('account.account', 'Reserve & Profit/Loss Account',required = True, help='This Account is used for trasfering Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be duducted.), Which is calculated from Profilt & Loss Report', domain = [('type','=','payable')]), } @@ -60,7 +60,7 @@ class account_bs_report(osv.osv_memory): data = self.pre_print_report(cr, uid, ids, data, query_line, context=context) account = self.pool.get('account.account').browse(cr, uid, data['form']['chart_account_id']) if not account.company_id.property_reserve_and_surplus_account: - raise osv.except_osv(_('Warning'),_('Please define the Reserve and Surplus account for current user company !')) + raise osv.except_osv(_('Warning'),_('Please define the Reserve and Profit/Loss account for current user company !')) data['form']['reserve_account_id'] = account.company_id.property_reserve_and_surplus_account.id data['form'].update(self.read(cr, uid, ids, ['display_type'])[0]) if data['form']['display_type']: diff --git a/addons/l10n_chart_uk_minimal/l10n_uk_chart.xml b/addons/l10n_chart_uk_minimal/l10n_uk_chart.xml index 63b11c6c58d..f367d8b5739 100644 --- a/addons/l10n_chart_uk_minimal/l10n_uk_chart.xml +++ b/addons/l10n_chart_uk_minimal/l10n_uk_chart.xml @@ -56,7 +56,7 @@ 1113 - Reserve and Surplus Account + Reserve and Profit/Loss Account other @@ -173,7 +173,7 @@ - 200 + 200 Revenue view diff --git a/addons/l10n_in/l10n_in_chart.xml b/addons/l10n_in/l10n_in_chart.xml index 3a043231d0f..9272fe4e18d 100644 --- a/addons/l10n_in/l10n_in_chart.xml +++ b/addons/l10n_in/l10n_in_chart.xml @@ -268,7 +268,7 @@ - Reserve and Surplus Account + Reserve and Profit/Loss Account IA_AC0232 other @@ -366,7 +366,7 @@ - + Opening Stock IA_AC114 @@ -494,6 +494,6 @@ - + From 4ae2240f4ed445292e6fad889e9245329d77280f Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Wed, 15 Sep 2010 12:20:49 +0530 Subject: [PATCH 04/56] [IMP] account: Rename account balance report to trial balance bzr revid: psi@tinyerp.co.in-20100915065049-3yc9iw6pzv2a96te --- addons/account/account_report.xml | 2 +- addons/account/report/account_balance.rml | 22 +++++++-------- .../wizard/account_report_account_balance.py | 2 +- .../account_report_account_balance_view.xml | 28 +++++++++---------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index be0569fa65f..14efecf350d 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -4,7 +4,7 @@ - + diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml index eb221a6427b..5d71ef95c39 100644 --- a/addons/account/report/account_balance.rml +++ b/addons/account/report/account_balance.rml @@ -14,11 +14,11 @@ - + - + @@ -111,12 +111,12 @@ - + - + @@ -199,7 +199,7 @@ - Account Balance + Trial Balance @@ -212,7 +212,7 @@ [[ data['model']=='account.account' and 'Company'or removeParentNode('para') ]] - [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]] + [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]] Fiscal Year @@ -292,11 +292,11 @@ Balance([[ company.currency_id.code]]) - [[ repeatIn(lines(data['form']), 'a') ]][[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['code'] or removeParentNode('tr') ]] - [[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ '..'*(a['level']-1) ]][[ a['name'] ]] - [[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]] [[ company.currency_id.symbol ]] - [[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]] - [[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]] + [[ repeatIn(lines(data['form']), 'a') ]][[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['code'] or removeParentNode('tr') ]] + [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ '..'*(a['level']-1) ]][[ a['name'] ]] + [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]] [[ company.currency_id.symbol ]] + [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]] + [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/wizard/account_report_account_balance.py b/addons/account/wizard/account_report_account_balance.py index 3869744bf96..ed37395acb5 100644 --- a/addons/account/wizard/account_report_account_balance.py +++ b/addons/account/wizard/account_report_account_balance.py @@ -26,7 +26,7 @@ from osv import osv, fields class account_balance_report(osv.osv_memory): _inherit = "account.common.account.report" _name = 'account.balance.report' - _description = 'Account Balance Report' + _description = 'Trial Balance Report' _columns = { 'target_move': fields.selection([('all', 'All Entries'), diff --git a/addons/account/wizard/account_report_account_balance_view.xml b/addons/account/wizard/account_report_account_balance_view.xml index 8ffdf6ae02f..8c09e954dbf 100644 --- a/addons/account/wizard/account_report_account_balance_view.xml +++ b/addons/account/wizard/account_report_account_balance_view.xml @@ -4,21 +4,21 @@ - Account Balance - account.balance.report - form - - - - - - - - + Trial Balance + account.balance.report + form + + + + + + + + - Account Balance + Trial Balance ir.actions.act_window account.balance.report form @@ -29,7 +29,7 @@ - Account Balance + Trial Balance client_print_multi action From 7dd7948e65f1064675a6c7f3dec31b608fbe3ea8 Mon Sep 17 00:00:00 2001 From: vra Date: Wed, 15 Sep 2010 12:28:22 +0530 Subject: [PATCH 05/56] [ADD] account: added move name with entry label in account journal report. bzr revid: vra@tinyerp.com-20100915065822-3ehw9hfvqnmj04ee --- addons/account/report/account_journal.rml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/report/account_journal.rml b/addons/account/report/account_journal.rml index 88b93e06429..6c1464db503 100644 --- a/addons/account/report/account_journal.rml +++ b/addons/account/report/account_journal.rml @@ -252,7 +252,7 @@ Entry No A/c No. Partner - Entry label + Move - Entry label Debit([[ company.currency_id.code]]) Credit([[ company.currency_id.code]]) Balance([[ company.currency_id.code]]) @@ -273,7 +273,7 @@ [[ line.ref ]] [[ line.account_id.code ]] [[ line.partner_id and line.partner_id.name ]] - [[ line.name ]] + [[ line.move_id.name ]] - [[ line.name ]] [[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]] [[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]] [[ formatLang(line.credit - line.debit) ]] [[ company.currency_id.symbol ]] From 8a4d5ccd64433994854815e6c20e1fde08ec1998 Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Wed, 15 Sep 2010 15:00:55 +0530 Subject: [PATCH 06/56] [IMP] account: remove self.query_get_clause from trial balance report bzr revid: psi@tinyerp.co.in-20100915093055-hgly1fqhobi8ci67 --- addons/account/report/account_balance.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py index f2177f80b3a..5ada9adc4d8 100644 --- a/addons/account/report/account_balance.py +++ b/addons/account/report/account_balance.py @@ -55,7 +55,6 @@ class account_balance(report_sxw.rml_parse, common_report_header): if (data['model'] == 'ir.ui.menu'): new_ids = 'chart_account_id' in data['form'] and [data['form']['chart_account_id']] or [] objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids) - self.query_get_clause = data['form'].get('query_line', False) or '' return super(account_balance, self).set_context(objects, data, new_ids, report_type=report_type) #def _add_header(self, node, header=1): From 2577edf340ac85a2b52bb208a3dc8098a2037d37 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 15 Sep 2010 15:15:09 +0530 Subject: [PATCH 07/56] [FIX]: fix a tax calculation problem in the journal voucher that was missed during the trunk merge bzr revid: mga@tinyerp.com-20100915094509-j3smpedxyn56wk62 --- addons/account_voucher/voucher.py | 8 ++++++-- addons/account_voucher/voucher_sales_purchase_view.xml | 4 +--- addons/account_voucher/voucher_view.xml | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index 3a9855e35f3..b898adf68bf 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -254,7 +254,7 @@ class account_voucher(osv.osv): }) return {'value':default} - def onchange_journal_voucher(self, cr, uid, ids, partner_id=False, journal_id=False, context={}): + def onchange_journal_voucher(self, cr, uid, ids, line_ids=False, tax_id=False, price=0.0, partner_id=False, journal_id=False, ttype=False, context={}): """price Returns a dict that contains new values and context @@ -290,9 +290,13 @@ class account_voucher(osv.osv): default['value']['account_id'] = account_id default['value']['type'] = tr_type + + vals = self.onchange_journal(cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context) + default['value'].update(vals.get('value')) + return default - def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, currency_id=False, ttype=False, context={}): + def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context): """price Returns a dict that contains new values and context diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml index 9a55d5e4f83..f40e2088d63 100644 --- a/addons/account_voucher/voucher_sales_purchase_view.xml +++ b/addons/account_voucher/voucher_sales_purchase_view.xml @@ -40,7 +40,6 @@ - account.voucher.sale.select account.voucher @@ -80,7 +79,6 @@ - Sales Payment account.voucher @@ -216,7 +214,7 @@ - + diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index 94f7f18c4a0..29008201992 100644 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -28,8 +28,8 @@
- - + + @@ -37,7 +37,7 @@ - + @@ -59,7 +59,7 @@ -