diff --git a/yaltik_crm_action/__manifest__.py b/yaltik_crm_action/__manifest__.py
index 4144f86..341074e 100644
--- a/yaltik_crm_action/__manifest__.py
+++ b/yaltik_crm_action/__manifest__.py
@@ -18,7 +18,7 @@
{
'name': 'CRM Actions',
'summary': 'Action management, instead of new activity, in CRM',
- 'version': '10.0.1.2.1',
+ 'version': '10.0.1.2.2',
'category': 'Sales',
'author': 'Fabien BOURGEOIS - Yaltik',
'license': 'AGPL-3',
diff --git a/yaltik_crm_action/models/crm_action.py b/yaltik_crm_action/models/crm_action.py
index d863b8c..cec4284 100644
--- a/yaltik_crm_action/models/crm_action.py
+++ b/yaltik_crm_action/models/crm_action.py
@@ -74,6 +74,15 @@ class CrmAction(models.Model):
details = u' '.join(action.details.split()[:5]) + details
action.display_name = u'[{}]{}'.format(action.action_type_name,
details)
+ @api.multi
+ def set_to_draft(self):
+ """ Set actions to draft """
+ self.write({'state': 'draft'})
+
+ @api.multi
+ def set_to_done(self):
+ """ Set actions to done """
+ self.write({'state': 'done'})
@api.multi
def create_linked_event(self):
diff --git a/yaltik_crm_action/models/crm_lead.py b/yaltik_crm_action/models/crm_lead.py
index 0944b65..5e596b0 100644
--- a/yaltik_crm_action/models/crm_lead.py
+++ b/yaltik_crm_action/models/crm_lead.py
@@ -52,4 +52,4 @@ class CrmLead(models.Model):
self.ensure_one()
lead = self[0]
if lead.next_action_id:
- lead.next_action_id.confirm()
+ lead.next_action_id.set_to_done()
diff --git a/yaltik_crm_action/views/crm_action_views.xml b/yaltik_crm_action/views/crm_action_views.xml
index 5b93659..3345e9a 100644
--- a/yaltik_crm_action/views/crm_action_views.xml
+++ b/yaltik_crm_action/views/crm_action_views.xml
@@ -80,7 +80,7 @@ along with this program. If not, see .
-