diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 40f8fd277a8..b2fa85304bb 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2508,8 +2508,6 @@ - -
@@ -2519,7 +2517,6 @@ - diff --git a/addons/account/i18n/hr.po b/addons/account/i18n/hr.po index 329ae8fa080..1fbbfcbd0ab 100644 --- a/addons/account/i18n/hr.po +++ b/addons/account/i18n/hr.po @@ -2668,10 +2668,10 @@ msgid "" "partners accounts (for debit/credit computations), closed for deprecated " "accounts." msgstr "" -"Pogled: Sintetički zbrojni konto, ne sadrži knjiženja\r\n" -"Konsolidacija: Zbrojni konto za više poduzeća i paralelne kontne planove\r\n" -"Obveze: Salda konta partnera - dobavljači\r\n" -"Potraživanja: Salda konta partnera - kupci\r\n" +"Pogled: Sintetički zbrojni konto, ne sadrži knjiženja\n" +"Konsolidacija: Zbrojni konto za više poduzeća i paralelne kontne planove\n" +"Obveze: Salda konta partnera - dobavljači\n" +"Potraživanja: Salda konta partnera - kupci\n" "Zatvoren: Za konta koja se više ne koriste" #. module: account diff --git a/addons/account/wizard/account_tax_chart.py b/addons/account/wizard/account_tax_chart.py new file mode 100644 index 00000000000..1595a603dd0 --- /dev/null +++ b/addons/account/wizard/account_tax_chart.py @@ -0,0 +1,79 @@ +# -*- 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 fields, osv + +class account_tax_chart(osv.osv_memory): + """ + For Chart of taxes + """ + _name = "account.tax.chart" + _description = "Account tax chart" + _columns = { + 'period_id': fields.many2one('account.period', \ + 'Period', \ + ), + 'target_move': fields.selection([('all', 'All Entries'), + ('posted', 'All Posted Entries')], 'Target Moves', required=True), + } + + def _get_period(self, cr, uid, context=None): + """Return default period value""" + period_ids = self.pool.get('account.period').find(cr, uid) + return period_ids and period_ids[0] or False + + def account_tax_chart_open_window(self, cr, uid, ids, context=None): + """ + Opens chart of Accounts + @param cr: the current row, from the database cursor, + @param uid: the current user’s ID for security checks, + @param ids: List of account chart’s IDs + @return: dictionary of Open account chart window on given fiscalyear and all Entries or posted entries + """ + mod_obj = self.pool.get('ir.model.data') + act_obj = self.pool.get('ir.actions.act_window') + period_obj = self.pool.get('account.period') + if context is None: + context = {} + data = self.read(cr, uid, ids, [], context=context)[0] + result = mod_obj._get_id(cr, uid, 'account', 'action_tax_code_tree') + id = mod_obj.read(cr, uid, [result], ['res_id'], context=context)[0]['res_id'] + result = act_obj.read(cr, uid, [id], context=context)[0] + if data['period_id']: + fiscalyear_id = period_obj.read(cr, uid, [data['period_id']], context=context)[0]['fiscalyear_id'][0] + result['context'] = str({'period_id': data['period_id'], \ + 'fiscalyear_id': fiscalyear_id, \ + 'state': data['target_move']}) + else: + result['context'] = str({'state': data['target_move']}) + + if data['period_id']: + result['name'] += ':' + self.pool.get('account.period').read(cr, uid, [data['period_id']], context=context)[0]['code'] + return result + + _defaults = { + 'period_id': _get_period, + 'target_move': 'all' + } + +account_tax_chart() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account/wizard/account_tax_chart_view.xml b/addons/account/wizard/account_tax_chart_view.xml new file mode 100644 index 00000000000..f60ad394857 --- /dev/null +++ b/addons/account/wizard/account_tax_chart_view.xml @@ -0,0 +1,45 @@ + + + + + + account.tax.chart.form + account.tax.chart + form + + + + + + + +