diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 7045f5c069c..e01dbc70f07 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -104,6 +104,7 @@ module named account_voucher. 'account_invoice_view.xml', 'partner_view.xml', 'data/account_data.xml', + 'data/data_financial_report.xml', 'data/data_account_type.xml', 'account_invoice_workflow.xml', 'project/project_view.xml', @@ -122,8 +123,6 @@ module named account_voucher. 'ir_sequence_view.xml', 'company_view.xml', 'board_account_view.xml', - "wizard/account_report_profit_loss_view.xml", - "wizard/account_report_balance_sheet_view.xml", "edi/invoice_action_data.xml", "account_bank_view.xml", "account_pre_install.yml" diff --git a/addons/account/account.py b/addons/account/account.py index e2ce5ff8063..e923080f9ad 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -130,6 +130,43 @@ account_payment_term_line() class account_account_type(osv.osv): _name = "account.account.type" _description = "Account Type" + + def _get_current_report_type(self, cr, uid, ids, name, arg, context=None): + obj_data = self.pool.get('ir.model.data') + obj_financial_report = self.pool.get('account.financial.report') + res = {} + financial_report_ref = { + 'asset': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_assets0')[1], context=context), + 'liability': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_liability0')[1], context=context), + 'income': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_income0')[1], context=context), + 'expense': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_expense0')[1], context=context), + } + for record in self.browse(cr, uid, ids, context=context): + res[record.id] = 'none' + for key, financial_report in financial_report_ref.items(): + list_ids = [x.id for x in financial_report.account_type_ids] + if record.id in list_ids: + res[record.id] = key + return res + + def _save_report_type(self, cr, uid, account_type_id, field_name, field_value, arg, context=None): + obj_data = self.pool.get('ir.model.data') + obj_financial_report = self.pool.get('account.financial.report') + #unlink if it exists somewhere in the financial reports related to BS or PL + financial_report_ref = { + 'asset': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_assets0')[1], context=context), + 'liability': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_liability0')[1], context=context), + 'income': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_income0')[1], context=context), + 'expense': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_expense0')[1], context=context), + } + for key, financial_report in financial_report_ref.items(): + list_ids = [x.id for x in financial_report.account_type_ids] + if account_type_id in list_ids: + obj_financial_report.write(cr, uid, [financial_report.id], {'account_type_ids': [(3, account_type_id)]}) + #write it in the good place + if field_value != 'none': + return obj_financial_report.write(cr, uid, [financial_report_ref[field_value].id], {'account_type_ids': [(4, account_type_id)]}) + _columns = { 'name': fields.char('Account Type', size=64, required=True, translate=True), 'code': fields.char('Code', size=32, required=True), @@ -139,19 +176,16 @@ class account_account_type(osv.osv): 'Balance' will generally be used for cash accounts. 'Detail' will copy each existing journal item of the previous year, even the reconciled ones. 'Unreconciled' will copy only the journal items that were unreconciled on the first day of the new fiscal year."""), - 'sign': fields.selection([(-1, 'Reverse balance sign'), (1, 'Preserve balance sign')], 'Sign on Reports', required=True, help='For accounts that are typically more debited than credited and that you would like to print as negative amounts in your reports, you should reverse the sign of the balance; e.g.: Expense account. The same applies for accounts that are typically more credited than debited and that you would like to print as positive amounts in your reports; e.g.: Income account.'), - 'report_type':fields.selection([ - ('none','/'), - ('income','Profit & Loss (Income Accounts)'), - ('expense','Profit & Loss (Expense Accounts)'), - ('asset','Balance Sheet (Asset Accounts)'), - ('liability','Balance Sheet (Liability Accounts)') - ],'P&L / BS Category', select=True, readonly=False, help="This field is used to generate legal reports: profit and loss, balance sheet.", required=True), + 'report_type': fields.function(_get_current_report_type, fnct_inv=_save_report_type, type='selection', string='P&L / BS Category', + selection= [('none','/'), + ('income', _('Profit & Loss (Income account)')), + ('expense', _('Profit & Loss (Expense account)')), + ('asset', _('Balance Sheet (Asset account)')), + ('liability', _('Balance Sheet (Liability account)'))], help="This field is used to generate legal reports: profit and loss, balance sheet.", required=True), 'note': fields.text('Description'), } _defaults = { 'close_method': 'none', - 'sign': 1, 'report_type': 'none', } _order = "code" @@ -771,7 +805,9 @@ class account_journal(osv.osv): def create(self, cr, uid, vals, context=None): if not 'sequence_id' in vals or not vals['sequence_id']: - vals.update({'sequence_id': self.create_sequence(cr, uid, vals, context)}) + # if we have the right to create a journal, we should be able to + # create it's sequence. + vals.update({'sequence_id': self.create_sequence(cr, 1, vals, context)}) return super(account_journal, self).create(cr, uid, vals, context) def name_get(self, cr, user, ids, context=None): @@ -2910,6 +2946,7 @@ class account_financial_report(osv.osv): return res def _get_balance(self, cr, uid, ids, name, args, context=None): + account_obj = self.pool.get('account.account') res = {} res_all = {} for report in self.browse(cr, uid, ids, context=context): @@ -2920,6 +2957,12 @@ class account_financial_report(osv.osv): # it's the sum of balance of the linked accounts for a in report.account_ids: balance += a.balance + elif report.type == 'account_type': + # it's the sum of balance of the leaf accounts with such an account type + report_types = [x.id for x in report.account_type_ids] + account_ids = account_obj.search(cr, uid, [('user_type','in', report_types), ('type','!=','view')], context=context) + for a in account_obj.browse(cr, uid, account_ids, context=context): + balance += a.balance elif report.type == 'account_report' and report.account_report_id: # it's the amount of the linked report res2 = self._get_balance(cr, uid, [report.account_report_id.id], 'balance', False, context=context) @@ -2942,7 +2985,6 @@ class account_financial_report(osv.osv): 'parent_id': fields.many2one('account.financial.report', 'Parent'), 'children_ids': fields.one2many('account.financial.report', 'parent_id', 'Account Report'), 'sequence': fields.integer('Sequence'), - 'note': fields.text('Notes'), 'balance': fields.function(_get_balance, 'Balance'), 'level': fields.function(_get_level, string='Level', store=True, type='integer'), 'type': fields.selection([ @@ -2952,13 +2994,20 @@ class account_financial_report(osv.osv): ('account_report','Report Value'), ],'Type'), 'account_ids': fields.many2many('account.account', 'account_account_financial_report', 'report_line_id', 'account_id', 'Accounts'), - 'display_detail': fields.boolean('Display details', help='Display every account with its balance instead of the sum.'), + 'display_detail': fields.selection([ + ('no_detail','No detail'), + ('detail_flat','Display children flat'), + ('detail_with_hierarchy','Display children with hierarchy') + ], 'Display details'), 'account_report_id': fields.many2one('account.financial.report', 'Report Value'), 'account_type_ids': fields.many2many('account.account.type', 'account_account_financial_report_type', 'report_id', 'account_type_id', 'Account Types'), + 'sign': fields.selection([(-1, 'Reverse balance sign'), (1, 'Preserve balance sign')], 'Sign on Reports', required=True, help='For accounts that are typically more debited than credited and that you would like to print as negative amounts in your reports, you should reverse the sign of the balance; e.g.: Expense account. The same applies for accounts that are typically more credited than debited and that you would like to print as positive amounts in your reports; e.g.: Income account.'), } _defaults = { 'type': 'sum', + 'display_detail': 'detail_flat', + 'sign': 1, } account_financial_report() diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 85d9805eb32..ab36586fe2f 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -34,8 +34,6 @@ class account_bank_statement(osv.osv): for line in vals['line_ids']: seq += 1 line[2]['sequence'] = seq - new_line_ids += tuple(line) - vals['line_ids'] = new_line_ids return super(account_bank_statement, self).create(cr, uid, vals, context=context) def write(self, cr, uid, ids, vals, context=None): diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml index cbdb665e157..430d65e0bf9 100644 --- a/addons/account/account_installer.xml +++ b/addons/account/account_installer.xml @@ -25,7 +25,7 @@ - + diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 39cc471c2f6..bef6e68221a 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -610,15 +610,15 @@ class account_invoice(osv.osv): res[r[0]].append( r[1] ) return res - def copy(self, cr, uid, id, default={}, context=None): - if context is None: - context = {} + def copy(self, cr, uid, id, default=None, context=None): + default = default or {} default.update({ 'state':'draft', 'number':False, 'move_id':False, 'move_name':False, 'internal_number': False, + 'period_id': False, }) if 'date_invoice' not in default: default.update({ @@ -1642,12 +1642,7 @@ class res_partner(osv.osv): } def copy(self, cr, uid, id, default=None, context=None): - if default is None: - default = {} - - if context is None: - context = {} - + default = default or {} default.update({'invoice_ids' : []}) return super(res_partner, self).copy(cr, uid, id, default, context) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 4cc1a63db61..d14106bab5f 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -362,13 +362,13 @@ - + - + - - diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 59a2a8eaa19..6afdf857b96 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -326,6 +326,7 @@ @@ -786,7 +787,6 @@ - @@ -2486,6 +2486,9 @@ act_window_ids = pool.get('ir.actions.act_window').search(cr, uid,[('name', 'in', ('Accounting Chart Configuration', 'Generate Chart of Accounts from a Chart Template'))], context=context) +ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_account_configuration_installer') +if ref: + act_window_ids += [ref[1]] todo_ids = pool.get('ir.actions.todo').search(cr, uid, [('action_id', 'in', act_window_ids)], context=context) pool.get('ir.actions.todo').write(cr, uid, todo_ids, {'state':'open'}, context=context) action = pool.get('res.config').next(cr, uid, [], context) @@ -2777,10 +2780,14 @@ action = pool.get('res.config').next(cr, uid, [], context) + - - - + + + + + @@ -2789,9 +2796,6 @@ action = pool.get('res.config').next(cr, uid, [], context) - - - diff --git a/addons/account/board_account_view.xml b/addons/account/board_account_view.xml index 5108a62cf3e..ffd2811cba7 100644 --- a/addons/account/board_account_view.xml +++ b/addons/account/board_account_view.xml @@ -41,12 +41,11 @@
- + -
diff --git a/addons/account/configurable_account_chart.xml b/addons/account/configurable_account_chart.xml index 0ac7a51405d..fa0aa3459dd 100644 --- a/addons/account/configurable_account_chart.xml +++ b/addons/account/configurable_account_chart.xml @@ -1,26 +1,6 @@ - - Receivable - receivable - income - unreconciled - - - - Payable - payable - expense - unreconciled - - - - View - view - none - - Income View view @@ -41,78 +21,32 @@ liability liability - - - Income - income - income - none - - - - Expense - expense - expense - none - - Tax tax - expense unreconciled + expense - - - Cash - cash - asset - balance - - - - Liability - liability - liability - balance - - - - Asset - asset - asset - balance - - Equity equity + balance liability - balance - - - Bank - bank - asset - balance - - + Check check - asset balance + asset - - 0 Configurable Account Chart view - + @@ -122,7 +56,7 @@ Balance Sheet view - + @@ -162,7 +96,7 @@ Purchased Stocks other - + @@ -171,7 +105,7 @@ receivable - + @@ -179,7 +113,7 @@ Tax Paid other - + @@ -195,7 +129,7 @@ Opening Income Account other - + @@ -212,7 +146,7 @@ payable - + @@ -220,7 +154,7 @@ Tax Received other - + @@ -229,7 +163,7 @@ other - + @@ -237,7 +171,7 @@ Opening Expense Account other - + @@ -247,7 +181,7 @@ Profit and Loss view - + @@ -263,7 +197,7 @@ Product Sales other - + @@ -279,7 +213,7 @@ Cost of Goods Sold other - + @@ -295,7 +229,7 @@ Expenses other - + @@ -303,7 +237,7 @@ Salary Expenses other - + diff --git a/addons/account/data/data_account_type.xml b/addons/account/data/data_account_type.xml index ebed0ebb5de..590357ef080 100644 --- a/addons/account/data/data_account_type.xml +++ b/addons/account/data/data_account_type.xml @@ -30,21 +30,25 @@ Asset asset balance + asset Liability liability balance + liability Income income none + income Expense expense none + expense diff --git a/addons/account/data/data_financial_report.xml b/addons/account/data/data_financial_report.xml new file mode 100644 index 00000000000..18624f94749 --- /dev/null +++ b/addons/account/data/data_financial_report.xml @@ -0,0 +1,43 @@ + + + + + + Balance Sheet + sum + + + Assets + + detail_with_hierarchy + account_type + + + Liability + + detail_with_hierarchy + account_type + + + + Profit and Loss + sum + + + Income + + detail_with_hierarchy + account_type + + + Expense + + detail_with_hierarchy + account_type + + + + + diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index 50b597c8e49..baa94450f02 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -5,58 +5,11 @@ Account Type --> - - View - view - none - - - Asset - asset - asset - balance - - - Receivable - receivable - asset - unreconciled - - - Liability - liability - liability - balance - - - Payable - payable - liability - unreconciled - - - Income - income - income - none - - - Expense - expense - expense - none - Equity equity + balance liability - balance - - - Cash - cash - asset - balance @@ -78,14 +31,14 @@ Balance Sheet - (test) view - + Assets - (test) X10 view - + @@ -95,7 +48,7 @@ Fixed Assets - (test) view - + @@ -103,7 +56,7 @@ Fixed Asset Account - (test) other - + @@ -111,7 +64,7 @@ Net Current Assets - (test) view - + @@ -119,7 +72,7 @@ Current Assets - (test) view - + @@ -127,7 +80,7 @@ Purchased Stocks - (test) other - + @@ -136,7 +89,7 @@ receivable - + @@ -144,7 +97,7 @@ Output VAT - (test) other - + @@ -152,7 +105,7 @@ Bank Current Account - (test) liquidity - + @@ -160,7 +113,7 @@ Cash - (test) liquidity - + @@ -168,14 +121,14 @@ Opening Income - (test) other - + Liabilities - (test) X11 view - + @@ -185,7 +138,7 @@ Current Liabilities - (test) view - + @@ -194,7 +147,7 @@ payable - + @@ -202,7 +155,7 @@ Input VAT - (test) other - + @@ -210,7 +163,7 @@ Reserve and Profit/Loss - (test) other - + @@ -218,7 +171,7 @@ Opening Expense - (test) other - + @@ -228,14 +181,14 @@ Profit and Loss - (test) view - + Income - (test) X20 view - + @@ -244,7 +197,7 @@ Foreign Exchange Gain - (test) X201 other - + @@ -254,7 +207,7 @@ Revenue - (test) view - + @@ -262,14 +215,14 @@ Product Sales - (test) other - + Expense - (test) X21 view - + @@ -280,7 +233,7 @@ Cost of Sales - (test) view - + @@ -288,7 +241,7 @@ Cost of Goods Sold - (test) other - + @@ -296,7 +249,7 @@ Overheads - (test) view - + @@ -304,14 +257,14 @@ Expenses - (test) other - + Foreign Exchange Loss - (test) X2111 other - + @@ -321,7 +274,7 @@ Salary Expenses - (test) other - + diff --git a/addons/account/installer.py b/addons/account/installer.py index cfd434833ae..d1b19ef4319 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -24,6 +24,7 @@ import time import datetime from dateutil.relativedelta import relativedelta from operator import itemgetter +from os.path import join as opj from tools.translate import _ from osv import fields, osv @@ -111,6 +112,11 @@ class account_installer(osv.osv_memory): context = {} fy_obj = self.pool.get('account.fiscalyear') for res in self.read(cr, uid, ids, context=context): + if 'charts' in res and res['charts'] == 'configurable': + #load generic chart of account + fp = tools.file_open(opj('account', 'configurable_account_chart.xml')) + tools.convert_xml_import(cr, 'account', fp, {}, 'init', True, None) + fp.close() if 'date_start' in res and 'date_stop' in res: f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context) if not f_ids: diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py index 90254c53bda..70ceb4b8f83 100644 --- a/addons/account/report/__init__.py +++ b/addons/account/report/__init__.py @@ -33,13 +33,10 @@ import account_print_overdue import account_aged_partner_balance #import tax_report import account_tax_report -import account_balance_landscape import account_invoice_report import account_report import account_entries_report import account_analytic_entries_report -import account_balance_sheet -import account_profit_loss import account_treasury_report import account_financial_report diff --git a/addons/account/report/account_balance_landscape.py b/addons/account/report/account_balance_landscape.py deleted file mode 100644 index 4e62a9777c9..00000000000 --- a/addons/account/report/account_balance_landscape.py +++ /dev/null @@ -1,393 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# 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 . -# -############################################################################## - -import time -import locale -from report import report_sxw - -parents = { - 'tr':1, - 'li':1, - 'story': 0, - 'section': 0 -} - -class account_balance_landscape(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): - super(account_balance_landscape, self).__init__(cr, uid, name, context=context) - self.flag=1 - self.dr_total= 0.00 - self.cr_total= 0.00 - self.parent_bal=0 - self.status=0 - self.done_total=0 - self.baldiv={} - self.empty_parent=0 - self.result_total = {} - self.total_for_perc=[] - self.localcontext.update({ - 'time': time, - 'lines': self.lines, - 'get_lines':self.get_lines, - 'linesForTotal': self.linesForTotal, - 'linesForYear': self.linesForYear, - 'get_years':self.get_years, - 'cal_total':self.cal_total, - 'total_dr':self.total_dr, - 'total_cr':self.total_cr - }) - self.context = context - - def linesForYear(self,form): - temp=0 - years={} - - global pattern - global show - global perc - global bal_zero - global ref_bal - - pattern=form['compare_pattern'] - - if form['show_columns']!=1: - show=0 - else: - show=form['show_columns'] - - if form['format_perc']!=1: - perc=0 - else: - perc=form['format_perc'] - - if form['account_choice']=='bal_zero': - bal_zero=0 - else: - bal_zero=1 - - ctx = self.context.copy() - - if perc==1: - if form['select_account']!=False: - ref_ac=self.pool.get('account.account').browse(self.cr, self.uid, form['select_account'], ctx.copy()) - if ref_ac.balance<>0.00: - ref_bal=ref_ac.balance - else: - ref_bal=1.00 - else: - ref_bal='nothing' - else: - ref_bal='nothing' - - - self.done_total=1 - self.total_for_perc=self.linesForTotal(form, ids={}, doneAccount={}, level=1) - self.done_total=0 - - for t1 in range(0,len(form['fiscalyear'])): - locale.setlocale(locale.LC_ALL, '') - self.result_total["sum_credit" + str(t1)]=locale.format("%.2f", self.result_total["sum_credit" + str(t1)], grouping=True) - self.result_total["sum_debit" + str(t1)]=locale.format("%.2f", self.result_total["sum_debit" + str(t1)], grouping=True) - - for temp in range(0,len(form['fiscalyear'])): - fy=self.pool.get('account.fiscalyear').name_get(self.cr, self.uid, form['fiscalyear'][temp]) - years["year"+str(temp)]=fy[0][1][12:16] - - return [years] - - - def linesForTotal(self, form, ids={}, doneAccount={}, level=1): - if not self.done_total==1: - return [self.result_total] - accounts=[] - if not ids: - ids = self.ids - if not ids: - return [] - - ctx = self.context.copy() - - for id in form['fiscalyear']: - tmp=[] - - ctx['fiscalyear'] = id - ctx['periods'] = form['periods'] - ctx['period_manner'] = form['period_manner'] - ctx['state'] = form['context'].get('state','all') - tmp = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx.copy()) - - if tmp: - accounts.append(tmp) - - merged_accounts=zip(*accounts) - # used to check for the frst record so all sum_credit and sum_debit r set to 0.00 - if level==1: - doneAccount={} - for entry in merged_accounts: - - if entry[0].id in doneAccount: - continue - doneAccount[entry[0].id] = 1 - - for k in range(0,len(entry)): - temp_credit=0.00 - temp_debit=0.00 - if entry[0].type <> 'view': - temp_credit+=entry[k].credit - temp_debit+=entry[k].debit - - if self.flag==1: - self.result_total["sum_credit" + str(k)]=0.00 - self.result_total["sum_debit" + str(k)]=0.00 - - if form['account_choice']=='bal_zero': - if temp_credit<>temp_debit: - self.result_total["sum_credit" + str(k)]+=temp_credit - self.result_total["sum_debit" + str(k)]+=temp_debit - else: - self.result_total["sum_credit" + str(k)]+=temp_credit - self.result_total["sum_debit" + str(k)]+=temp_debit - - self.flag=2 - - if entry[0].child_id: - ids2 = [(x.code,x.id) for x in entry[0].child_id] - ids2.sort() - - result_total_parent = self.linesForTotal(form, [x[1] for x in ids2], doneAccount, level+1) - - return [self.result_total] - - def lines(self, form, ids={}, done={}, level=1): - accounts=[] - if not ids: - ids = self.ids - if not ids: - return [] - result = [] - ctx = self.context.copy() - tmp1=[] - for id in form['fiscalyear']: - - ctx['fiscalyear'] = id - ctx['periods'] = form['periods'] - ctx['period_manner']=form['period_manner'] - ctx['state'] = form['context'].get('state','all') - tmp1 = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx.copy()) - - if tmp1: - accounts.append(tmp1) - - if level==1: #if parent is called,done is not empty when called again. - done={} - - def cmp_code(x, y): - return cmp(x.code, y.code) - for n in range(0,len(accounts)): - accounts[n].sort(cmp_code) - merged_accounts=zip(*accounts) - - for entry in merged_accounts: - j=0 - checked=1 - - if form['account_choice']!='all': # if checked,include empty a/c;not otherwise - checked=0 - - if entry[0].id in done: - continue - done[entry[0].id] = 1 - - if entry[0].child_id: # this is for parent account,dont check 0 for it - checked=4 - self.status=1 # for displaying it Bold - else: - self.status=0 - if checked==0: - i=0 - for i in range(0,len(entry)): - if bal_zero==0: - if entry[i].balance<>0.0: - checked=4 - break - else: - checked=3 - i=i+1 - else: - if entry[i].credit <> 0.0 or entry[i].debit <> 0.0: - checked=4 - break - else: - checked=3 - i=i+1 - - if checked==3: - # this is the point where we skip those accounts which are encountered as empty ones - continue - self.empty_parent=0 - else: - self.empty_parent=1 - res = { - 'code': entry[0].code, - 'name': entry[0].name, - 'level': level, - 'status': self.status, - } - - for j in range(0,len(entry)): - - locale.setlocale(locale.LC_ALL, '') - res["debit"+str(j)]=locale.format("%.2f", entry[j].debit, grouping=True) - res["credit"+str(j)]=locale.format("%.2f", entry[j].credit, grouping=True) - res["balance"+str(j)]=locale.format("%.2f", entry[j].balance, grouping=True) - - - if j==0: - res["bal_cash"+str(j)]="0.00" - res["bal_perc"+str(j)]="0.00%" - else: - temp_cash=entry[j].balance - entry[j-1].balance - res["bal_cash"+str(j)]=locale.format("%.2f", temp_cash, grouping=True) - if entry[j-1].balance<>0.00: - temp_perc=(entry[j].balance - entry[j-1].balance )*100/entry[j-1].balance - else: - temp_perc=(entry[j].balance) *100 - - res["bal_perc"+str(j)]=locale.format("%.2f", temp_perc) + "%" - - - if ref_bal=='nothing': - if level==1: - self.parent_bal=1 - else: - self.parent_bal=0 - - if self.parent_bal==1: - res["balance_perc"+str(j)]="/" - else: - if entry[j].balance==0.00: - if self.baldiv["baldiv"+str(level-1)+str(j)]<>0.00: - res["balance_perc"+str(j)]="0.00%" - else: - res["balance_perc"+str(j)]="/" - else: - if self.baldiv["baldiv"+str(level-1)+str(j)]<>0.00: - temp=self.baldiv["baldiv"+str(level-1)+str(j)] - temp1=(entry[j].balance * 100 )/ float(temp) - temp1=round(temp1,2) - res["balance_perc" + str(j)]=str(temp1)+"%" - else: - res["balance_perc"+str(j)]="/" - else: - res["balance_perc"+str(j)]=str( (entry[j].balance * 100 )/ float(ref_bal)) + "%" - - result.append(res) - - if entry[0].child_id: - - for q in range(0,len(form['fiscalyear'])): - self.baldiv["baldiv"+str(level)+str(q)]=entry[q].balance - - ids2 = [(x.code,x.id) for x in entry[0].child_id] - ids2.sort() - dir=[] - dir += self.lines(form, [x[1] for x in ids2], done, level+1) - if dir==[]: - for w in range(0,len(form['fiscalyear'])): - if entry[w].credit <> 0.0 or entry[w].debit <> 0.0 or entry[w].balance<>0.00: - dont_pop=1 - break - else: - dont_pop=0 - if dont_pop==1: - result +=dir - else: - result.pop(-1) # here we pop up the parent having its children as emprty accounts - else: - result +=dir - - return result - - def get_years(self, form): - result =[] - res={} - for temp in range(0, len(form['fiscalyear'])): - res={} - fy=self.pool.get('account.fiscalyear').name_get(self.cr, self.uid, form['fiscalyear'][temp]) - res['year']=fy[0][1] - res['last_str']=temp - - result.append(res) - self.linesForYear(form) - return result - - def get_lines(self, year_dict, form): - final_result = [] - res = {} - line_l = self.lines(form) - self.cal_total(year_dict) - if line_l: - for l in line_l: - res = {} - res['code'] = l['code'] - res['name'] = l['name'] - res['level'] = l['level'] - for k,v in l.items(): - if k.startswith('debit'+str(year_dict['last_str'])): - res['debit'] = v - if k.startswith('credit'+str(year_dict['last_str'])): - res['credit'] = v - if k.startswith('balance'+str(year_dict['last_str'])) and not k.startswith('balance_perc'+str(year_dict['last_str'])): - res['balance'] =v - if k.startswith('balance_perc'+str(year_dict['last_str'])) and not k.startswith('balance'+str(year_dict['last_str'])): - res['balance_perc'] = v - if form['compare_pattern'] == 'bal_perc': - if k.startswith('bal_perc'+str(year_dict['last_str'])): - res['pattern'] = v - elif form['compare_pattern'] == 'bal_cash': - if k.startswith('bal_cash'+str(year_dict['last_str'])): - res['pattern'] = v - else: - res['pattern'] = '' - final_result.append(res) - return final_result - - def cal_total(self, year_dict): - total_l = self.result_total - if total_l: - for k,v in total_l.items(): - if k.startswith('sum_debit'+str(year_dict['last_str'])): - self.dr_total = v - elif k.startswith('sum_credit'+str(year_dict['last_str'])): - self.cr_total = v - else: - continue - return True - - def total_dr(self): - return self.dr_total - - def total_cr(self): - return self.cr_total - -report_sxw.report_sxw('report.account.account.balance.landscape', 'account.account', 'addons/account/report/account_balance_landscape.rml', parser=account_balance_landscape, header="internal landscape") -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/account/report/account_balance_landscape.rml b/addons/account/report/account_balance_landscape.rml deleted file mode 100644 index d8e4881bbbe..00000000000 --- a/addons/account/report/account_balance_landscape.rml +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(get_years(data['form']), 'y') ]] - - - - Account Balance - [[ company.currency_id.name ]] - - - - - - - Year : [[ y['year'] ]] - - - - [[ data['form']['show_columns'] and 'Code' or removeParentNode('blockTable') ]] - - - Account Name - - - [[ data['form']['compare_pattern']!='none' and 'C.S.Y.T.(C./P)' or removeParentNode('font') ]] - - - Debit - - - Credit - - - Balance - - - - - - - - - - [[ data['form']['show_columns'] and removeParentNode('blockTable') or 'Code' ]] - - - Account Name - - - [[ data['form']['compare_pattern']!='none' and 'C.S.Y.T.(C./P)' or removeParentNode('font') ]] - - - Balance - - - - - - -
- [[ repeatIn(get_lines(y,data['form']), 'a') ]] - - - - [[ (data['form']['format_perc'] or not data['form']['show_columns']) and removeParentNode('blockTable') ]] [[ a['code'] ]] - - - [['.....'*(a['level']-1) ]][[ a['name'] ]] - - - [[ a['pattern'] ]] - - - [[ a['debit'] ]] - - - [[ a['credit'] ]] - - - [[ a['balance'] ]] - - - - - - - - [[ (not data['form']['format_perc'] or not data['form']['show_columns']) and removeParentNode('blockTable') ]] [[ a['code'] ]] - - - [['.....'*(a['level']-1) ]] [[ a['name'] ]] - - - [[ a['pattern'] ]] - - - [[ a['debit'] ]] - - - [[ a['credit'] ]] - - - [[ a['balance'] ]] - - - [[ a['balance_perc'] ]] - - - - - - - - - - [[ (data['form']['format_perc'] or data['form']['show_columns']) and removeParentNode('blockTable') ]] [[ a['code'] ]] - - - [['.....'*(a['level']-1) ]] [[ a['name'] ]] - - - [[ a['pattern'] ]] - - - [[ a['balance'] ]] - - - - - - - - - - [[ (not data['form']['format_perc'] or data['form']['show_columns']) and removeParentNode('blockTable') ]] [[ a['code'] ]] - - - [['.....'*(a['level']-1) ]] [[ a['name'] ]] - - - [[ a['pattern'] ]] - - - [[ a['balance'] ]] - - - [[ a['balance_perc'] ]] - - - - -
- - - - - - - [[ not data['form']['show_columns'] and removeParentNode('blockTable') ]] - - - Total : - - - [[ total_dr() ]] - - - [[ total_cr() ]] - - - - - - - - - - - - [[ data['form']['compare_pattern']!='none' and "C.S.Y.T.(C./P) : Compare Selected Years In Terms of Cash/Perc" or removeParentNode('font') ]] -
-
\ No newline at end of file diff --git a/addons/account/report/account_balance_landscape_old_backup.rml b/addons/account/report/account_balance_landscape_old_backup.rml deleted file mode 100644 index 6790082f8dd..00000000000 --- a/addons/account/report/account_balance_landscape_old_backup.rml +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Account Balance - - - - - - - - - - [[ company.name ]] - - - - - - - - Currency: [[ company.currency_id.name ]] - - - - - - - Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] - - - -
- [[repeatIn(linesForYear(data['form']),'year_header',td=len(data['form']['fiscalyear'][0][2]),width=[126],value=['year'],type=['string']) ]] - - - - Account Information - - - -
-
- [[ repeatIn([],'title',td=len(data['form']['fiscalyear'][0][2]),width=[42,42,42],value=['Debit','Credit','Balance'],type=['lable','lable','lable']) ]] - - - - Code - - - Account Name - - - -
-
- [[ repeatIn([],'title',td=len(data['form']['fiscalyear'][0][2]),width=[84,42],value=['Cash','%'],type=['lable','lable']) ]] - - - - - - - -
- - - -
- [[ repeatIn(lines(data['form']),'a',td=len(data['form']['fiscalyear'][0][2]),width=[42,42,42],value=['debit','credit','balance'],type=['string','string','string']) ]] - - - - - - - [[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['code'] ]] - - - [['.....'*(a['level']-1) ]][[ a['status']==1 and ( setTag('font','font',{'name':'Helvetica-bold'})) ]][[ a['name'] ]] - - - -
- - - -
- [[ repeatIn(linesForTotal(data['form']),'total',td=len(data['form']['fiscalyear'][0][2]),width=[42,42,42],value=['sum_debit','sum_credit',''],type=['string','string','lable'] ) ]] - - - - Total:[[ data['form']['show_columns']==0 and removeParentNode('section')]] - - - -
- - - - -
-
diff --git a/addons/account/report/account_balance_old_backup.rml b/addons/account/report/account_balance_old_backup.rml deleted file mode 100644 index cf67cb6bc3d..00000000000 --- a/addons/account/report/account_balance_old_backup.rml +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Account balance - - - - - - - - [[ company.name ]] - - - - - - Currency: [[ company.currency_id.name ]] - - - - - - - Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] - - - -
- [[repeatIn(linesForYear(data['form']),'year_header',td=len(data['form']['fiscalyear'][0][2]),width=[126],value=['year'],type=['string']) ]] - - - - Account Information - - - -
-
- [[ repeatIn([],'title',td=len(data['form']['fiscalyear'][0][2]),width=[42,42,42],value=['Debit','Credit','Balance'],type=['lable','lable','lable']) ]] - - - - Code - - - Account Name - - - -
-
- [[ repeatIn([],'title',td=len(data['form']['fiscalyear'][0][2]),width=[84,42],value=['Cash','%'],type=['lable','lable']) ]] - - - - - - - -
- - - -
- [[ repeatIn(lines(data['form']),'a',td=len(data['form']['fiscalyear'][0][2]),width=[42,42,42],value=['debit','credit','balance'],type=['string','string','string']) ]] - - - - - - - - - - [[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['code'] ]] - - - [['.....'*(a['level']-1) ]][[ a['status']==1 and ( setTag('font','font',{'name':'Helvetica-bold'})) ]][[ a['name'] ]] - - - -
- - - -
- [[ repeatIn(linesForTotal(data['form']),'total',td=len(data['form']['fiscalyear'][0][2]),width=[42,42,42],value=['sum_debit','sum_credit',''],type=['string','string','lable'] ) ]] - - - - Total:[[ data['form']['show_columns']==0 and removeParentNode('section')]] - - - -
- - - -
-
diff --git a/addons/account/report/account_balance_sheet.py b/addons/account/report/account_balance_sheet.py deleted file mode 100644 index ce9e3c51f06..00000000000 --- a/addons/account/report/account_balance_sheet.py +++ /dev/null @@ -1,224 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# 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 . -# -############################################################################## - -import time - -import pooler -from report import report_sxw -from account.report import account_profit_loss -from common_report_header import common_report_header -from tools.translate import _ - -class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header): - def __init__(self, cr, uid, name, context=None): - super(report_balancesheet_horizontal, self).__init__(cr, uid, name, context=context) - self.obj_pl = account_profit_loss.report_pl_account_horizontal(cr, uid, name, context=context) - self.result_sum_dr = 0.0 - self.result_sum_cr = 0.0 - self.result = {} - self.res_bl = {} - self.result_temp = [] - self.localcontext.update({ - 'time': time, - 'get_lines': self.get_lines, - 'get_lines_another': self.get_lines_another, - 'get_company': self._get_company, - 'get_currency': self._get_currency, - 'sum_dr': self.sum_dr, - 'sum_cr': self.sum_cr, - 'get_data':self.get_data, - 'get_pl_balance':self.get_pl_balance, - 'get_fiscalyear': self._get_fiscalyear, - 'get_account': self._get_account, - 'get_start_period': self.get_start_period, - 'get_end_period': self.get_end_period, - 'get_sortby': self._get_sortby, - 'get_filter': self._get_filter, - 'get_journal': self._get_journal, - 'get_start_date':self._get_start_date, - 'get_end_date':self._get_end_date, - 'get_company':self._get_company, - 'get_target_move': self._get_target_move, - }) - self.context = context - - def set_context(self, objects, data, ids, report_type=None): - new_ids = ids - 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) - return super(report_balancesheet_horizontal, self).set_context(objects, data, new_ids, report_type=report_type) - - def sum_dr(self): - if self.res_bl['type'] == _('Net Profit'): - self.result_sum_dr += self.res_bl['balance']*-1 - return self.result_sum_dr - - def sum_cr(self): - if self.res_bl['type'] == _('Net Loss'): - self.result_sum_cr += self.res_bl['balance'] - return self.result_sum_cr - - def get_pl_balance(self): - return self.res_bl - - def get_data(self,data): - cr, uid = self.cr, self.uid - db_pool = pooler.get_pool(self.cr.dbname) - - #Getting Profit or Loss Balance from profit and Loss report - self.obj_pl.get_data(data) - self.res_bl = self.obj_pl.final_result() - - account_pool = db_pool.get('account.account') - currency_pool = db_pool.get('res.currency') - - types = [ - 'liability', - 'asset' - ] - - ctx = self.context.copy() - ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False) - - if data['form']['filter'] == 'filter_period': - ctx['period_from'] = data['form'].get('period_from', False) - ctx['period_to'] = data['form'].get('period_to', False) - elif data['form']['filter'] == 'filter_date': - ctx['date_from'] = data['form'].get('date_from', False) - ctx['date_to'] = data['form'].get('date_to', False) - ctx['state'] = data['form'].get('target_move', 'all') - cal_list = {} - pl_dict = {} - account_dict = {} - account_id = data['form'].get('chart_account_id', False) - account_ids = account_pool._get_children_and_consol(cr, uid, account_id, context=ctx) - accounts = account_pool.browse(cr, uid, account_ids, context=ctx) - - if not self.res_bl: - self.res_bl['type'] = _('Net Profit') - self.res_bl['balance'] = 0.0 - - if self.res_bl['type'] == _('Net Profit'): - self.res_bl['type'] = _('Net Profit') - else: - self.res_bl['type'] = _('Net Loss') - pl_dict = { - 'code': self.res_bl['type'], - 'name': self.res_bl['type'], - 'level': False, - 'balance':self.res_bl['balance'], - } - for typ in types: - accounts_temp = [] - for account in accounts: - if (account.user_type.report_type) and (account.user_type.report_type == typ): - account_dict = { - 'id': account.id, - 'code': account.code, - 'name': account.name, - 'level': account.level, - 'balance': account.balance != 0 and account.balance * account.user_type.sign or account.balance, - 'type': account.type, - } - currency = account.currency_id and account.currency_id or account.company_id.currency_id - if typ == 'liability' and account.type <> 'view' and (account.debit <> account.credit): - self.result_sum_dr += account.balance - if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit): - self.result_sum_cr += account.balance - if data['form']['display_account'] == 'movement': - if not currency_pool.is_zero(self.cr, self.uid, currency, account.credit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.debit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.balance): - accounts_temp.append(account_dict) - elif data['form']['display_account'] == 'not_zero': - if not currency_pool.is_zero(self.cr, self.uid, currency, account.balance): - accounts_temp.append(account_dict) - else: - accounts_temp.append(account_dict) - if account.id == data['form']['reserve_account_id']: - pl_dict['level'] = account['level'] + 1 - accounts_temp.append(pl_dict) - - self.result[typ] = accounts_temp - cal_list[typ]=self.result[typ] - - if cal_list: - temp = {} - for i in range(0,max(len(cal_list['liability']),len(cal_list['asset']))): - if i < len(cal_list['liability']) and i < len(cal_list['asset']): - temp={ - 'type': cal_list['liability'][i]['type'], - 'code': cal_list['liability'][i]['code'], - 'name': cal_list['liability'][i]['name'], - 'level': cal_list['liability'][i]['level'], - 'balance':cal_list['liability'][i]['balance'], - 'type1': cal_list['asset'][i]['type'], - 'code1': cal_list['asset'][i]['code'], - 'name1': cal_list['asset'][i]['name'], - 'level1': cal_list['asset'][i]['level'], - 'balance1':cal_list['asset'][i]['balance'], - } - self.result_temp.append(temp) - else: - if i < len(cal_list['asset']): - temp={ - 'type': '', - 'code': '', - 'name': '', - 'level': False, - 'balance':False, - 'type1': cal_list['asset'][i]['type'], - 'code1': cal_list['asset'][i]['code'], - 'name1': cal_list['asset'][i]['name'], - 'level1': cal_list['asset'][i]['level'], - 'balance1':cal_list['asset'][i]['balance'], - } - self.result_temp.append(temp) - if i < len(cal_list['liability']): - temp={ - 'type': cal_list['liability'][i]['type'], - 'code': cal_list['liability'][i]['code'], - 'name': cal_list['liability'][i]['name'], - 'level': cal_list['liability'][i]['level'], - 'balance':cal_list['liability'][i]['balance'], - 'type1': '', - 'code1': '', - 'name1': '', - 'level1': False, - 'balance1':False, - } - self.result_temp.append(temp) - return None - - def get_lines(self): - return self.result_temp - - def get_lines_another(self, group): - return self.result.get(group, []) - -report_sxw.report_sxw('report.account.balancesheet.horizontal', 'account.account', - 'addons/account/report/account_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal, - header='internal landscape') - -report_sxw.report_sxw('report.account.balancesheet', 'account.account', - 'addons/account/report/account_balance_sheet.rml',parser=report_balancesheet_horizontal, - header='internal') - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_balance_sheet.rml b/addons/account/report/account_balance_sheet.rml deleted file mode 100644 index 620ec05b16a..00000000000 --- a/addons/account/report/account_balance_sheet.rml +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Balance Sheet - - - - [[ get_data(data) or removeParentNode('para') ]] - - - - - - Chart of Accounts - Fiscal Year - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - Display Account - Target Moves - - - [[ get_account(data) or removeParentNode('para') ]] - [[ get_fiscalyear(data) or '' ]] - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - Start Date - End Date - - - [[ formatLang(get_start_date(data),date=True) ]] - [[ formatLang(get_end_date(data),date=True) ]] - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - Start Period - End Period - - - [[ get_start_period(data) or removeParentNode('para') ]] - [[ get_end_period(data) or removeParentNode('para') ]] - - - - [[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']] - [[ get_target_move(data) ]] - - - - - - - - - - - - Assets - - - - - - - - - - Code - - - Account - - - Balance - - - - [[ repeatIn(get_lines_another('asset'),'a' ) ]] - [[ setTag('tr','tr',{'style': 'Table'+str(min(3,a['level']))}) ]] - [[ (a['type'] =='view' and a['level'] >= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_code'}) ]][[ a['code'] ]] - [[ (a['type'] =='view' and a['level'] >= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a['level']))+'_name'}) ]][[ a['name'] ]] - [[ (a['level'] <>2) or removeParentNode('td') ]][[ (a['type'] =='view' and a['level'] >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_balance'}) ]][[ formatLang(a['balance'], currency_obj = company.currency_id) ]] - [[ a['level'] == 2 or removeParentNode('td') ]][[ formatLang(a['balance'], currency_obj = company.currency_id) ]] - - - - - - Balance: - - - [[ formatLang(sum_cr(), currency_obj = company.currency_id) ]] - - - - - - - - - - - Liabilities - - - - - - - Code - - - Account - - - Balance - - - - [[ repeatIn(get_lines_another('liability'),'a' ) ]] - [[ setTag('tr','tr',{'style': 'Table'+str(min(3,a['level']))}) ]] - [[ (a['type'] =='view' and a['level'] >= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_code'}) ]][[ a['code'] ]] - [[ (a['type'] =='view' and a['level'] >= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a['level']))+'_name'}) ]][[ a['name'] ]] - [[ (a['level'] <>2) or removeParentNode('td') ]][[ (a['type'] =='view' and a['level'] >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_balance'}) ]][[ formatLang(a['balance'], currency_obj = company.currency_id) ]] - [[ a['level'] == 2 or removeParentNode('td') ]][[ formatLang(a['balance'], currency_obj = company.currency_id) ]] - - - - - - Balance: - - - [[ formatLang(sum_dr(), currency_obj = company.currency_id) ]] - - - - - - - - diff --git a/addons/account/report/account_balance_sheet_horizontal.rml b/addons/account/report/account_balance_sheet_horizontal.rml deleted file mode 100644 index b2d54e33466..00000000000 --- a/addons/account/report/account_balance_sheet_horizontal.rml +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Balance Sheet - - - - [[ get_data(data) or removeParentNode('para') ]] - - - - Chart of Accounts - Fiscal Year - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - Display Account - Target Moves - - - [[ get_account(data) or removeParentNode('para') ]] - [[ get_fiscalyear(data) or '' ]] - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - Start Date - End Date - - - [[ formatLang(get_start_date(data),date=True) ]] - [[ formatLang(get_end_date(data),date=True) ]] - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - Start Period - End Period - - - [[ get_start_period(data) or removeParentNode('para') ]] - [[ get_end_period(data) or removeParentNode('para') ]] - - - - [[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']] - [[ get_target_move(data) ]] - - - - - - - - - - - - Code - - - Assets - - - Balance - - - Code - - - Liabilities - - - Balance - - - - - - [[ repeatIn(get_lines(),'a' ) ]] [[ a['code1'] ]][[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] - - - - - [[ '. '*(a['level1']-1) ]][[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name1'] ]] - - - - - [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(a['balance1'], currency_obj=company.currency_id) ]] - - - - - [[ a['code'] ]][[ ( a['level']<4 or a['name']=='Net Profit') and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] - - - - - [[ '. '*(a['level']-1) ]] - [[ ( a['level']<4 or a['name']=='Net Profit') and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]] - - - - - [[ ( a['level']<4 or a['name']=='Net Profit') and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]] - [[(a['code'] and a['name']) and formatLang(a['balance'], currency_obj=company.currency_id) or removeParentNode('font')]] - - - - - - - - Balance: - - - [[ formatLang(sum_cr(), currency_obj=company.currency_id) ]] - - - Balance: - - - [[ formatLang(sum_dr(), currency_obj=company.currency_id) ]] - - - - - - diff --git a/addons/account/report/account_financial_report.py b/addons/account/report/account_financial_report.py index e9da0a1cd7b..c3b1f5e2e1a 100644 --- a/addons/account/report/account_financial_report.py +++ b/addons/account/report/account_financial_report.py @@ -64,29 +64,30 @@ class report_account_common(report_sxw.rml_parse, common_report_header): vals['balance_cmp'] = self.pool.get('account.financial.report').browse(self.cr, self.uid, report.id, context=data['form']['comparison_context']).balance lines.append(vals) account_ids = [] - if report.type == 'accounts' and report.display_detail and report.account_ids: + if report.type == 'accounts' and report.account_ids: account_ids = account_obj._get_children_and_consol(self.cr, self.uid, [x.id for x in report.account_ids]) elif report.type == 'account_type' and report.account_type_ids: account_ids = account_obj.search(self.cr, self.uid, [('user_type','in', [x.id for x in report.account_type_ids])]) if account_ids: for account in account_obj.browse(self.cr, self.uid, account_ids, context=data['form']['used_context']): - if account.type != 'view': - flag = False - vals = { - 'name': account.code + ' ' + account.name, - 'balance': account.balance != 0 and account.balance * account.user_type.sign or account.balance, - 'type': 'account', - 'level': 6, - 'account_type': account.type, - } - if not currency_obj.is_zero(self.cr, self.uid, account.company_id.currency_id, vals['balance']): + if report.display_detail == 'detail_flat' and account.type == 'view': + continue + flag = False + vals = { + 'name': account.code + ' ' + account.name, + 'balance': account.balance != 0 and account.balance * report.sign or account.balance, + 'type': 'account', + 'level': report.display_detail == 'detail_with_hierarchy' and min(account.level,6) or 6, + 'account_type': account.type, + } + if not currency_obj.is_zero(self.cr, self.uid, account.company_id.currency_id, vals['balance']): + flag = True + if data['form']['enable_filter']: + vals['balance_cmp'] = account_obj.browse(self.cr, self.uid, account.id, context=data['form']['comparison_context']).balance + if not currency_obj.is_zero(self.cr, self.uid, account.company_id.currency_id, vals['balance_cmp']): flag = True - if data['form']['enable_filter']: - vals['balance_cmp'] = account_obj.browse(self.cr, self.uid, account.id, context=data['form']['comparison_context']).balance - if not currency_obj.is_zero(self.cr, self.uid, account.company_id.currency_id, vals['balance_cmp']): - flag = True - if flag: - lines.append(vals) + if flag: + lines.append(vals) return lines report_sxw.report_sxw('report.account.financial.report', 'account.financial.report', diff --git a/addons/account/report/account_financial_report.rml b/addons/account/report/account_financial_report.rml index 6a94f02c719..e3b5f3663f9 100644 --- a/addons/account/report/account_financial_report.rml +++ b/addons/account/report/account_financial_report.rml @@ -130,15 +130,13 @@ - - - + + + + + - - - - - + @@ -229,13 +227,13 @@ Balance - + [[ repeatIn(get_lines(data), 'a') ]] [[ (a.get('level') <> 0) or removeParentNode('tr') ]] [[ setTag('tr','tr',{'style': 'Table'+str(min(3,'level' in a and a.get('level') or 1))}) ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a['level']))+'_name'}) ]] [[ a.get('name') ]] - [[ a.get('level') == 4 or removeParentNode('td') ]][[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a['level']))+'_balance'}) ]][[ formatLang(a.get('balance'))]] [[company.currency_id.symbol]] - [[ a.get('level') <> 4 or removeParentNode('td') ]][[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a['level']))+'_balance'}) ]][[ formatLang(a.get('balance'))]] [[company.currency_id.symbol]] + [[ (a.get('account_type') =='view' and a.get('level') >= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.get('level')))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.get('level')))+'_name'}) ]][[ a.get('name') ]] + [[ (a.get('level') <>2) or removeParentNode('td') ]][[ (a.get('account_type') =='view' and a.get('level') >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] + [[ a.get('level') == 2 or removeParentNode('td') ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] @@ -258,11 +256,11 @@ [[ repeatIn(get_lines(data), 'a') ]] [[ (a.get('level') <> 0) or removeParentNode('tr') ]] [[ setTag('tr','tr',{'style': 'Table'+str(min(3,'level' in a and a.get('level') or 1))}) ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a['level']))+'_name'}) ]] [[ a.get('name') ]] - [[ a.get('level') == 4 or removeParentNode('td') ]][[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a['level']))+'_balance'}) ]][[ formatLang(a.get('balance'))]] [[company.currency_id.symbol]] - [[ a.get('level') <> 4 or removeParentNode('td') ]][[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a['level']))+'_balance'}) ]][[ formatLang(a.get('balance'))]] [[company.currency_id.symbol]] - [[ a.get('level') == 4 or removeParentNode('td') ]][[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a['level']))+'_balance'}) ]][[ formatLang(a.get('balance_cmp'))]] [[company.currency_id.symbol]] - [[ a.get('level') <> 4 or removeParentNode('td') ]][[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a['level']))+'_balance'}) ]][[ formatLang(a.get('balance_cmp'))]] [[company.currency_id.symbol]] + [[ (a.get('account_type') =='view' and a.get('level') >= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.get('level')))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.get('level')))+'_name'}) ]][[ a.get('name') ]] + [[ (a.get('level') <>2) or removeParentNode('td') ]][[ (a.get('account_type') =='view' and a.get('level') >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] + [[ a.get('level') == 2 or removeParentNode('td') ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] + [[ (a.get('level') <>2) or removeParentNode('td') ]][[ (a.get('account_type') =='view' and a.get('level') >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance_cmp'), currency_obj = company.currency_id) ]] + [[ a.get('level') == 2 or removeParentNode('td') ]][[ formatLang(a.get('balance_cmp'), currency_obj = company.currency_id) ]] diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 598f6c40278..cd43f416fce 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -70,7 +70,7 @@ - + - + @@ -138,7 +138,7 @@ account.invoice.report form tree,graph - {'search_default_year':1,'search_default_month':1,'search_default_current':1, 'search_default_category_product':1, 'search_default_customer':1, 'search_default_date': time.strftime('%Y-01-01'), 'group_by':[], 'group_by_no_leaf':1,} + {'search_default_period':1,'search_default_current':1, 'search_default_year': 1, 'search_default_category_product':1, 'search_default_customer':1, 'search_default_date': time.strftime('%Y-01-01'), 'group_by':[], 'group_by_no_leaf':1,} From this report, you can have an overview of the amount invoiced to your customer as well as payment delays. The tool search can also be used to personalise your Invoices reports and so, match this analysis to your needs. diff --git a/addons/account/report/account_profit_horizontal.rml b/addons/account/report/account_profit_horizontal.rml deleted file mode 100644 index 0918dcb2699..00000000000 --- a/addons/account/report/account_profit_horizontal.rml +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Profit And Loss - - - - - - - [[ get_data(data) or removeParentNode('para')]] - - - Chart of Accounts - Fiscal Year - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - Display Account - Target Moves - - - [[ get_account(data) or removeParentNode('para') ]] - [[ get_fiscalyear(data) or '' ]] - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - Start Date - End Date - - - [[ formatLang(get_start_date(data),date=True) ]] - [[ formatLang(get_end_date(data),date=True) ]] - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - Start Period - End Period - - - [[ get_start_period(data) or removeParentNode('para') ]] - [[ get_end_period(data) or removeParentNode('para') ]] - - - - [[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']] - [[ get_target_move(data) ]] - - - - - - - - - Code - - - Expenses - - - Balance - - - Code - - - Income - - - Balance - - - - - - - [[ repeatIn(get_lines(),'a' ) ]] [[ a['code'] ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] - - - - - [[ '. '*(a['level']-1) ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]] - - - - [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(abs(a['balance']), currency_obj=company.currency_id) ]] - - - - [[ a['code1'] ]][[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] - - - - - [[ '. '*(a['level1']-1) ]][[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name1'] ]] - - - - [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[(a['code1'] and a['name1']) and formatLang(abs(a['balance1']), currency_obj=company.currency_id) or removeParentNode('font') ]] - - - - - - - - - - [[ final_result()['type'] == 'Net Profit' and final_result()['type'] or '' ]] - - - [[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(abs(final_result()['balance']), currency_obj=company.currency_id) ]] - - - - - - [[ final_result()['type'] == 'Net Loss' and final_result()['type'] or '' ]] - - - [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(abs(final_result()['balance']), currency_obj=company.currency_id) ]] - - - - - - - - Total: - - - [[ formatLang(abs(sum_dr()), currency_obj=company.currency_id) ]] - - - Total: - - - [[ formatLang(abs(sum_cr()), currency_obj=company.currency_id) ]] - - - - - - diff --git a/addons/account/report/account_profit_loss.py b/addons/account/report/account_profit_loss.py deleted file mode 100644 index 27182cdbd21..00000000000 --- a/addons/account/report/account_profit_loss.py +++ /dev/null @@ -1,198 +0,0 @@ -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# 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 . -# -############################################################################## - -import time -import pooler -from report import report_sxw -from common_report_header import common_report_header -from tools.translate import _ - -class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header): - - def __init__(self, cr, uid, name, context=None): - super(report_pl_account_horizontal, self).__init__(cr, uid, name, context=context) - self.result_sum_dr = 0.0 - self.result_sum_cr = 0.0 - self.res_pl = {} - self.result = {} - self.result_temp = [] - self.localcontext.update( { - 'time': time, - 'get_lines': self.get_lines, - 'get_lines_another': self.get_lines_another, - 'get_currency': self._get_currency, - 'get_data': self.get_data, - 'sum_dr': self.sum_dr, - 'sum_cr': self.sum_cr, - 'final_result': self.final_result, - 'get_fiscalyear': self._get_fiscalyear, - 'get_account': self._get_account, - 'get_start_period': self.get_start_period, - 'get_end_period': self.get_end_period, - 'get_sortby': self._get_sortby, - 'get_filter': self._get_filter, - 'get_journal': self._get_journal, - 'get_start_date':self._get_start_date, - 'get_end_date':self._get_end_date, - 'get_company':self._get_company, - 'get_target_move': self._get_target_move, - }) - self.context = context - - def set_context(self, objects, data, ids, report_type=None): - new_ids = ids - 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) - return super(report_pl_account_horizontal, self).set_context(objects, data, new_ids, report_type=report_type) - - - def final_result(self): - return self.res_pl - - def sum_dr(self): - if self.res_pl['type'] == _('Net Profit'): - self.result_sum_dr += self.res_pl['balance'] - return self.result_sum_dr - - def sum_cr(self): - if self.res_pl['type'] == _('Net Loss'): - self.result_sum_cr += self.res_pl['balance'] - return self.result_sum_cr - - def get_data(self, data): - cr, uid = self.cr, self.uid - db_pool = pooler.get_pool(self.cr.dbname) - - account_pool = db_pool.get('account.account') - currency_pool = db_pool.get('res.currency') - - types = [ - 'expense', - 'income' - ] - - ctx = self.context.copy() - ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False) - - if data['form']['filter'] == 'filter_period': - ctx['period_from'] = data['form'].get('period_from', False) - ctx['period_to'] = data['form'].get('period_to', False) - elif data['form']['filter'] == 'filter_date': - ctx['date_from'] = data['form'].get('date_from', False) - ctx['date_to'] = data['form'].get('date_to', False) - - cal_list = {} - account_id = data['form'].get('chart_account_id', False) - company_currency = account_pool.browse(self.cr, self.uid, account_id).company_id.currency_id - account_ids = account_pool._get_children_and_consol(cr, uid, account_id, context=ctx) - accounts = account_pool.browse(cr, uid, account_ids, context=ctx) - - for typ in types: - accounts_temp = [] - for account in accounts: - if (account.user_type.report_type) and (account.user_type.report_type == typ): - currency = account.currency_id and account.currency_id or account.company_id.currency_id - if typ == 'expense' and account.type <> 'view' and (account.debit <> account.credit): - self.result_sum_dr += account.debit - account.credit - if typ == 'income' and account.type <> 'view' and (account.debit <> account.credit): - self.result_sum_cr += account.credit - account.debit - if data['form']['display_account'] == 'movement': - if not currency_pool.is_zero(self.cr, self.uid, currency, account.credit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.debit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.balance): - accounts_temp.append(account) - elif data['form']['display_account'] == 'not_zero': - if not currency_pool.is_zero(self.cr, self.uid, currency, account.balance): - accounts_temp.append(account) - else: - accounts_temp.append(account) - if currency_pool.is_zero(self.cr, self.uid, company_currency, (self.result_sum_dr-self.result_sum_cr)): - self.res_pl['type'] = None - self.res_pl['balance'] = 0.0 - elif self.result_sum_dr > self.result_sum_cr: - self.res_pl['type'] = _('Net Loss') - self.res_pl['balance'] = (self.result_sum_dr - self.result_sum_cr) - else: - self.res_pl['type'] = _('Net Profit') - self.res_pl['balance'] = (self.result_sum_cr - self.result_sum_dr) - self.result[typ] = accounts_temp - cal_list[typ] = self.result[typ] - if cal_list: - temp = {} - for i in range(0,max(len(cal_list['expense']),len(cal_list['income']))): - if i < len(cal_list['expense']) and i < len(cal_list['income']): - temp={ - 'code': cal_list['expense'][i].code, - 'name': cal_list['expense'][i].name, - 'level': cal_list['expense'][i].level, - 'balance': cal_list['expense'][i].balance != 0 and \ - cal_list['expense'][i].balance * cal_list['expense'][i].user_type.sign or \ - cal_list['expense'][i].balance, - 'code1': cal_list['income'][i].code, - 'name1': cal_list['income'][i].name, - 'level1': cal_list['income'][i].level, - 'balance1': cal_list['income'][i].balance != 0 and \ - cal_list['income'][i].balance * cal_list['income'][i].user_type.sign or \ - cal_list['income'][i].balance, - } - self.result_temp.append(temp) - else: - if i < len(cal_list['income']): - temp={ - 'code': '', - 'name': '', - 'level': False, - 'balance':False, - 'code1': cal_list['income'][i].code, - 'name1': cal_list['income'][i].name, - 'level1': cal_list['income'][i].level, - 'balance1': cal_list['income'][i].balance != 0 and \ - cal_list['income'][i].balance * cal_list['income'][i].user_type.sign \ - or cal_list['income'][i].balance, - } - self.result_temp.append(temp) - if i < len(cal_list['expense']): - temp={ - 'code': cal_list['expense'][i].code, - 'name': cal_list['expense'][i].name, - 'level': cal_list['expense'][i].level, - 'balance': cal_list['expense'][i].balance != 0 and \ - cal_list['expense'][i].balance * cal_list['expense'][i].user_type.sign \ - or cal_list['expense'][i].balance, - 'code1': '', - 'name1': '', - 'level1': False, - 'balance1':False, - } - self.result_temp.append(temp) - return None - - def get_lines(self): - return self.result_temp - - def get_lines_another(self, group): - return self.result.get(group, []) - -report_sxw.report_sxw('report.pl.account.horizontal', 'account.account', - 'addons/account/report/account_profit_horizontal.rml',parser=report_pl_account_horizontal, header='internal landscape') - -report_sxw.report_sxw('report.pl.account', 'account.account', - 'addons/account/report/account_profit_loss.rml',parser=report_pl_account_horizontal, header='internal') - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_profit_loss.rml b/addons/account/report/account_profit_loss.rml deleted file mode 100644 index 28fe167aef5..00000000000 --- a/addons/account/report/account_profit_loss.rml +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Profit And Loss - - - - - [[ get_data(data) or removeParentNode('para')]] - - - - - - Chart of Accounts - Fiscal Year - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - Display Account - Target Moves - - - [[ get_account(data) or removeParentNode('para') ]] - [[ get_fiscalyear(data) or '' ]] - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - Start Date - End Date - - - [[ formatLang(get_start_date(data),date=True) ]] - [[ formatLang(get_end_date(data),date=True) ]] - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - Start Period - End Period - - - [[ get_start_period(data) or removeParentNode('para') ]] - [[ get_end_period(data) or removeParentNode('para') ]] - - - - [[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']] - [[ get_target_move(data) ]] - - - - - - Expenses - - - - Code - - - Account - - - Balance - - - - [[ repeatIn(get_lines_another('expense'),'a' ) ]] - [[ setTag('tr','tr',{'style': 'Table'+str(min(3,a.level))}) ]] - [[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_code'}) ]][[ a.code ]] - [[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.level))+'_name'}) ]][[ a.name ]] - [[ (a.level <>2) or removeParentNode('td') ]][[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance * a.user_type.sign, currency_obj=company.currency_id) ]] - [[ a.level == 2 or removeParentNode('td') ]][[ formatLang(a.balance * a.user_type.sign, currency_obj=company.currency_id) ]] - - - - - - - - - [[ final_result()['type'] == 'Net Profit' and final_result()['type'] or removeParentNode('blockTable') ]] - - - [[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(final_result()['balance'], currency_obj=company.currency_id) ]] - - - - - - - Total: - - - [[ formatLang(sum_dr(), currency_obj=company.currency_id) ]] - - - - - - - - Incomes - - - - Code - - - Account - - - Balance - - - - [[ repeatIn(get_lines_another('income'),'a' ) ]] - [[ setTag('tr','tr',{'style': 'Table'+str(min(3,a.level))}) ]] - [[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_code'}) ]][[ a.code ]] - [[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.level))+'_name'}) ]][[ a.name ]] - [[ (a.level <>2) or removeParentNode('td') ]][[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance * a.user_type.sign, currency_obj=company.currency_id) ]] - [[ a.level == 2 or removeParentNode('td') ]][[ formatLang(a.balance * a.user_type.sign, currency_obj=company.currency_id) ]] - - - - - - - - - [[ final_result()['type'] == 'Net Loss' and final_result()['type'] or removeParentNode('blockTable') ]] - - - [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(final_result()['balance'], currency_obj=company.currency_id) ]] - - - - - - - Total: - - - [[ formatLang(sum_cr(), currency_obj=company.currency_id) ]] - - - - - - - - - - - diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml index c928ff3c8fe..64498127dc5 100644 --- a/addons/account/security/account_security.xml +++ b/addons/account/security/account_security.xml @@ -2,14 +2,17 @@ - Accounting / Invoicing & Payments + Invoicing & Payments + - Accounting / Accountant + Accountant + - Accounting / Manager + Manager + diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv index 79e4dbb0c03..d1cb87bd434 100644 --- a/addons/account/security/ir.model.access.csv +++ b/addons/account/security/ir.model.access.csv @@ -1,134 +1,105 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_product_product_account_user","product.product.account.user","product.model_product_product","group_account_user",1,0,0,0 -"access_account_payment_term","account.payment.term","model_account_payment_term","account.group_account_user",1,0,0,0 -"access_account_payment_term_line","account.payment.term.line","model_account_payment_term_line","account.group_account_user",1,0,0,0 -"access_account_account_type","account.account.type","model_account_account_type","account.group_account_user",1,0,0,0 -"access_account_tax","account.tax","model_account_tax","account.group_account_user",1,0,0,0 -"access_account_tax_internal_user","account.tax internal user","model_account_tax","base.group_user",1,0,0,0 -"access_account_account","account.account","model_account_account","account.group_account_user",1,0,0,0 -"access_account_account_user","account.account user","model_account_account","base.group_user",1,0,0,0 -"access_account_account_partner_manager","account.account partner manager","model_account_account","base.group_partner_manager",1,0,0,0 -"access_account_journal_view","account.journal.view","model_account_journal_view","account.group_account_user",1,0,0,0 -"access_account_journal_column","account.journal.column","model_account_journal_column","account.group_account_user",1,0,0,0 -"access_account_journal","account.journal","model_account_journal","account.group_account_user",1,0,0,0 -"access_account_period","account.period","model_account_period","account.group_account_user",1,0,0,0 -"access_account_journal_period_manager","account.journal.period manager","model_account_journal_period","account.group_account_manager",1,0,0,0 -"access_account_journal_period","account.journal.period","model_account_journal_period","account.group_account_user",1,1,1,1 -"access_account_move","account.move","model_account_move","account.group_account_user",1,1,1,1 -"access_account_move_line","account.move.line","model_account_move_line","account.group_account_user",1,1,1,1 -"access_account_move_reconcile","account.move.reconcile","model_account_move_reconcile","account.group_account_user",1,1,1,1 -"access_account_tax_code","account.tax.code","model_account_tax_code","account.group_account_invoice",1,0,0,0 -"access_account_tax","account.tax","model_account_tax","account.group_account_invoice",1,0,0,0 -"access_account_model","account.model","model_account_model","account.group_account_user",1,1,1,1 -"access_account_model_line","account.model.line","model_account_model_line","account.group_account_user",1,1,1,1 -"access_account_model_manager","account.model","model_account_model","account.group_account_manager",1,1,1,1 -"access_account_model_line_manager","account.model.line","model_account_model_line","account.group_account_manager",1,1,1,1 -"access_account_subscription","account.subscription","model_account_subscription","account.group_account_user",1,1,1,1 -"access_account_subscription_line","account.subscription.line","model_account_subscription_line","account.group_account_user",1,1,1,1 -"access_account_subscription_manager","account.subscription manager","model_account_subscription","account.group_account_manager",1,0,0,0 -"access_account_subscription_line_manager","account.subscription.line manager","model_account_subscription_line","account.group_account_manager",1,0,0,0 -"access_account_account_template","account.account.template","model_account_account_template","account.group_account_manager",1,1,1,1 -"access_account_tax_code_template","account.tax.code.template","model_account_tax_code_template","account.group_account_manager",1,1,1,1 -"access_account_chart_template","account.chart.template","model_account_chart_template","account.group_account_manager",1,1,1,1 -"access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1 -"access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_account_user",1,1,1,1 -"access_account_bank_statement_line","account.bank.statement.line","model_account_bank_statement_line","account.group_account_user",1,1,1,1 -"access_account_analytic_line","account.analytic.line","model_account_analytic_line","account.group_account_user",1,1,1,1 -"access_account_analytic_line_manager","account.analytic.line manager","model_account_analytic_line","account.group_account_manager",1,0,0,0 -"access_account_analytic_account","account.analytic.account","analytic.model_account_analytic_account","base.group_user",1,0,0,0 -"access_account_analytic_journal","account.analytic.journal","model_account_analytic_journal","account.group_account_user",1,0,0,0 -"access_account_analytic_journal_user","account.analytic.journal","model_account_analytic_journal","base.group_user",1,1,1,0 -"access_account_invoice_uinvoice","account.invoice","model_account_invoice","account.group_account_invoice",1,1,1,1 -"access_account_invoice_line_uinvoice","account.invoice.line","model_account_invoice_line","account.group_account_invoice",1,1,1,1 -"access_account_invoice_tax_uinvoice","account.invoice.tax","model_account_invoice_tax","account.group_account_invoice",1,1,1,1 -"access_account_move_uinvoice","account.move","model_account_move","account.group_account_invoice",1,1,1,1 -"access_account_move_line_uinvoice","account.move.line invoice","model_account_move_line","account.group_account_invoice",1,1,1,1 -"access_account_move_reconcile_uinvoice","account.move.reconcile","model_account_move_reconcile","account.group_account_invoice",1,1,1,1 -"access_account_journal_period_uinvoice","account.journal.period","model_account_journal_period","account.group_account_invoice",1,1,1,1 -"access_account_payment_term_manager","account.payment.term","model_account_payment_term","account.group_account_manager",1,1,1,1 -"access_account_payment_term_line_manager","account.payment.term.line","model_account_payment_term_line","account.group_account_manager",1,1,1,1 -"access_account_account_type_manager","account.account.type","model_account_account_type","account.group_account_manager",1,1,1,1 -"access_account_tax_manager","account.tax","model_account_tax","account.group_account_manager",1,1,1,1 -"access_account_account_manager","account.account","model_account_account","account.group_account_manager",1,1,1,1 -"access_account_journal_view_manager","account.journal.view","model_account_journal_view","account.group_account_manager",1,1,1,1 -"access_account_journal_column_manager","account.journal.column","model_account_journal_column","account.group_account_manager",1,1,1,1 -"access_account_journal_manager","account.journal","model_account_journal","account.group_account_manager",1,1,1,1 -"access_account_journal_invoice","account.journal invoice","model_account_journal","account.group_account_invoice",1,0,0,0 -"access_account_period_manager","account.period","model_account_period","account.group_account_manager",1,1,1,1 -"access_account_period_invoice","account.period invoice","model_account_period","account.group_account_invoice",1,0,0,0 -"access_account_tax_code_manager","account.tax.code","model_account_tax_code","account.group_account_manager",1,1,1,1 -"access_account_invoice_group_invoice","account.invoice group invoice","model_account_invoice","account.group_account_invoice",1,1,1,1 -"access_account_analytic_account_manager","account.analytic.account","analytic.model_account_analytic_account","account.group_account_manager",1,1,1,1 -"access_account_analytic_journal_manager","account.analytic.journal","model_account_analytic_journal","account.group_account_manager",1,1,1,1 -"access_account_fiscalyear","account.fiscalyear","model_account_fiscalyear","account.group_account_manager",1,1,1,1 -"access_account_fiscalyear_user","account.fiscalyear.user","model_account_fiscalyear","account.group_account_user",1,0,0,0 -"access_account_fiscalyear_invoice","account.fiscalyear.invoice","model_account_fiscalyear","account.group_account_invoice",1,0,0,0 -"access_account_fiscalyear_partner_manager","account.fiscalyear.partnermanager","model_account_fiscalyear","base.group_partner_manager",1,0,0,0 -"access_account_fiscalyear_employee","account.fiscalyear employee","model_account_fiscalyear","base.group_user",1,0,0,0 -"access_res_currency_account_manager","res.currency account manager","base.model_res_currency","group_account_manager",1,1,1,1 -"access_res_currency_rate_account_manager","res.currency.rate account manager","base.model_res_currency_rate","group_account_manager",1,1,1,1 -"access_res_currency_rate_type_account_manager","res.currency.rate.type account manager","base.model_res_currency_rate_type","group_account_manager",1,1,1,1 -"access_account_invoice_user","account.invoice user","model_account_invoice","base.group_user",1,0,0,0 -"access_account_invoice_user","account.invoice.line user","model_account_invoice_line","base.group_user",1,0,0,0 -"access_account_payment_term_partner_manager","account.payment.term partner manager","model_account_payment_term","base.group_user",1,0,0,0 -"access_account_payment_term_line_partner_manager","account.payment.term.line partner manager","model_account_payment_term_line","base.group_user",1,0,0,0 -"access_account_account_sale_manager","account.account sale manager","model_account_account","base.group_sale_manager",1,0,0,0 -"access_account_journal_sale_manager","account.journal sale manager","model_account_journal","base.group_sale_manager",1,0,0,0 -"access_account_fiscal_position_product_manager","account.fiscal.position account.manager","model_account_fiscal_position","account.group_account_manager",1,1,1,1 -"access_account_fiscal_position_tax_product_manager","account.fiscal.position.tax account.manager","model_account_fiscal_position_tax","account.group_account_manager",1,1,1,1 -"access_account_fiscal_position_account_product_manager","account.fiscal.position account.manager","model_account_fiscal_position_account","account.group_account_manager",1,1,1,1 -"access_account_fiscal_position","account.fiscal.position all","model_account_fiscal_position","base.group_user",1,0,0,0 -"access_account_fiscal_position_tax","account.fiscal.position.tax all","model_account_fiscal_position_tax","base.group_user",1,0,0,0 -"access_account_fiscal_position_account","account.fiscal.position all","model_account_fiscal_position_account","base.group_user",1,0,0,0 -"access_account_fiscal_position_template","account.fiscal.position.template","model_account_fiscal_position_template","account.group_account_manager",1,1,1,1 -"access_account_fiscal_position_tax_template","account.fiscal.position.tax.template","model_account_fiscal_position_tax_template","account.group_account_manager",1,1,1,1 -"access_account_fiscal_position_account_template","account.fiscal.position.account.template","model_account_fiscal_position_account_template","account.group_account_manager",1,1,1,1 -"access_account_sequence_fiscal_year","account.sequence.fiscalyear","model_account_sequence_fiscalyear","account.group_account_user",1,1,1,1 -"access_account_sequence_fiscal_year_user","account.sequence.fiscalyear user","model_account_sequence_fiscalyear","base.group_user",1,0,0,0 -"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_account_manager",1,1,1,1 -"access_temp_range","temp.range","model_temp_range","account.group_account_manager",1,0,0,0 -"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_account_manager",1,1,1,1 -"access_report_invoice_created","report.invoice.created","model_report_invoice_created","account.group_account_manager",1,1,1,1 -"access_report_account_type_sales","report.account_type.sales","model_report_account_type_sales","account.group_account_manager",1,1,1,1 -"access_report_account_sales","report.account.sales","model_report_account_sales","account.group_account_manager",1,1,1,1 -"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_manager",1,1,1,1 -"access_res_partner_group_account_manager","res_partner group_account_manager","model_res_partner","account.group_account_manager",1,0,0,0 -"access_account_invoice_accountant","account.invoice accountant","model_account_invoice","account.group_account_user",1,0,0,0 -"access_account_tax_code_accountant","account.tax.code accountant","model_account_tax_code","account.group_account_user",1,1,1,1 -"access_account_move_line_manager","account.move.line manager","model_account_move_line","account.group_account_manager",1,0,0,0 -"access_account_move_manager","account.move manager","model_account_move","account.group_account_manager",1,0,0,0 -"access_account_invoice_manager","account.invoice manager","model_account_invoice","account.group_account_manager",1,0,0,0 -"access_account_bank_statement_manager","account.bank.statement manager","model_account_bank_statement","account.group_account_manager",1,1,1,1 -"access_account_entries_report_manager","account.entries.report","model_account_entries_report","account.group_account_manager",1,1,1,1 -"access_account_entries_report_user","account.entries.report","model_account_entries_report","account.group_account_user",1,0,0,0 -"access_account_entries_report_invoice","account.entries.report","model_account_entries_report","account.group_account_invoice",1,0,0,0 -"access_account_entries_report_employee","account.entries.report employee","model_account_entries_report","base.group_user",1,0,0,0 -"access_analytic_entries_report_manager","analytic.entries.report","model_analytic_entries_report","account.group_account_manager",1,0,0,0 -"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_manager",1,1,1,1 -"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_user",1,1,1,1 -"access_account_journal_view_invoice","account.journal.view invoice","model_account_journal_view","account.group_account_invoice",1,1,1,1 -"access_account_journal_column_invoice","account.journal.column invoice","model_account_journal_column","account.group_account_invoice",1,1,1,1 -"access_account_invoice_tax_manager","account.invoice.tax manager","model_account_invoice_tax","account.group_account_manager",1,0,0,0 -"access_account_invoice_tax_accountant","account.invoice.tax accountant","model_account_invoice_tax","account.group_account_user",1,0,0,0 -"access_account_move_reconcile_manager","account.move.reconcile manager","model_account_move_reconcile","account.group_account_manager",1,0,0,0 -"access_account_analytic_line_invoice","account.analytic.line invoice","model_account_analytic_line","account.group_account_invoice",1,1,1,1 -"access_account_invoice_line_accountant","account.invoice.line accountant","model_account_invoice_line","account.group_account_user",1,0,0,0 -"access_res_partner_address_accountant","res.partner.address accountant","base.model_res_partner_address","account.group_account_user",1,0,0,0 -"access_account_invoice_line_manager","account.invoice.line manager","model_account_invoice_line","account.group_account_manager",1,0,0,0 -"access_account_account_invoice","account.account invoice","model_account_account","account.group_account_invoice",1,1,1,1 -"access_res_partner_address_invoice","res.partner.address invoice","base.model_res_partner_address","account.group_account_invoice",1,1,1,1 -"access_account_analytic_accountant","account.analytic.account accountant","analytic.model_account_analytic_account","account.group_account_user",1,1,1,1 -"access_account_account_type_invoice","account.account.type invoice","model_account_account_type","account.group_account_invoice",1,1,1,1 -"access_report_account_receivable_invoice","report.account.receivable.invoice","model_report_account_receivable","account.group_account_invoice",1,1,1,1 -"access_report_account_receivable_user","report.account.receivable.user","model_report_account_receivable","account.group_account_user",1,1,1,1 -"access_account_sequence_fiscal_year_invoice","account.sequence.fiscalyear invoice","model_account_sequence_fiscalyear","account.group_account_invoice",1,1,1,1 -"access_account_tax_sale_manager","account.tax sale manager","model_account_tax","base.group_sale_salesman",1,0,0,0 -"access_account_journal_sale_manager","account.journal sale manager","model_account_journal","base.group_sale_salesman",1,0,0,0 -"access_account_invoice_tax_sale_manager","account.invoice.tax sale manager","model_account_invoice_tax","base.group_sale_salesman",1,0,0,0 -"access_account_sequence_fiscal_year_sale_user","account.sequence.fiscalyear.sale.user","model_account_sequence_fiscalyear","base.group_sale_salesman",1,1,1,0 -"access_account_sequence_fiscal_year_sale_manager","account.sequence.fiscalyear.sale.manager","model_account_sequence_fiscalyear","base.group_sale_manager",1,1,1,1 -"access_account_treasury_report_manager","account.treasury.report.manager","model_account_treasury_report","account.group_account_manager",1,0,0,0 -"access_account_financial_report","account.financial.report","model_account_financial_report","account.group_account_user",1,1,1,1 -"access_account_financial_report_invoice","account.financial.report invoice","model_account_financial_report","account.group_account_invoice",1,0,0,0 -"access_account_financial_report_manager","account.financial.report","model_account_financial_report","account.group_account_manager",1,1,1,1 - +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_product_account_user,product.product.account.user,product.model_product_product,group_account_user,1,0,0,0 +access_account_payment_term,account.payment.term,model_account_payment_term,account.group_account_user,1,0,0,0 +access_account_payment_term_line,account.payment.term.line,model_account_payment_term_line,account.group_account_user,1,0,0,0 +access_account_account_type,account.account.type,model_account_account_type,account.group_account_user,1,0,0,0 +access_account_tax_internal_user,account.tax internal user,model_account_tax,base.group_user,1,0,0,0 +access_account_account,account.account,model_account_account,account.group_account_user,1,0,0,0 +access_account_account_user,account.account user,model_account_account,base.group_user,1,0,0,0 +access_account_account_partner_manager,account.account partner manager,model_account_account,base.group_partner_manager,1,0,0,0 +access_account_journal_view,account.journal.view,model_account_journal_view,account.group_account_user,1,0,0,0 +access_account_journal_column,account.journal.column,model_account_journal_column,account.group_account_user,1,0,0,0 +access_account_journal_period_manager,account.journal.period manager,model_account_journal_period,account.group_account_manager,1,0,0,0 +access_account_tax_code,account.tax.code,model_account_tax_code,account.group_account_invoice,1,0,0,0 +access_account_tax,account.tax,model_account_tax,account.group_account_invoice,1,0,0,0 +access_account_model,account.model,model_account_model,account.group_account_user,1,1,1,1 +access_account_model_line,account.model.line,model_account_model_line,account.group_account_user,1,1,1,1 +access_account_subscription,account.subscription,model_account_subscription,account.group_account_user,1,1,1,1 +access_account_subscription_line,account.subscription.line,model_account_subscription_line,account.group_account_user,1,1,1,1 +access_account_subscription_manager,account.subscription manager,model_account_subscription,account.group_account_manager,1,0,0,0 +access_account_subscription_line_manager,account.subscription.line manager,model_account_subscription_line,account.group_account_manager,1,0,0,0 +access_account_account_template,account.account.template,model_account_account_template,account.group_account_manager,1,1,1,1 +access_account_tax_code_template,account.tax.code.template,model_account_tax_code_template,account.group_account_manager,1,1,1,1 +access_account_chart_template,account.chart.template,model_account_chart_template,account.group_account_manager,1,1,1,1 +access_account_tax_template,account.tax.template,model_account_tax_template,account.group_account_manager,1,1,1,1 +access_account_bank_statement,account.bank.statement,model_account_bank_statement,account.group_account_user,1,1,1,1 +access_account_bank_statement_line,account.bank.statement.line,model_account_bank_statement_line,account.group_account_user,1,1,1,1 +access_account_analytic_line_manager,account.analytic.line manager,model_account_analytic_line,account.group_account_manager,1,0,0,0 +access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,base.group_user,1,0,0,0 +access_account_analytic_journal,account.analytic.journal,model_account_analytic_journal,account.group_account_user,1,0,0,0 +access_account_analytic_journal_user,account.analytic.journal,model_account_analytic_journal,base.group_user,1,1,1,0 +access_account_invoice_uinvoice,account.invoice,model_account_invoice,account.group_account_invoice,1,1,1,1 +access_account_invoice_line_uinvoice,account.invoice.line,model_account_invoice_line,account.group_account_invoice,1,1,1,1 +access_account_invoice_tax_uinvoice,account.invoice.tax,model_account_invoice_tax,account.group_account_invoice,1,1,1,1 +access_account_move_uinvoice,account.move,model_account_move,account.group_account_invoice,1,1,1,1 +access_account_move_line_uinvoice,account.move.line invoice,model_account_move_line,account.group_account_invoice,1,1,1,1 +access_account_move_reconcile_uinvoice,account.move.reconcile,model_account_move_reconcile,account.group_account_invoice,1,1,1,1 +access_account_journal_period_uinvoice,account.journal.period,model_account_journal_period,account.group_account_invoice,1,1,1,1 +access_account_payment_term_manager,account.payment.term,model_account_payment_term,account.group_account_manager,1,1,1,1 +access_account_payment_term_line_manager,account.payment.term.line,model_account_payment_term_line,account.group_account_manager,1,1,1,1 +access_account_tax_manager,account.tax,model_account_tax,account.group_account_manager,1,1,1,1 +access_account_journal_manager,account.journal,model_account_journal,account.group_account_manager,1,1,1,1 +access_account_journal_invoice,account.journal invoice,model_account_journal,account.group_account_invoice,1,0,0,0 +access_account_period_manager,account.period,model_account_period,account.group_account_manager,1,1,1,1 +access_account_period_invoice,account.period invoice,model_account_period,account.group_account_invoice,1,0,0,0 +access_account_invoice_group_invoice,account.invoice group invoice,model_account_invoice,account.group_account_invoice,1,1,1,1 +access_account_analytic_journal_manager,account.analytic.journal,model_account_analytic_journal,account.group_account_manager,1,1,1,1 +access_account_fiscalyear,account.fiscalyear,model_account_fiscalyear,account.group_account_manager,1,1,1,1 +access_account_fiscalyear_invoice,account.fiscalyear.invoice,model_account_fiscalyear,account.group_account_invoice,1,0,0,0 +access_account_fiscalyear_partner_manager,account.fiscalyear.partnermanager,model_account_fiscalyear,base.group_partner_manager,1,0,0,0 +access_account_fiscalyear_employee,account.fiscalyear employee,model_account_fiscalyear,base.group_user,1,0,0,0 +access_res_currency_account_manager,res.currency account manager,base.model_res_currency,group_account_manager,1,1,1,1 +access_res_currency_rate_account_manager,res.currency.rate account manager,base.model_res_currency_rate,group_account_manager,1,1,1,1 +access_res_currency_rate_type_account_manager,res.currency.rate.type account manager,base.model_res_currency_rate_type,group_account_manager,1,1,1,1 +access_account_invoice_user,account.invoice user,model_account_invoice,base.group_user,1,0,0,0 +access_account_invoice_user,account.invoice.line user,model_account_invoice_line,base.group_user,1,0,0,0 +access_account_payment_term_partner_manager,account.payment.term partner manager,model_account_payment_term,base.group_user,1,0,0,0 +access_account_payment_term_line_partner_manager,account.payment.term.line partner manager,model_account_payment_term_line,base.group_user,1,0,0,0 +access_account_account_sale_manager,account.account sale manager,model_account_account,base.group_sale_manager,1,0,0,0 +access_account_fiscal_position_product_manager,account.fiscal.position account.manager,model_account_fiscal_position,account.group_account_manager,1,1,1,1 +access_account_fiscal_position_tax_product_manager,account.fiscal.position.tax account.manager,model_account_fiscal_position_tax,account.group_account_manager,1,1,1,1 +access_account_fiscal_position_account_product_manager,account.fiscal.position account.manager,model_account_fiscal_position_account,account.group_account_manager,1,1,1,1 +access_account_fiscal_position,account.fiscal.position all,model_account_fiscal_position,base.group_user,1,0,0,0 +access_account_fiscal_position_tax,account.fiscal.position.tax all,model_account_fiscal_position_tax,base.group_user,1,0,0,0 +access_account_fiscal_position_account,account.fiscal.position all,model_account_fiscal_position_account,base.group_user,1,0,0,0 +access_account_fiscal_position_template,account.fiscal.position.template,model_account_fiscal_position_template,account.group_account_manager,1,1,1,1 +access_account_fiscal_position_tax_template,account.fiscal.position.tax.template,model_account_fiscal_position_tax_template,account.group_account_manager,1,1,1,1 +access_account_fiscal_position_account_template,account.fiscal.position.account.template,model_account_fiscal_position_account_template,account.group_account_manager,1,1,1,1 +access_account_sequence_fiscal_year_user,account.sequence.fiscalyear user,model_account_sequence_fiscalyear,base.group_user,1,0,0,0 +access_temp_range,temp.range,model_temp_range,account.group_account_manager,1,0,0,0 +access_report_aged_receivable,report.aged.receivable,model_report_aged_receivable,account.group_account_manager,1,1,1,1 +access_report_invoice_created,report.invoice.created,model_report_invoice_created,account.group_account_manager,1,1,1,1 +access_report_account_type_sales,report.account_type.sales,model_report_account_type_sales,account.group_account_manager,1,1,1,1 +access_report_account_sales,report.account.sales,model_report_account_sales,account.group_account_manager,1,1,1,1 +access_account_invoice_report,account.invoice.report,model_account_invoice_report,account.group_account_manager,1,1,1,1 +access_res_partner_group_account_manager,res_partner group_account_manager,model_res_partner,account.group_account_manager,1,0,0,0 +access_account_invoice_accountant,account.invoice accountant,model_account_invoice,account.group_account_user,1,0,0,0 +access_account_tax_code_accountant,account.tax.code accountant,model_account_tax_code,account.group_account_user,1,1,1,1 +access_account_move_line_manager,account.move.line manager,model_account_move_line,account.group_account_manager,1,0,0,0 +access_account_move_manager,account.move manager,model_account_move,account.group_account_manager,1,0,0,0 +access_account_entries_report_manager,account.entries.report,model_account_entries_report,account.group_account_manager,1,1,1,1 +access_account_entries_report_invoice,account.entries.report,model_account_entries_report,account.group_account_invoice,1,0,0,0 +access_account_entries_report_employee,account.entries.report employee,model_account_entries_report,base.group_user,1,0,0,0 +access_analytic_entries_report_manager,analytic.entries.report,model_analytic_entries_report,account.group_account_manager,1,0,0,0 +access_account_cashbox_line,account.cashbox.line,model_account_cashbox_line,account.group_account_user,1,1,1,1 +access_account_journal_view_invoice,account.journal.view invoice,model_account_journal_view,account.group_account_invoice,1,1,1,1 +access_account_journal_column_invoice,account.journal.column invoice,model_account_journal_column,account.group_account_invoice,1,1,1,1 +access_account_invoice_tax_accountant,account.invoice.tax accountant,model_account_invoice_tax,account.group_account_user,1,0,0,0 +access_account_move_reconcile_manager,account.move.reconcile manager,model_account_move_reconcile,account.group_account_manager,1,0,0,0 +access_account_analytic_line_invoice,account.analytic.line invoice,model_account_analytic_line,account.group_account_invoice,1,1,1,1 +access_account_invoice_line_accountant,account.invoice.line accountant,model_account_invoice_line,account.group_account_user,1,0,0,0 +access_res_partner_address_accountant,res.partner.address accountant,base.model_res_partner_address,account.group_account_user,1,0,0,0 +access_account_account_invoice,account.account invoice,model_account_account,account.group_account_invoice,1,1,1,1 +access_res_partner_address_invoice,res.partner.address invoice,base.model_res_partner_address,account.group_account_invoice,1,1,1,1 +access_account_analytic_accountant,account.analytic.account accountant,analytic.model_account_analytic_account,account.group_account_user,1,1,1,1 +access_account_account_type_invoice,account.account.type invoice,model_account_account_type,account.group_account_invoice,1,1,1,1 +access_report_account_receivable_invoice,report.account.receivable.invoice,model_report_account_receivable,account.group_account_invoice,1,1,1,1 +access_account_sequence_fiscal_year_invoice,account.sequence.fiscalyear invoice,model_account_sequence_fiscalyear,account.group_account_invoice,1,1,1,1 +access_account_tax_sale_manager,account.tax sale manager,model_account_tax,base.group_sale_salesman,1,0,0,0 +access_account_journal_sale_manager,account.journal sale manager,model_account_journal,base.group_sale_salesman,1,0,0,0 +access_account_invoice_tax_sale_manager,account.invoice.tax sale manager,model_account_invoice_tax,base.group_sale_salesman,1,0,0,0 +access_account_sequence_fiscal_year_sale_user,account.sequence.fiscalyear.sale.user,model_account_sequence_fiscalyear,base.group_sale_salesman,1,1,1,0 +access_account_sequence_fiscal_year_sale_manager,account.sequence.fiscalyear.sale.manager,model_account_sequence_fiscalyear,base.group_sale_manager,1,1,1,1 +access_account_treasury_report_manager,account.treasury.report.manager,model_account_treasury_report,account.group_account_manager,1,0,0,0 +access_account_financial_report,account.financial.report,model_account_financial_report,account.group_account_user,1,1,1,1 +access_account_financial_report_invoice,account.financial.report invoice,model_account_financial_report,account.group_account_invoice,1,0,0,0 diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 40ba7ea7127..c2797f274e7 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -37,24 +37,15 @@ data_dict = {'chart_account_id':ref('account.chart0')} from tools import test_reports test_reports.try_report_action(cr, uid, 'action_account_aged_balance_view',wiz_data=data_dict, context=ctx, our_module='account') -- - Print the Account Balance Sheet in Horizontal mode -- - !python {model: account.account}: | - ctx={} - ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]}) - data_dict = {'chart_account_id':ref('account.chart0'),'display_type': True} - from tools import test_reports - test_reports.try_report_action(cr, uid, 'action_account_bs_report',wiz_data=data_dict, context=ctx, our_module='account') - Print the Account Balance Sheet in Normal mode - !python {model: account.account}: | ctx={} ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]}) - data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False} + data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False, 'account_report_id': ref('account_financial_report_balancesheet0')} from tools import test_reports - test_reports.try_report_action(cr, uid, 'action_account_bs_report',wiz_data=data_dict, context=ctx, our_module='account') + test_reports.try_report_action(cr, uid, 'action_account_report',wiz_data=data_dict, context=ctx, our_module='account') - Print the Account Balance Report in Normal mode through the wizard - From Account Chart - @@ -147,18 +138,9 @@ !python {model: account.account}: | ctx={} ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]}) - data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False,'target_move': 'all'} + data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False,'target_move': 'all', 'account_report_id': ref('account_financial_report_balancesheet0')} from tools import test_reports - test_reports.try_report_action(cr, uid, 'action_account_pl_report',wiz_data=data_dict, context=ctx, our_module='account') -- - Print the Profit-Loss Report in Horizontal Mode -- - !python {model: account.account}: | - ctx={} - ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]}) - data_dict = {'chart_account_id':ref('account.chart0'),'display_type': True,'target_move': 'all'} - from tools import test_reports - test_reports.try_report_action(cr, uid, 'action_account_pl_report',wiz_data=data_dict, context=ctx, our_module='account') + test_reports.try_report_action(cr, uid, 'action_account_report',wiz_data=data_dict, context=ctx, our_module='account') - Print the Analytic Balance Report through the wizard - diff --git a/addons/account/wizard/__init__.py b/addons/account/wizard/__init__.py index d82eff62142..a78cf12050b 100644 --- a/addons/account/wizard/__init__.py +++ b/addons/account/wizard/__init__.py @@ -64,8 +64,6 @@ import account_report_account_balance import account_change_currency -import account_report_balance_sheet -import account_report_profit_loss # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_financial_report.py b/addons/account/wizard/account_financial_report.py index de9cae3a00c..92c623a9524 100644 --- a/addons/account/wizard/account_financial_report.py +++ b/addons/account/wizard/account_financial_report.py @@ -38,9 +38,19 @@ class accounting_report(osv.osv_memory): 'date_to_cmp': fields.date("End Date"), } + def _get_account_report(self, cr, uid, context=None): + menu_obj = self.pool.get('ir.ui.menu') + report_obj = self.pool.get('account.financial.report') + report_ids = [] + if context.get('active_id'): + menu = menu_obj.browse(cr, uid, context.get('active_id')).name + report_ids = report_obj.search(cr, uid, [('name','ilike',menu)]) + return report_ids and report_ids[0] or False + _defaults = { 'filter_cmp': 'filter_no', 'target_move': 'posted', + 'account_report_id': _get_account_report, } def _build_comparison_context(self, cr, uid, ids, data, context=None): diff --git a/addons/account/wizard/account_financial_report_view.xml b/addons/account/wizard/account_financial_report_view.xml index 1472da4ba87..4be6fb5e95c 100644 --- a/addons/account/wizard/account_financial_report_view.xml +++ b/addons/account/wizard/account_financial_report_view.xml @@ -40,6 +40,24 @@ new + + + + + + ). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# 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 . -# -############################################################################## - -from osv import osv, fields -from tools.translate import _ - -class account_bs_report(osv.osv_memory): - """ - This wizard will provide the account balance sheet report by periods, between any two dates. - """ - _name = 'account.bs.report' - _inherit = "account.common.account.report" - _description = 'Account Balance Sheet Report' - - def _get_def_reserve_account(self, cr, uid, context=None): - chart_id = self._get_account(cr, uid, context=context) - res = self.onchange_chart_id(cr, uid, [], chart_id, context=context) - if not res: - return False - return res['value']['reserve_account_id'] - - _columns = { - 'display_type': fields.boolean("Landscape Mode"), - 'reserve_account_id': fields.many2one('account.account', 'Reserve & Profit/Loss Account', - help='This account is used for transferring Profit/Loss (If It is Profit: Amount will be added, Loss : Amount will be deducted.), as calculated in Profit & Loss Report', - domain = [('type','=','other')]), - 'journal_ids': fields.many2many('account.journal', 'account_bs_report_journal_rel', 'account_id', 'journal_id', 'Journals', required=True), - } - - _defaults={ - 'display_type': False, - 'journal_ids': [], - 'reserve_account_id': _get_def_reserve_account, - } - - def onchange_chart_id(self, cr, uid, ids, chart_id, context=None): - if not chart_id: - return {} - account = self.pool.get('account.account').browse(cr, uid, chart_id , context=context) - if not account.company_id.property_reserve_and_surplus_account: - return {'value': {'reserve_account_id': False}} - return {'value': {'reserve_account_id': account.company_id.property_reserve_and_surplus_account.id}} - - - def _print_report(self, cr, uid, ids, data, context=None): - if context is None: - context = {} - data['form'].update(self.read(cr, uid, ids, ['display_type','reserve_account_id'])[0]) - if not data['form']['reserve_account_id']: - raise osv.except_osv(_('Warning'),_('Please define the Reserve and Profit/Loss account for current user company !')) - data = self.pre_print_report(cr, uid, ids, data, context=context) - if data['form']['display_type']: - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.balancesheet.horizontal', - 'datas': data, - } - else: - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.balancesheet', - 'datas': data, - } - -account_bs_report() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_balance_sheet_view.xml b/addons/account/wizard/account_report_balance_sheet_view.xml deleted file mode 100644 index faac52388a1..00000000000 --- a/addons/account/wizard/account_report_balance_sheet_view.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - Account Balance Sheet - account.bs.report - form - - - - - - - - - - - - - - - - - - - - - - - - Balance Sheet - account.bs.report - ir.actions.act_window - form - form - - new - - - - - - diff --git a/addons/account/wizard/account_report_profit_loss.py b/addons/account/wizard/account_report_profit_loss.py deleted file mode 100644 index f4c2897bfe0..00000000000 --- a/addons/account/wizard/account_report_profit_loss.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# 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 . -# -############################################################################## - -from osv import osv, fields - -class account_pl_report(osv.osv_memory): - """ - This wizard will provide the account profit and loss report by periods, between any two dates. - """ - _inherit = "account.common.account.report" - _name = "account.pl.report" - _description = "Account Profit And Loss Report" - - _columns = { - 'display_type': fields.boolean("Landscape Mode"), - 'journal_ids': fields.many2many('account.journal', 'account_pl_report_journal_rel', 'account_id', 'journal_id', 'Journals', required=True), - } - - _defaults = { - 'display_type': False, - 'journal_ids': [], - } - - 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, ['display_type'])[0]) - if data['form']['display_type']: - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'pl.account.horizontal', - 'datas': data, - } - else: - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'pl.account', - 'datas': data, - } - -account_pl_report() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_profit_loss_view.xml b/addons/account/wizard/account_report_profit_loss_view.xml deleted file mode 100644 index 75b6766ff87..00000000000 --- a/addons/account/wizard/account_report_profit_loss_view.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - Profit and Loss - account.pl.report - form - - - - - - - - - - - - - - - - - - - Account Profit And Loss - account.pl.report - ir.actions.act_window - form - form - - new - - - - - - - - diff --git a/addons/account_accountant/static/src/img/icon.png b/addons/account_accountant/static/src/img/icon.png new file mode 100644 index 00000000000..1e25fc1efaf Binary files /dev/null and b/addons/account_accountant/static/src/img/icon.png differ diff --git a/addons/account_analytic_analysis/__openerp__.py b/addons/account_analytic_analysis/__openerp__.py index ee887e1ff6a..01ef6a3cb81 100644 --- a/addons/account_analytic_analysis/__openerp__.py +++ b/addons/account_analytic_analysis/__openerp__.py @@ -46,7 +46,6 @@ user-wise as well as month wise. ], 'demo_xml' : [], 'installable': True, - 'application': True, 'active' : False, 'certificate': '0042927202589', } diff --git a/addons/account_analytic_analysis/security/ir.model.access.csv b/addons/account_analytic_analysis/security/ir.model.access.csv index 80b9f37db1f..4bdabaf6a87 100644 --- a/addons/account_analytic_analysis/security/ir.model.access.csv +++ b/addons/account_analytic_analysis/security/ir.model.access.csv @@ -1,3 +1,3 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_account_analytic_analysis_summary_user,account_analytic_analysis.summary.user,model_account_analytic_analysis_summary_user,account.group_account_manager,1,0,0,0 -access_account_analytic_analysis_summary_month,account_analytic_analysis.summary.month,model_account_analytic_analysis_summary_month,account.group_account_manager,1,0,0,0 +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_analytic_analysis_summary_user,account_analytic_analysis.summary.user,model_account_analytic_analysis_summary_user,account.group_account_manager,1,0,0,0 +access_account_analytic_analysis_summary_month,account_analytic_analysis.summary.month,model_account_analytic_analysis_summary_month,account.group_account_manager,1,0,0,0 diff --git a/addons/account_analytic_default/security/ir.model.access.csv b/addons/account_analytic_default/security/ir.model.access.csv index f92a9fd4dfa..cdfebbbb156 100644 --- a/addons/account_analytic_default/security/ir.model.access.csv +++ b/addons/account_analytic_default/security/ir.model.access.csv @@ -1,5 +1,4 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_account_analytic_default,account.analytic.default,model_account_analytic_default,account.group_account_user,1,0,0,0 -access_account_analytic_default_manager,account.analytic.default.manager,model_account_analytic_default,account.group_account_manager,1,1,1,1 -access_account_analytic_default_invoice,account.analytic.default invoice,model_account_analytic_default,account.group_account_invoice,1,1,1,1 -access_account_analytic_default_salesman,account.analytic.default.salesman,model_account_analytic_default,base.group_sale_salesman,1,1,1,1 +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_analytic_default,account.analytic.default,model_account_analytic_default,account.group_account_user,1,0,0,0 +access_account_analytic_default_invoice,account.analytic.default invoice,model_account_analytic_default,account.group_account_invoice,1,1,1,1 +access_account_analytic_default_salesman,account.analytic.default.salesman,model_account_analytic_default,base.group_sale_salesman,1,1,1,1 diff --git a/addons/account_analytic_plans/security/ir.model.access.csv b/addons/account_analytic_plans/security/ir.model.access.csv index f7f141ac15a..9ba40d5c1c3 100644 --- a/addons/account_analytic_plans/security/ir.model.access.csv +++ b/addons/account_analytic_plans/security/ir.model.access.csv @@ -1,8 +1,6 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_account_analytic_plan","account.analytic.plan","model_account_analytic_plan","account.group_account_user",1,1,1,1 -"access_account_analytic_plan_line","account.analytic.plan.line","model_account_analytic_plan_line","account.group_account_user",1,1,1,1 -"access_account_analytic_plan_instance","account.analytic.plan.instance","model_account_analytic_plan_instance","account.group_account_user",1,1,1,1 -"access_account_analytic_plan_instance_line","account.analytic.plan.instance.line","model_account_analytic_plan_instance_line","account.group_account_user",1,1,1,1 -"access_account_analytic_plan_line_invoice","account.analytic.plan.line.invoice","model_account_analytic_plan_line","account.group_account_user",1,1,1,1 -"access_account_analytic_plan_instance_manager","account.analytic.plan.instance manager","model_account_analytic_plan_instance","account.group_account_manager",1,1,1,1 -"access_account_analytic_plan_instance_line_manager","account.analytic.plan.instance.line manager","model_account_analytic_plan_instance_line","account.group_account_manager",1,1,1,1 +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_analytic_plan,account.analytic.plan,model_account_analytic_plan,account.group_account_user,1,1,1,1 +access_account_analytic_plan_line,account.analytic.plan.line,model_account_analytic_plan_line,account.group_account_user,1,1,1,1 +access_account_analytic_plan_instance,account.analytic.plan.instance,model_account_analytic_plan_instance,account.group_account_user,1,1,1,1 +access_account_analytic_plan_instance_line,account.analytic.plan.instance.line,model_account_analytic_plan_instance_line,account.group_account_user,1,1,1,1 +access_account_analytic_plan_line_invoice,account.analytic.plan.line.invoice,model_account_analytic_plan_line,account.group_account_user,1,1,1,1 diff --git a/addons/account_anglo_saxon/__openerp__.py b/addons/account_anglo_saxon/__openerp__.py index 52ec0588e88..432021a78c9 100644 --- a/addons/account_anglo_saxon/__openerp__.py +++ b/addons/account_anglo_saxon/__openerp__.py @@ -36,7 +36,7 @@ when the invoice is created to transfer this amount to the debtor or creditor ac Secondly, price differences between actual purchase price and fixed product standard price are booked on a separate account""", "images" : ["images/account_anglo_saxon.jpeg"], "depends" : ["product", "purchase"], - "category" : "Accounting & Finance", + "category" : "Hidden/Dependency", "init_xml" : [], "demo_xml" : [], "update_xml" : ["product_view.xml",], diff --git a/addons/account_asset/account_asset_view.xml b/addons/account_asset/account_asset_view.xml index e986ef4bf0d..6fa8184554b 100644 --- a/addons/account_asset/account_asset_view.xml +++ b/addons/account_asset/account_asset_view.xml @@ -51,9 +51,7 @@ - - @@ -94,9 +92,9 @@ - + @@ -121,7 +119,7 @@ + +
@@ -49,15 +50,15 @@
  • Subtotal: - 0 € + 0
  • Tax: - 0 € + 0
  • Total: - 0 € + 0
@@ -102,11 +103,11 @@ - + - +
Paid: €
Change: €
@@ -122,6 +123,16 @@ + + + + pending orders + + + + +
There are pending operations that could not be saved into the database, are you sure you want to exit?
+