# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved # $Id$ # # 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 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ############################################################################## import wizard import pooler import time from tools.translate import _ 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 = '''