[IMP]base_calander: Add create method for crm.meeting
Update the Doc remove crm.meeting inheritance from .py file bzr revid: dbr@tinyerp.com-20130822123534-zx3uxdjojoj55bqn
This commit is contained in:
parent
051b042bc0
commit
89d03a854a
|
@ -64,6 +64,15 @@ class crm_meeting(osv.Model):
|
|||
'state': 'open',
|
||||
}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = super(crm_meeting, self).create(cr, uid, vals, context=context)
|
||||
obj = self.browse(cr, uid, res, context=context)
|
||||
if 'active_model' in context and context['active_model'] == 'hr.applicant':
|
||||
self.pool.get('hr.applicant').log_meeting_in_parent(cr, uid, context['active_ids'], vals['name'], vals['date'], vals['duration'], context=context)
|
||||
return res
|
||||
|
||||
def message_get_subscription_data(self, cr, uid, ids, context=None):
|
||||
res = {}
|
||||
for virtual_id in ids:
|
||||
|
|
|
@ -14,3 +14,5 @@ Changelog
|
|||
- ``hr.recruitment.stage``: removed ``state`` field.
|
||||
|
||||
- Removed ``hired.employee`` wizard.
|
||||
|
||||
- Add new method ``log_meeting_in_parent``.
|
||||
|
|
|
@ -281,7 +281,7 @@ class hr_applicant(osv.Model):
|
|||
return stage_ids[0]
|
||||
return False
|
||||
|
||||
def log_meeting(self, cr, uid, ids, meeting_subject, meeting_date, duration, context=None):
|
||||
def log_meeting_in_parent(self, cr, uid, ids, meeting_subject, meeting_date, duration, context=None):
|
||||
if not duration:
|
||||
message = _("Meeting scheduled at '%s'<br> Subject: %s") % (meeting_date, meeting_subject)
|
||||
else:
|
||||
|
@ -518,12 +518,4 @@ class applicant_category(osv.osv):
|
|||
'name': fields.char('Name', size=64, required=True, translate=True),
|
||||
}
|
||||
|
||||
class crm_meeting(osv.Model):
|
||||
_inherit = 'crm.meeting'
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
if 'active_ids' in context and 'active_model' in context and context['active_model'] == 'hr.applicant':
|
||||
self.pool.get('hr.applicant').log_meeting(cr, uid, context['active_ids'], vals['name'], vals['date'], vals['duration'], context=context)
|
||||
return super(crm_meeting, self).create(cr, uid, vals, context=context)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue