1
# -*- coding: utf-8 -*-
2
##############################################################################
4
# Copyright (C) 2012 Enapps LTD (<http://www.enapps.co.uk>).
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as
8
# published by the Free Software Foundation, either version 3 of the
9
# License, or (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
##############################################################################
22
from osv import fields
24
from tools.translate import _
27
class ea_import_chain_result(osv.osv):
28
_name='ea_import.chain.result'
29
_order = 'import_time desc'
31
'name' : fields.char('Model', size=256, required=True),
32
'chain_id': fields.many2one('ea_import.chain',),
33
'result_ids_file': fields.binary('Result Ids',),
34
'import_time': fields.datetime('Import Time',),
35
'scheduler_log_id': fields.many2one('ea_import.scheduler.log',),
41
def show_result(self, cr, uid, ids, context={}):
42
for result in self.browse(cr, uid, ids, context=context):
43
result_ids = eval(base64.b64decode(result.result_ids_file))
46
'view_mode': 'tree,form',
49
'res_model': result.name,
50
'domain': [('id', 'in', result_ids)],
51
'type': 'ir.actions.act_window',
56
ea_import_chain_result()
58
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: