import crm_helpdesk
import report
+import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
import binascii
import tools
-wizard.email_compose_message.email_model.append('crm.helpdesk')
CRM_HELPDESK_STATES = (
crm.AVAILABLE_STATES[2][0], # Cancelled
crm.AVAILABLE_STATES[3][0], # Done
--- /dev/null
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import email_compose_message
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
--- /dev/null
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
+#
+# 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 <http://www.gnu.org/licenses/>
+#
+##############################################################################
+
+from osv import osv
+from osv import fields
+import tools
+
+class email_compose_message(osv.osv_memory):
+ _inherit = 'email.compose.message'
+
+ def get_value(self, cr, uid, model, resource_id, context=None):
+ if context is None:
+ context = {}
+ result = super(email_compose_message, self).get_value(cr, uid, model, resource_id, context=context)
+ if model == 'crm.helpdesk' and resource_id:
+ model_obj = self.pool.get(model)
+ data = model_obj.browse(cr, uid , resource_id, context)
+ result.update({
+ 'subject' : data.name or False,
+ 'email_to' : data.email_from or False,
+ 'email_from' : data.user_id and data.user_id.address_id and data.user_id.address_id.email or False,
+ 'body' : '\n' + (tools.ustr(data.user_id.signature or '')),
+ 'email_cc' : tools.ustr(data.email_cc or ''),
+ 'model': model or False,
+ 'res_id': resource_id or False,
+ })
+ return result
+
+email_compose_message()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
import decimal_precision as dp
from crm import wizard
-wizard.email_compose_message.email_model.append('event.registration')
class event_type(osv.osv):
""" Event Type """
import event_confirm_registration
import event_confirm
import partner_event_registration
+import email_compose_message
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
--- /dev/null
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
+#
+# 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 <http://www.gnu.org/licenses/>
+#
+##############################################################################
+
+from osv import osv
+from osv import fields
+import tools
+
+class email_compose_message(osv.osv_memory):
+ _inherit = 'email.compose.message'
+
+ def get_value(self, cr, uid, model, resource_id, context=None):
+ if context is None:
+ context = {}
+ result = super(email_compose_message, self).get_value(cr, uid, model, resource_id, context=context)
+ if model == 'event.registration' and resource_id:
+ model_obj = self.pool.get(model)
+ data = model_obj.browse(cr, uid , resource_id, context)
+ result.update({
+ 'subject' : data.event_id.name or False,
+ 'email_to' : data.email_from or False,
+ 'email_from' : data.user_id and data.user_id.address_id and data.user_id.address_id.email or False,
+ 'body' : '\n' + (tools.ustr(data.user_id.signature or '')),
+ 'email_cc' : tools.ustr(data.email_cc or ''),
+ 'model': model or False,
+ 'res_id': resource_id or False,
+ })
+ return result
+
+email_compose_message()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
from tools.translate import _
from crm import wizard
-wizard.email_compose_message.email_model.append('hr.applicant')
-
AVAILABLE_STATES = [
('draft', 'New'),
('open', 'In Progress'),
import hr_recruitment_phonecall
import hr_recruitment_create_partner_job
import hr_recruitment_employee_hired
+import email_compose_message
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
--- /dev/null
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
+#
+# 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 <http://www.gnu.org/licenses/>
+#
+##############################################################################
+
+from osv import osv
+from osv import fields
+import tools
+
+
+class email_compose_message(osv.osv_memory):
+ _inherit = 'email.compose.message'
+
+ def get_value(self, cr, uid, model, resource_id, context=None):
+ if context is None:
+ context = {}
+ result = super(email_compose_message, self).get_value(cr, uid, model, resource_id, context=context)
+ if model == 'hr.applicant' and resource_id:
+ model_obj = self.pool.get(model)
+ data = model_obj.browse(cr, uid , resource_id, context)
+ result.update({
+ 'subject' : data.name or False,
+ 'email_to' : data.email_from or False,
+ 'email_from' : data.user_id and data.user_id.address_id and data.user_id.address_id.email or False,
+ 'body' : '\n' + (tools.ustr(data.user_id.signature or '')),
+ 'email_cc' : tools.ustr(data.email_cc or ''),
+ 'model': model or False,
+ 'res_id': resource_id or False,
+ })
+ return result
+
+email_compose_message()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
import tools
from crm import wizard
-wizard.email_compose_message.email_model.append('project.issue')
-
class project_issue_version(osv.osv):
_name = "project.issue.version"
_order = "name desc"
--- /dev/null
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# $Id$
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import email_compose_message
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
--- /dev/null
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
+#
+# 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 <http://www.gnu.org/licenses/>
+#
+##############################################################################
+
+from osv import osv
+from osv import fields
+import tools
+
+class email_compose_message(osv.osv_memory):
+ _inherit = 'email.compose.message'
+
+ def get_value(self, cr, uid, model, resource_id, context=None):
+ if context is None:
+ context = {}
+ result = super(email_compose_message, self).get_value(cr, uid, model, resource_id, context=context)
+ if model == 'project.issue' and resource_id:
+ model_obj = self.pool.get(model)
+ data = model_obj.browse(cr, uid , resource_id, context)
+ result.update({
+ 'subject' : data.name or False,
+ 'email_to' : data.email_from or False,
+ 'email_from' : data.user_id and data.user_id.address_id and data.user_id.address_id.email or False,
+ 'body' : '\n' + (tools.ustr(data.user_id.signature or '')),
+ 'email_cc' : tools.ustr(data.email_cc or ''),
+ 'model': model or False,
+ 'res_id': resource_id or False,
+ })
+ return result
+
+email_compose_message()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
import project_planning
import report
+import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
--- /dev/null
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import email_compose_message
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
--- /dev/null
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
+#
+# 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 <http://www.gnu.org/licenses/>
+#
+##############################################################################
+
+from osv import osv
+from osv import fields
+import tools
+
+class email_compose_message(osv.osv_memory):
+ _inherit = 'email.compose.message'
+
+ def get_value(self, cr, uid, model, resource_id, context=None):
+ if context is None:
+ context = {}
+ result = super(email_compose_message, self).get_value(cr, uid, model, resource_id, context=context)
+ if model == 'project.task' and resource_id:
+ model_obj = self.pool.get(model)
+ data = model_obj.browse(cr, uid , resource_id, context)
+ result.update({
+ 'subject' : data.name or False,
+ 'email_to' : data.user_id.user_email or False,
+ 'email_from' : data.user_id and data.user_id.address_id and data.user_id.address_id.email or False,
+ 'body' : '\n' + (tools.ustr(data.user_id.signature or '')),
+ 'model': model or False,
+ 'res_id': resource_id or False,
+ })
+ return result
+
+email_compose_message()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: