[IMP]Yaltik CRM Action : event id should not be copied on duplicate

This commit is contained in:
Fabien BOURGEOIS 2018-03-14 07:12:14 +01:00
parent 276c7a066f
commit 3ff204cc23
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@
{ {
'name': 'CRM Actions', 'name': 'CRM Actions',
'summary': 'Action management, instead of new activity, in CRM', 'summary': 'Action management, instead of new activity, in CRM',
'version': '10.0.1.3.4', 'version': '10.0.1.3.5',
'category': 'Sales', 'category': 'Sales',
'author': 'Fabien BOURGEOIS - Yaltik', 'author': 'Fabien BOURGEOIS - Yaltik',
'license': 'AGPL-3', 'license': 'AGPL-3',

View File

@ -45,7 +45,8 @@ class CrmAction(models.Model):
user_id = fields.Many2one('res.users', string='User', required=True, user_id = fields.Many2one('res.users', string='User', required=True,
default=lambda self: self.env.user) default=lambda self: self.env.user)
lead_id = fields.Many2one('crm.lead', string='Lead', ondelete='cascade') lead_id = fields.Many2one('crm.lead', string='Lead', ondelete='cascade')
event_id = fields.Many2one('calendar.event', 'Calendar event', ondelete='cascade') event_id = fields.Many2one('calendar.event', 'Calendar event', ondelete='cascade',
copy=False)
action_type_id = fields.Many2one( action_type_id = fields.Many2one(
'crm.action.type', string='Type', required=True, 'crm.action.type', string='Type', required=True,
default=lambda self: self.env['crm.action.type'].search([], limit=1)) default=lambda self: self.env['crm.action.type'].search([], limit=1))