From 361005df7e43a70599c10440881a53cb6a6af461 Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Fri, 1 Oct 2010 18:40:38 +0530 Subject: [PATCH 001/142] [IMP] account_budget: Rename files bzr revid: psi@tinyerp.co.in-20101001131038-metbescbnv58qjmk --- addons/account_budget/__init__.py | 6 +++--- addons/account_budget/__openerp__.py | 8 ++++---- .../{crossovered_budget.py => account_budget.py} | 0 ...rossovered_budget_demo.xml => account_budget_demo.xml} | 0 ...overed_budget_report.xml => account_budget_report.xml} | 0 ...rossovered_budget_view.xml => account_budget_view.xml} | 0 ...ed_budget_workflow.xml => account_budget_workflow.xml} | 0 7 files changed, 7 insertions(+), 7 deletions(-) rename addons/account_budget/{crossovered_budget.py => account_budget.py} (100%) rename addons/account_budget/{crossovered_budget_demo.xml => account_budget_demo.xml} (100%) rename addons/account_budget/{crossovered_budget_report.xml => account_budget_report.xml} (100%) rename addons/account_budget/{crossovered_budget_view.xml => account_budget_view.xml} (100%) rename addons/account_budget/{crossovered_budget_workflow.xml => account_budget_workflow.xml} (100%) diff --git a/addons/account_budget/__init__.py b/addons/account_budget/__init__.py index 4eea62cb2d8..56a00fb9ba4 100644 --- a/addons/account_budget/__init__.py +++ b/addons/account_budget/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,11 +15,11 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## -import crossovered_budget +import account_budget import report import wizard diff --git a/addons/account_budget/__openerp__.py b/addons/account_budget/__openerp__.py index b023e7e1124..dfe1640a290 100644 --- a/addons/account_budget/__openerp__.py +++ b/addons/account_budget/__openerp__.py @@ -50,16 +50,16 @@ Three reports are available: 'security/ir.model.access.csv', 'security/account_budget_security.xml', 'wizard/account_budget_spread_view.xml', - 'crossovered_budget_view.xml', - 'crossovered_budget_report.xml', - 'crossovered_budget_workflow.xml', + 'account_budget_view.xml', + 'account_budget_report.xml', + 'account_budget_workflow.xml', 'wizard/account_budget_analytic_view.xml', 'wizard/account_budget_report_view.xml', 'wizard/account_budget_spread_view.xml', 'wizard/account_budget_crossovered_summary_report_view.xml', 'wizard/account_budget_crossovered_report_view.xml', ], - 'demo_xml': ['crossovered_budget_demo.xml'], + 'demo_xml': ['account_budget_demo.xml'], 'test':[ 'test/account_budget.yml', 'test/account_budget_report.yml', diff --git a/addons/account_budget/crossovered_budget.py b/addons/account_budget/account_budget.py similarity index 100% rename from addons/account_budget/crossovered_budget.py rename to addons/account_budget/account_budget.py diff --git a/addons/account_budget/crossovered_budget_demo.xml b/addons/account_budget/account_budget_demo.xml similarity index 100% rename from addons/account_budget/crossovered_budget_demo.xml rename to addons/account_budget/account_budget_demo.xml diff --git a/addons/account_budget/crossovered_budget_report.xml b/addons/account_budget/account_budget_report.xml similarity index 100% rename from addons/account_budget/crossovered_budget_report.xml rename to addons/account_budget/account_budget_report.xml diff --git a/addons/account_budget/crossovered_budget_view.xml b/addons/account_budget/account_budget_view.xml similarity index 100% rename from addons/account_budget/crossovered_budget_view.xml rename to addons/account_budget/account_budget_view.xml diff --git a/addons/account_budget/crossovered_budget_workflow.xml b/addons/account_budget/account_budget_workflow.xml similarity index 100% rename from addons/account_budget/crossovered_budget_workflow.xml rename to addons/account_budget/account_budget_workflow.xml From d9c2e1a2e8db5f397123fcc4108f9fddc7c92ae8 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Fri, 1 Oct 2010 17:24:03 +0200 Subject: [PATCH 002/142] [FIX] account: typo in query_get + fix in common wizard report + [REF] account: query_get removal of period_manner in context bzr revid: qdp-launchpad@tinyerp.com-20101001152403-7yy1l7sy0kdq728l --- addons/account/account_move_line.py | 38 +------------------ .../account/wizard/account_report_common.py | 3 +- 2 files changed, 3 insertions(+), 38 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 42efd14aa97..ec2b23ff07b 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -56,7 +56,7 @@ class account_move_line(osv.osv): where_move_lines_by_date = '' if context.get('date_from', False) and context.get('date_to', False): - if initital_bal: + if initial_bal: where_move_lines_by_date = " AND " +obj+".move_id in ( select id from account_move where date < '"+context['date_from']+"')" else: where_move_lines_by_date = " AND " +obj+".move_id in ( select id from account_move where date >= '" +context['date_from']+"' AND date <= '"+context['date_to']+"')" @@ -88,42 +88,6 @@ class account_move_line(osv.osv): query += company_clause - if context.get('period_manner','') == 'created': - #the query have to be build with no reference to periods but thanks to the creation date - if context.get('periods',False): - #if one or more period are given, use them - fiscalperiod_ids = fiscalperiod_obj.search(cr, uid, [('id','in',context['periods'])]) - else: - fiscalperiod_ids = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id','in',fiscalyear_ids)]) - - - - #remove from the old query the clause related to the period selection - res = '' - count = 1 - clause_list = query.split('AND') - ref_string = ' '+obj+'.period_id in' - for clause in clause_list: - if count != 1 and not clause.startswith(ref_string): - res += "AND" - if not clause.startswith(ref_string): - res += clause - count += 1 - - #add to 'res' a new clause containing the creation date criterion - count = 1 - res += " AND (" - periods = self.pool.get('account.period').read(cr, uid, p_ids, ['date_start','date_stop']) - for period in periods: - if count != 1: - res += " OR " - #creation date criterion: the creation date of the move_line has to be - # between the date_start and the date_stop of the selected periods - res += "("+obj+".create_date between to_date('" + period['date_start'] + "','yyyy-mm-dd') and to_date('" + period['date_stop'] + "','yyyy-mm-dd'))" - count += 1 - res += ")" - return res - return query def default_get(self, cr, uid, fields, context={}): diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py index ed5e5b144ef..b02b017be55 100644 --- a/addons/account/wizard/account_report_common.py +++ b/addons/account/wizard/account_report_common.py @@ -118,7 +118,8 @@ class account_common_report(osv.osv_memory): elif data['form']['filter'] == 'filter_period': if not data['form']['period_from'] or not data['form']['period_to']: raise osv.except_osv(_('Error'),_('Select a starting and an ending period')) - result['periods'] = period_obj.build_ctx_periods(cr, uid, data['form']['period_from'], data['form']['period_to']) + result['period_from'] = data['form']['period_from'] + result['period_to'] = data['form']['period_to'] return result def _print_report(self, cr, uid, ids, data, context=None): From 8d2d7639aaf54c5277d5d41be5e8622a33fa43d1 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Fri, 1 Oct 2010 18:08:03 +0200 Subject: [PATCH 003/142] [FIX] account: removed stupid displaying of currency code in aged partner report bzr revid: qdp-launchpad@tinyerp.com-20101001160803-tztq9g3zbq8zbhtr --- .../account/report/account_aged_partner_balance.rml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account/report/account_aged_partner_balance.rml b/addons/account/report/account_aged_partner_balance.rml index 7f90ae0983b..143fbe0133e 100644 --- a/addons/account/report/account_aged_partner_balance.rml +++ b/addons/account/report/account_aged_partner_balance.rml @@ -168,22 +168,22 @@ Partners - [[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]]([[ company.currency_id.code ]]) + [[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]] - [[ data['form']['4']['name'] ]]([[ company.currency_id.code ]]) + [[ data['form']['4']['name'] ]] - [[ data['form']['3']['name'] ]]([[ company.currency_id.code ]]) + [[ data['form']['3']['name'] ]] - [[ data['form']['2']['name'] ]]([[ company.currency_id.code ]]) + [[ data['form']['2']['name'] ]] - [[ data['form']['1']['name'] ]]([[ company.currency_id.code ]]) + [[ data['form']['1']['name'] ]] - [[ data['form']['0']['name'] ]]([[ company.currency_id.code ]]) + [[ data['form']['0']['name'] ]] Total From 05f53b95f109f912f65d03c41b2bae9573540e46 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 4 Oct 2010 13:01:13 +0530 Subject: [PATCH 004/142] [FIX] Account: Residual amount is not update updated properly with voucher payment lp bug: https://launchpad.net/bugs/651628 fixed bzr revid: mra@mra-laptop-20101004073113-x70oe0fsnlt3dqjy --- addons/account/invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 1aa4e30d95d..71d37cd25ad 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -148,7 +148,7 @@ class account_invoice(osv.osv): res[id] = [] if not invoice.move_id: continue - data_lines = invoice.move_id.line_id + data_lines = [x for x in invoice.move_id.line_id if x.account_id.id == invoice.account_id.id] partial_ids = [] for line in data_lines: ids_line = [] From 6826c05e3b7708f075889dc8e58fe8e6a1ca0dde Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 4 Oct 2010 15:13:20 +0530 Subject: [PATCH 005/142] [ADD] Account: common report wizard (target move added) [IMP] Account: General ledger report remove target move will use from common bzr revid: mra@mra-laptop-20101004094320-kzqipqkl7jomuydw --- addons/account/wizard/account_report_common.py | 8 ++++++-- addons/account/wizard/account_report_common_view.xml | 1 + addons/account/wizard/account_report_general_ledger.py | 5 +---- .../account/wizard/account_report_general_ledger_view.xml | 3 +-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py index b02b017be55..038973c4ed8 100644 --- a/addons/account/wizard/account_report_common.py +++ b/addons/account/wizard/account_report_common.py @@ -40,7 +40,10 @@ class account_common_report(osv.osv_memory): 'journal_ids': fields.many2many('account.journal', 'account_common_journal_rel', 'account_id', 'journal_id', 'Journals', required=True), 'date_from': fields.date("Start Date"), 'date_to': fields.date("End Date"), - } + 'target_move': fields.selection([('all', 'All Entries'), + ('posted', 'All Posted Entries')], 'Target Moves', required=True), + + } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): mod_obj = self.pool.get('ir.model.data') @@ -101,6 +104,7 @@ class account_common_report(osv.osv_memory): 'journal_ids': _get_all_journal, 'filter': 'filter_no', 'chart_account_id': _get_account, + 'target_move': 'all', } def _build_contexts(self, cr, uid, ids, data, context=None): @@ -132,7 +136,7 @@ class account_common_report(osv.osv_memory): data = {} data['ids'] = context.get('active_ids', []) data['model'] = context.get('active_model', 'ir.ui.menu') - data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', 'period_to', 'filter', 'chart_account_id'])[0] + data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', 'period_to', 'filter', 'chart_account_id', 'target_move'])[0] used_context = self._build_contexts(cr, uid, ids, data, context=context) data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or [] data['form']['used_context'] = used_context diff --git a/addons/account/wizard/account_report_common_view.xml b/addons/account/wizard/account_report_common_view.xml index ec3aa6b227b..b9c629acf28 100644 --- a/addons/account/wizard/account_report_common_view.xml +++ b/addons/account/wizard/account_report_common_view.xml @@ -10,6 +10,7 @@
+ diff --git a/addons/account/wizard/account_report_general_ledger.py b/addons/account/wizard/account_report_general_ledger.py index 37ac27bc2ec..c08894bfadd 100644 --- a/addons/account/wizard/account_report_general_ledger.py +++ b/addons/account/wizard/account_report_general_ledger.py @@ -32,15 +32,12 @@ class account_report_general_ledger(osv.osv_memory): help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'), 'amount_currency': fields.boolean("With Currency", help="It adds the currency column if the currency is different then the company currency"), 'sortby': fields.selection([('sort_date', 'Date'), ('sort_journal_partner', 'Journal & Partner')], 'Sort By', required=True), - 'target_move': fields.selection([('all', 'All Entries'), - ('posted', 'All Posted Entries')], 'Target Moves', required=True), } _defaults = { 'landscape': True, 'amount_currency': True, 'sortby': 'sort_date', 'initial_balance': False, - 'target_move': 'all', } def onchange_fiscalyear(self, cr, uid, ids, fiscalyear=False, context=None): @@ -53,7 +50,7 @@ class account_report_general_ledger(osv.osv_memory): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) - data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby', 'target_move'])[0]) + data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby'])[0]) if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record data['form'].update({'initial_balance': False}) if data['form']['landscape']: diff --git a/addons/account/wizard/account_report_general_ledger_view.xml b/addons/account/wizard/account_report_general_ledger_view.xml index 42256912add..b251252851c 100644 --- a/addons/account/wizard/account_report_general_ledger_view.xml +++ b/addons/account/wizard/account_report_general_ledger_view.xml @@ -8,9 +8,8 @@ form - + - From 2b30cec9accaa90c46792e8c891e8028dbc141ac Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 4 Oct 2010 15:22:23 +0530 Subject: [PATCH 006/142] [REM] Account: Account balance => remove target move used from common wizard bzr revid: mra@mra-laptop-20101004095223-6m542eu7esgf3h6q --- addons/account/wizard/account_report_account_balance.py | 9 +-------- .../wizard/account_report_account_balance_view.xml | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/addons/account/wizard/account_report_account_balance.py b/addons/account/wizard/account_report_account_balance.py index 475a7da5a74..6b8c4371dd2 100644 --- a/addons/account/wizard/account_report_account_balance.py +++ b/addons/account/wizard/account_report_account_balance.py @@ -21,21 +21,15 @@ from lxml import etree -from osv import osv, fields +from osv import osv class account_balance_report(osv.osv_memory): _inherit = "account.common.account.report" _name = 'account.balance.report' _description = 'Trial Balance Report' - _columns = { - 'target_move': fields.selection([('all', 'All Entries'), - ('posted', 'All Posted Entries')], 'Target Moves', required=True), - } - _defaults = { 'journal_ids': [], - 'target_move': 'all' } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): @@ -51,7 +45,6 @@ class account_balance_report(osv.osv_memory): def _print_report(self, cr, uid, ids, data, context=None): data = self.pre_print_report(cr, uid, ids, data, context=context) - data['form'].update(self.read(cr, uid, ids, ['target_move'])[0]) return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data} account_balance_report() diff --git a/addons/account/wizard/account_report_account_balance_view.xml b/addons/account/wizard/account_report_account_balance_view.xml index 8c09e954dbf..eb31f4e20f0 100644 --- a/addons/account/wizard/account_report_account_balance_view.xml +++ b/addons/account/wizard/account_report_account_balance_view.xml @@ -9,9 +9,8 @@ form - + - From c3b171c7e71a768f3d5f2e5a52036f4143a682e1 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 4 Oct 2010 15:24:10 +0530 Subject: [PATCH 007/142] [REM] Account: balnace sheet => remove target move used from common wizard bzr revid: mra@mra-laptop-20101004095410-4kgzirij3adourlg --- addons/account/wizard/account_report_balance_sheet.py | 5 +---- addons/account/wizard/account_report_balance_sheet_view.xml | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/addons/account/wizard/account_report_balance_sheet.py b/addons/account/wizard/account_report_balance_sheet.py index df6d58c9ae7..a4ad0c58524 100644 --- a/addons/account/wizard/account_report_balance_sheet.py +++ b/addons/account/wizard/account_report_balance_sheet.py @@ -36,14 +36,11 @@ class account_bs_report(osv.osv_memory): 'display_type': fields.boolean("Landscape Mode"), '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')]), - 'target_move': fields.selection([('all', 'All Entries'), - ('posted', 'All Posted Entries')], 'Target Moves', required=True), } _defaults={ 'display_type': True, 'journal_ids': [], - 'target_move': 'all', } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): @@ -65,7 +62,7 @@ class account_bs_report(osv.osv_memory): if not account.company_id.property_reserve_and_surplus_account: 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','target_move'])[0]) + data['form'].update(self.read(cr, uid, ids, ['display_type'])[0]) if data['form']['display_type']: return { 'type': 'ir.actions.report.xml', diff --git a/addons/account/wizard/account_report_balance_sheet_view.xml b/addons/account/wizard/account_report_balance_sheet_view.xml index f0a943fd050..f1c5ef35de9 100644 --- a/addons/account/wizard/account_report_balance_sheet_view.xml +++ b/addons/account/wizard/account_report_balance_sheet_view.xml @@ -8,9 +8,8 @@ form - + - From 96ad74ccc0b5983e806e162dc3dba0d3478215c0 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 4 Oct 2010 15:28:59 +0530 Subject: [PATCH 008/142] [REM] Account: p&l => target move set to readonly for nw bzr revid: mra@mra-laptop-20101004095859-2y9zmj0mzvkzq3x6 --- addons/account/wizard/account_report_profit_loss.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/account/wizard/account_report_profit_loss.py b/addons/account/wizard/account_report_profit_loss.py index bc36e233685..94487c4f567 100644 --- a/addons/account/wizard/account_report_profit_loss.py +++ b/addons/account/wizard/account_report_profit_loss.py @@ -37,6 +37,7 @@ class account_pl_report(osv.osv_memory): _defaults = { 'display_type': True, 'journal_ids': [], + 'target_move': False } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): @@ -44,6 +45,10 @@ class account_pl_report(osv.osv_memory): res = super(account_pl_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False) doc = etree.XML(res['arch']) nodes = doc.xpath("//field[@name='journal_ids']") + for node in nodes: + node.set('readonly', '1') + node.set('required', '0') + nodes = doc.xpath("//field[@name='target_move']") for node in nodes: node.set('readonly', '1') node.set('required', '0') From d2f2e832afde128c2e515dc3cb1569d27474a124 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 4 Oct 2010 15:35:21 +0530 Subject: [PATCH 009/142] [REM] Account: general journal and central journal with target moves bzr revid: mra@mra-laptop-20101004100521-ixj77ede6yq12l7o --- .../account/wizard/account_report_central_journal_view.xml | 2 +- .../account/wizard/account_report_general_journal_view.xml | 2 +- addons/account/wizard/account_report_print_journal.py | 5 +---- addons/account/wizard/account_report_print_journal_view.xml | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/addons/account/wizard/account_report_central_journal_view.xml b/addons/account/wizard/account_report_central_journal_view.xml index 3e24510a470..ca7103c685e 100644 --- a/addons/account/wizard/account_report_central_journal_view.xml +++ b/addons/account/wizard/account_report_central_journal_view.xml @@ -8,7 +8,7 @@ form - + diff --git a/addons/account/wizard/account_report_general_journal_view.xml b/addons/account/wizard/account_report_general_journal_view.xml index 5bc339202e5..eababa83982 100644 --- a/addons/account/wizard/account_report_general_journal_view.xml +++ b/addons/account/wizard/account_report_general_journal_view.xml @@ -8,7 +8,7 @@ form - + diff --git a/addons/account/wizard/account_report_print_journal.py b/addons/account/wizard/account_report_print_journal.py index f264524dc4b..6256cca8ab6 100644 --- a/addons/account/wizard/account_report_print_journal.py +++ b/addons/account/wizard/account_report_print_journal.py @@ -30,19 +30,16 @@ class account_print_journal(osv.osv_memory): 'sort_selection': fields.selection([('date', 'Date'), ('ref', 'Reference Number'),], 'Entries Sorted By', required=True), - 'target_move': fields.selection([('all', 'All Entries'), - ('posted', 'All Posted Entries')], 'Target Moves', required=True) } _defaults = { 'sort_selection': 'date', - 'target_move': 'all' } def _print_report(self, cr, uid, ids, data, context=None): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) - data['form'].update(self.read(cr, uid, ids, ['sort_selection','target_move'])[0]) + data['form'].update(self.read(cr, uid, ids, ['sort_selection'])[0]) return {'type': 'ir.actions.report.xml', 'report_name': 'account.journal.period.print', 'datas': data} account_print_journal() diff --git a/addons/account/wizard/account_report_print_journal_view.xml b/addons/account/wizard/account_report_print_journal_view.xml index 2b4a597b87b..eb3e5063361 100644 --- a/addons/account/wizard/account_report_print_journal_view.xml +++ b/addons/account/wizard/account_report_print_journal_view.xml @@ -8,9 +8,8 @@ form - + - From f835b84d8b2f2c1b54893701c1411bdbfaaa9365 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 4 Oct 2010 15:39:43 +0530 Subject: [PATCH 010/142] [IMP] Account: Partner accounts reports target move changes move to common wizard so bzr revid: mra@mra-laptop-20101004100943-lkfeoa5ai8o4p82q --- .../wizard/account_report_aged_partner_balance_view.xml | 1 - addons/account/wizard/account_report_common_partner.py | 5 +---- .../account/wizard/account_report_partner_balance_view.xml | 4 +--- addons/account/wizard/account_report_partner_ledger_view.xml | 3 +-- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/addons/account/wizard/account_report_aged_partner_balance_view.xml b/addons/account/wizard/account_report_aged_partner_balance_view.xml index 9f894f0f670..ad9c90b2e36 100644 --- a/addons/account/wizard/account_report_aged_partner_balance_view.xml +++ b/addons/account/wizard/account_report_aged_partner_balance_view.xml @@ -17,7 +17,6 @@ - diff --git a/addons/account/wizard/account_report_common_partner.py b/addons/account/wizard/account_report_common_partner.py index 35ece1c0b02..d9f3934d9a4 100644 --- a/addons/account/wizard/account_report_common_partner.py +++ b/addons/account/wizard/account_report_common_partner.py @@ -30,19 +30,16 @@ class account_common_partner_report(osv.osv_memory): ('supplier','Payable Accounts'), ('customer_supplier' ,'Receivable and Payable Accounts')], "Partner's", required=True), - 'target_move': fields.selection([('all', 'All Entries'), - ('posted', 'All Posted Entries')], 'Target Moves', required=True), } _defaults = { 'result_selection': 'customer', - 'target_move': 'all' } def pre_print_report(self, cr, uid, ids, data, context=None): if context is None: context = {} - data['form'].update(self.read(cr, uid, ids, ['result_selection', 'target_move'])[0]) + data['form'].update(self.read(cr, uid, ids, ['result_selection'])[0]) return data account_common_partner_report() diff --git a/addons/account/wizard/account_report_partner_balance_view.xml b/addons/account/wizard/account_report_partner_balance_view.xml index 2b970b45f93..bf08dd806de 100644 --- a/addons/account/wizard/account_report_partner_balance_view.xml +++ b/addons/account/wizard/account_report_partner_balance_view.xml @@ -8,11 +8,9 @@ form - + - - diff --git a/addons/account/wizard/account_report_partner_ledger_view.xml b/addons/account/wizard/account_report_partner_ledger_view.xml index f4cb72abe55..33f8e765387 100644 --- a/addons/account/wizard/account_report_partner_ledger_view.xml +++ b/addons/account/wizard/account_report_partner_ledger_view.xml @@ -8,9 +8,8 @@ form - + - From c791e55ef612f42c8a255623cd4fd0e683f89983 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Mon, 4 Oct 2010 16:43:44 +0530 Subject: [PATCH 011/142] [IMP] Account: Access rights for Analytic Account (Add analytic group on all modules) where this field appear bzr revid: ara@tinyerp.com-20101004111344-8rx877ce28g5eigv --- addons/account/account_view.xml | 4 +- .../report/account_analytic_entries_report.py | 2 +- .../account_analytic_entries_report_view.xml | 8 +- .../account_analytic_default_view.xml | 8 +- .../account_analytic_plans.py | 2 +- .../account_analytic_plans_view.xml | 8 +- .../wizard/account_crossovered_analytic.py | 2 +- .../account_crossovered_analytic_view.xml | 2 +- addons/account_budget/account_budget.py | 2 +- addons/account_budget/account_budget_view.xml | 14 ++-- addons/auction/auction.py | 20 ++--- addons/auction/auction_view.xml | 2 +- addons/hr_expense/hr_expense_view.xml | 14 ++-- .../report/hr_expense_report_view.xml | 8 +- addons/hr_payroll/hr_payroll_view.xml | 6 +- .../wizard/hr_timesheet_sign_in_out.py | 2 +- .../wizard/hr_timesheet_sign_in_out_view.xml | 2 +- .../hr_timesheet_invoice_report_view.xml | 74 +++++++++---------- .../report/report_analytic_view.xml | 20 ++--- .../hr_timesheet_invoice_create_view.xml | 2 +- .../hr_timesheet_sheet_view.xml | 30 ++++---- .../report/hr_timesheet_report_view.xml | 12 +-- .../report/timesheet_report_view.xml | 6 +- addons/mrp/mrp_view.xml | 2 +- addons/project_planning/project_planning.py | 4 +- .../project_planning_view.xml | 20 ++--- addons/purchase/purchase_view.xml | 10 +-- addons/sale/report/sale_report_view.xml | 8 +- addons/sale/sale_view.xml | 32 ++++---- addons/sale_crm/wizard/crm_make_sale_view.xml | 2 +- 30 files changed, 164 insertions(+), 164 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 8fca640bdf7..bd07994bf29 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1568,7 +1568,7 @@ - + @@ -1587,7 +1587,7 @@ - + diff --git a/addons/account/report/account_analytic_entries_report.py b/addons/account/report/account_analytic_entries_report.py index ec813b8ecd8..aa0c5b3ba99 100644 --- a/addons/account/report/account_analytic_entries_report.py +++ b/addons/account/report/account_analytic_entries_report.py @@ -38,7 +38,7 @@ class analytic_entries_report(osv.osv): 'partner_id': fields.many2one('res.partner', 'Partner'), 'company_id': fields.many2one('res.company', 'Company', required=True), 'currency_id': fields.many2one('res.currency', 'Currency', required=True), - 'account_id': fields.many2one('account.analytic.account', 'Account', required=True), + 'account_id': fields.many2one('account.analytic.account', 'Account', required=False), 'general_account_id': fields.many2one('account.account', 'General Account', required=True), 'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True), 'move_id': fields.many2one('account.move.line', 'Move', required=True), diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml index da08d56af0d..a131400948b 100644 --- a/addons/account/report/account_analytic_entries_report_view.xml +++ b/addons/account/report/account_analytic_entries_report_view.xml @@ -16,7 +16,7 @@ - + @@ -49,7 +49,7 @@ help="Analytic Entries during last 7 days"/> - + @@ -63,7 +63,7 @@ - + @@ -72,7 +72,7 @@ - + diff --git a/addons/account_analytic_default/account_analytic_default_view.xml b/addons/account_analytic_default/account_analytic_default_view.xml index 95a39eb11e6..179c9da45ec 100644 --- a/addons/account_analytic_default/account_analytic_default_view.xml +++ b/addons/account_analytic_default/account_analytic_default_view.xml @@ -8,7 +8,7 @@ - + @@ -25,7 +25,7 @@ form - + @@ -44,7 +44,7 @@ search - + @@ -68,7 +68,7 @@ src_model="account.account" context="{'search_default_account_id': [active_id]}" /> - + - + @@ -153,7 +153,7 @@ - + @@ -210,7 +210,7 @@
- + @@ -226,7 +226,7 @@ - + diff --git a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py index 2429650a800..97df80e23fc 100644 --- a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py +++ b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py @@ -30,7 +30,7 @@ class account_crossovered_analytic(osv.osv_memory): 'date1': fields.date('Start Date', required=True), 'date2': fields.date('End Date', required=True), 'journal_ids': fields.many2many('account.analytic.journal', 'crossovered_journal_rel', 'crossover_id', 'journal_id', 'Analytic Journal'), - 'ref': fields.many2one('account.analytic.account', 'Analytic Account Reference', required=True), + 'ref': fields.many2one('account.analytic.account', 'Analytic Account Reference', required=False), 'empty_line': fields.boolean('Dont show empty lines'), } _defaults = { diff --git a/addons/account_analytic_plans/wizard/account_crossovered_analytic_view.xml b/addons/account_analytic_plans/wizard/account_crossovered_analytic_view.xml index bdf915d9f98..6c496e18267 100644 --- a/addons/account_analytic_plans/wizard/account_crossovered_analytic_view.xml +++ b/addons/account_analytic_plans/wizard/account_crossovered_analytic_view.xml @@ -12,7 +12,7 @@ - + diff --git a/addons/account_budget/account_budget.py b/addons/account_budget/account_budget.py index 99c90badf60..74bc4dba3a2 100644 --- a/addons/account_budget/account_budget.py +++ b/addons/account_budget/account_budget.py @@ -238,7 +238,7 @@ class crossovered_budget_lines(osv.osv): _description = "Budget Line" _columns = { 'crossovered_budget_id': fields.many2one('crossovered.budget', 'Budget', ondelete='cascade', select=True, required=True), - 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account',required=True), + 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account',required=False), 'general_budget_id': fields.many2one('account.budget.post', 'Budgetary Position',required=True), 'date_from': fields.date('Start Date', required=True), 'date_to': fields.date('End Date', required=True), diff --git a/addons/account_budget/account_budget_view.xml b/addons/account_budget/account_budget_view.xml index 99083d097b6..d6c4b82e960 100644 --- a/addons/account_budget/account_budget_view.xml +++ b/addons/account_budget/account_budget_view.xml @@ -77,13 +77,13 @@ - + - + @@ -94,7 +94,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -213,7 +213,7 @@ tree - + @@ -232,7 +232,7 @@ - + diff --git a/addons/auction/auction.py b/addons/auction/auction.py index 834e7e9b150..c5d1c0fa89f 100644 --- a/addons/auction/auction.py +++ b/addons/auction/auction.py @@ -64,7 +64,7 @@ class auction_dates(osv.osv): reads = self.read(cr, uid, ids, ['name', 'auction1'], context) name = [(r['id'], '['+r['auction1']+'] '+ r['name']) for r in reads] return name - + def _get_invoice(self, cr, uid, ids, name, arg, context={}): lots_obj = self.pool.get('auction.lots') result = {} @@ -100,7 +100,7 @@ class auction_dates(osv.osv): 'adj_total': fields.function(_adjudication_get, method=True, string='Total Adjudication', store=True), 'state': fields.selection((('draft', 'Draft'), ('closed', 'Closed')), 'State', select=1, readonly=True, help='When auction starts the state is \'Draft\'.\n At the end of auction, the state becomes \'Closed\'.'), - 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True), + 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=False), 'buyer_invoice_history': fields.function(_get_invoice, relation='account.invoice', method=True, string="Buyer Invoice", type='many2many', multi=True), 'seller_invoice_history': fields.function(_get_invoice, relation='account.invoice', method=True, string="Seller Invoice", type='many2many', multi=True), } @@ -621,14 +621,14 @@ class auction_lots(osv.osv): taxes.append(lot.author_right.id) inv_line= { - 'invoice_id': inv_id, - 'quantity': 1, - 'product_id': lot.product_id.id, - 'name': 'proforma'+'['+str(lot.obj_num)+'] '+ lot.name, - 'invoice_line_tax_id': [(6, 0, taxes)], - 'account_analytic_id': lot.auction_id.account_analytic_id.id, - 'account_id': lot.auction_id.acc_income.id, - 'price_unit': lot.obj_price, + 'invoice_id': inv_id, + 'quantity': 1, + 'product_id': lot.product_id.id, + 'name': 'proforma'+'['+str(lot.obj_num)+'] '+ lot.name, + 'invoice_line_tax_id': [(6, 0, taxes)], + 'account_analytic_id': lot.auction_id.account_analytic_id.id, + 'account_id': lot.auction_id.acc_income.id, + 'price_unit': lot.obj_price, } inv_line_obj.create(cr, uid, inv_line, context) inv_ref.button_compute(cr, uid, invoices.values()) diff --git a/addons/auction/auction_view.xml b/addons/auction/auction_view.xml index c3068753a6e..3c8cb5c0278 100644 --- a/addons/auction/auction_view.xml +++ b/addons/auction/auction_view.xml @@ -134,7 +134,7 @@ - + diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml index 79c0d5513f0..41f87a991c3 100644 --- a/addons/hr_expense/hr_expense_view.xml +++ b/addons/hr_expense/hr_expense_view.xml @@ -13,7 +13,7 @@ - + @@ -30,8 +30,8 @@ - - + + @@ -98,7 +98,7 @@