1
################################################################################
3
# OpenERP, Open Source Management Solution
4
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
7
# Coded by: Juan Jose Pimentel <juan.pimentel@digi-solution.com>
8
# Planified by: Juan Jose Pimentel <juan.pimentel@digi-solution.com>
10
# This program is free software: you can redistribute it and/or modify
11
# it under the terms of the GNU General Public License as published by
12
# the Free Software Foundation, either version 3 of the License, or
13
# (at your option) any later version.
15
# This program is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
# GNU General Public License for more details.
20
# You should have received a copy of the GNU General Public License
21
# along with this program. If not, see <http://www.gnu.org/licenses/>.
23
##############################################################################
25
from osv import osv, fields
26
from tools.translate import _
28
class digi_answer_wizard(osv.osv_memory):
29
_name = 'digi.answer.wizard'
30
_decription= 'Digicommerce Partner Contact Answer Wizard'
32
def action_done(self, cr, uid, ids, *args):
33
notes = self.read(cr, uid, ids)[0].get('notes')
35
raise osv.except_osv(_('Error!'), _('You must answer to partner'))
36
if args[0].get('active_ids'):
37
partner_contact_id = args[0].get('active_ids')
38
pc_obj = self.pool.get('digicommerce.partner.contact').browse(cr, uid, partner_contact_id,args[0])
42
'view_mode' : 'tree,form',
43
'type': 'ir.actions.act_window_close',
47
'content':fields.text('Question',),
48
'notes':fields.text('Answer',),
53
'notes': lambda obj, cr, uid, context: context.get('notes'),
54
'content': lambda obj, cr, uid, context: context.get('content'),