From 32518af10916aa8242c44fc33328f96ff0ffbc0d Mon Sep 17 00:00:00 2001 From: Harshad Modi Date: Wed, 24 Sep 2008 16:24:26 +0530 Subject: [PATCH] added wizard to open entries for analytical account by selecting date on Account analytical entry list view bzr revid: hmo@tinyerp.com-20080924105426-yqf4pcm7isoezm7p --- addons/account/project/project_view.xml | 6 +- addons/account/project/wizard/__init__.py | 1 + .../wizard/wizard_account_analytic_line.py | 86 +++++++++++++++++++ 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 addons/account/project/wizard/wizard_account_analytic_line.py diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 5178b07eea8..45a4307a6c9 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -150,7 +150,9 @@ form - + + + @@ -238,7 +240,7 @@ # - account.analytic.journal.open.form + Entries of Open Analytic Journals account.analytic.line form tree,form diff --git a/addons/account/project/wizard/__init__.py b/addons/account/project/wizard/__init__.py index 0e66d867caa..477e5262a00 100644 --- a/addons/account/project/wizard/__init__.py +++ b/addons/account/project/wizard/__init__.py @@ -34,6 +34,7 @@ import wizard_account_analytic_inverted_balance_report import wizard_account_analytic_cost_ledger_report import wizard_account_analytic_cost_ledger_for_journal_report import wizard_account_analytic_analytic_check +import wizard_account_analytic_line # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/project/wizard/wizard_account_analytic_line.py b/addons/account/project/wizard/wizard_account_analytic_line.py new file mode 100644 index 00000000000..143737ab153 --- /dev/null +++ b/addons/account/project/wizard/wizard_account_analytic_line.py @@ -0,0 +1,86 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved. +# +# $Id$ +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import wizard +import pooler +import time + +def _action_open_window(self, cr, uid, data, context): + domain=[] + from_date= data['form']['from_date'] + to_date=data['form']['to_date'] + if from_date and to_date: + domain=[('date','>=',from_date),('date','<=',to_date)] + elif from_date: + domain=[('date','>=',from_date)] + elif to_date: + domain=[('date','<=',to_date)] + return { + 'name': 'Analytic Entries', + 'view_type': 'form', + "view_mode": 'tree,form', + 'res_model': 'account.analytic.line', + 'type': 'ir.actions.act_window', + 'domain': domain} + + +class account_analytic_line(wizard.interface): + form1 = ''' +
+ + + + + +