Skip to content

Commit

Permalink
[MIG][9.0] crm_action module
Browse files Browse the repository at this point in the history
  • Loading branch information
cubells committed May 5, 2017
1 parent 79cf502 commit fac5f1e
Show file tree
Hide file tree
Showing 14 changed files with 487 additions and 399 deletions.
22 changes: 15 additions & 7 deletions crm_action/README.rst
Expand Up @@ -7,7 +7,8 @@ CRM Action
==========

This module was written to extend CRM features.
It delivers new object named "Actions" to follow history around leads and opportunities.
It delivers new object named "Actions" to follow history around leads and
opportunities.

Installation
============
Expand All @@ -17,9 +18,14 @@ Just install the module as usual (it only depends on the native *crm* module).
Configuration
=============

Go to the menu *Sales > Configuration > Leads & Opportunities > Action Types* and create action types.
Go to the menu *Sales > Configuration > Leads & Opportunities > Action Types*
and create action types.

If you want to have a daily email reminder of your CRM actions to do, go to the menu *Settings > Technical > Automation > Scheduled Actions* and activate the action *CRM Action email reminder* (it is inactive by default). You can customize the email template in the menu *Settings > Technical > Email > Templates* and select the email template named *CRM Action reminder*.
If you want to have a daily email reminder of your CRM actions to do, go to
the menu *Settings > Technical > Automation > Scheduled Actions* and activate
the action *CRM Action email reminder* (it is inactive by default). You can
customize the email template in the menu *Settings > Technical > Email >
Templates* and select the email template named *CRM Action reminder*.

Usage
=====
Expand All @@ -30,11 +36,14 @@ To use this module, you need to :
#. create a new action by using the *Actions* button,
#. when the action is done, click on the button *Mark as done*.

You can overview all actions for any lead or opportunity with the *Actions* menu entry. On the form view of an opportunity, you can see the next action to do and there is also a button to mark it as done (it will immediately display the new next action to do).
You can overview all actions for any lead or opportunity with the *Actions*
menu entry. On the form view of an opportunity, you can see the next action to
do and there is also a button to mark it as done (it will immediately display
the new next action to do).

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/111/8.0
:target: https://runbot.odoo-community.org/runbot/111/9.0

Known issues / Roadmap
======================
Expand All @@ -50,15 +59,14 @@ help us smashing it by providing a detailed and welcomed feedback.
Credits
=======

Module developed and tested with Odoo version 8.0

Contributors
------------

* David DUFRESNE <david.dufresne@savoirfairelinux.com>
* Jordi RIERA <jordi.riera@savoirfairelinux.com>
* Bruno JOLIVEAU <bruno.joliveau@savoirfairelinux.com>
* Alexis de Lattre <alexis.delattre@akretion.com>
* Vicent Cubells <vicent.cubells@tecnativa.com>

Maintainer
----------
Expand Down
17 changes: 12 additions & 5 deletions crm_action/__openerp__.py
@@ -1,15 +1,20 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Savoir-faire Linux (<http://www.savoirfairelinux.com>)
# Copyright 2015-2016 Savoir-faire Linux (<http://www.savoirfairelinux.com>)
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
'name': 'CRM Action',
'version': '8.0.1.2.0',
'author': 'Savoir-faire Linux,Odoo Community Association (OCA)',
'version': '9.0.1.0.0',
'author': 'Savoir-faire Linux, '
'Tecnativa, '
'Odoo Community Association (OCA)',
'license': 'AGPL-3',
'category': 'CRM',
'summary': 'Adds action management in CRM',
'depends': ['crm'],
'depends': [
'crm',
],
'data': [
'security/ir.model.access.csv',
'security/ir_rule_data.xml',
Expand All @@ -18,7 +23,9 @@
'views/crm_lead_view.xml',
'data/email_reminder.xml',
],
'demo': ['demo/demo.xml'],
'demo': [
'demo/demo.xml',
],
'installable': True,
'application': True,
}
60 changes: 29 additions & 31 deletions crm_action/data/email_reminder.xml
@@ -1,36 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
Copyright 2017 Tecnativa - Vicent Cubells
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<data noupdate="1">
<record id="crm_action_reminder_email_cron" model="ir.cron">
<field name="name">CRM Action email reminder</field>
<field name="active" eval="False"/> <!-- we want it inactive by default -->
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field> <!-- don't limit the number of calls -->
<field name="doall" eval="False"/>
<field name="model" eval="'crm.action'"/>
<field name="function" eval="'_send_email_reminder'" />
<field name="args" eval="'()'"/>
</record>
</data>
<data>

<openerp>

<data noupdate="1">
<record id="crm_action_reminder_email_cron" model="ir.cron">
<field name="name">CRM Action email reminder</field>
<field name="active" eval="False"/> <!-- we want it inactive by default -->
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field> <!-- don't limit the number of calls -->
<field name="doall" eval="False"/>
<field name="model" eval="'crm.action'"/>
<field name="function" eval="'_send_email_reminder'" />
<field name="args" eval="'()'"/>
</record>

</data>
<data>

<record id="crm_action_reminder_email_template" model="email.template">
<field name="name">CRM Action Reminder</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="auto_delete" eval="False"/>
<field name="email_from">${ctx.get('company').email or 'odoo@example.com'}</field>
<field name="email_to">${object.email}</field>
<field name="subject">[${ctx.get('company').name}] Today's CRM actions</field>
<field name="body_html"><![CDATA[
<record id="crm_action_reminder_email_template" model="mail.template">
<field name="name">CRM Action Reminder</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="auto_delete" eval="False"/>
<field name="email_from">${ctx.get('company').email or 'odoo@example.com'}</field>
<field name="email_to">${object.email}</field>
<field name="subject">[${ctx.get('company').name}] Today's CRM actions</field>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p>Dear ${object.name},</p>
Expand Down Expand Up @@ -70,7 +68,7 @@ Automatic e-mail sent by Odoo. Do not reply.
</p>
</div>
]]></field>
</record>
</record>

</data>
</openerp>
</data>
</odoo>
128 changes: 62 additions & 66 deletions crm_action/demo/demo.xml
@@ -1,77 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<odoo noupdate="1">

<record id="meeting" model="crm.action.type">
<field name="name">Meeting</field>
</record>

<record id="meeting" model="crm.action.type">
<field name="name">Meeting</field>
</record>
<record id="followup" model="crm.action.type">
<field name="name">Followup</field>
</record>

<record id="followup" model="crm.action.type">
<field name="name">Followup</field>
</record>
<record id="demo" model="crm.action.type">
<field name="name">Demo</field>
</record>

<record id="demo" model="crm.action.type">
<field name="name">Demo</field>
</record>
<record id="case_11_action_1" model="crm.action">
<field name="details">Get news about our quote</field>
<field name="date" eval="time.strftime('%Y-%m-01')"/>
<field name="action_type_id" ref="followup"/>
<field name="lead_id" ref="crm.crm_case_11"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">done</field>
</record>

<record id="case_11_action_1" model="crm.action">
<field name="details">Get news about our quote</field>
<field name="date" eval="time.strftime('%Y-%m-01')"/>
<field name="action_type_id" ref="followup"/>
<field name="lead_id" ref="crm.crm_case_11"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">done</field>
</record>
<record id="case_11_action_2" model="crm.action">
<field name="details">Meeting</field>
<field name="date" eval="time.strftime('%Y-%m-01')"/>
<field name="action_type_id" ref="meeting"/>
<field name="lead_id" ref="crm.crm_case_11"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">draft</field>
</record>

<record id="case_11_action_2" model="crm.action">
<field name="details">Meeting</field>
<field name="date" eval="time.strftime('%Y-%m-01')"/>
<field name="action_type_id" ref="meeting"/>
<field name="lead_id" ref="crm.crm_case_11"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">draft</field>
</record>
<record id="case_11_action_3" model="crm.action">
<field name="details">Organise a demo in our showroom</field>
<field name="date" eval="(datetime.now() + relativedelta(day=15)).strftime('%Y-%m-%d')"/>
<field name="action_type_id" ref="demo"/>
<field name="lead_id" ref="crm.crm_case_11"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">draft</field>
</record>

<record id="case_11_action_3" model="crm.action">
<field name="details">Organise a demo in our showroom</field>
<field name="date" eval="(datetime.now() + relativedelta(day=15)).strftime('%Y-%m-%d')"/>
<field name="action_type_id" ref="demo"/>
<field name="lead_id" ref="crm.crm_case_11"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">draft</field>
</record>
<record id="case_13_action_1" model="crm.action">
<field name="details">Get feedback about our quote</field>
<field name="date" eval="time.strftime('%Y-%m-01')"/>
<field name="action_type_id" ref="followup"/>
<field name="lead_id" ref="crm.crm_case_13"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">done</field>
</record>

<record id="case_13_action_1" model="crm.action">
<field name="details">Get feedback about our quote</field>
<field name="date" eval="time.strftime('%Y-%m-01')"/>
<field name="action_type_id" ref="followup"/>
<field name="lead_id" ref="crm.crm_case_13"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">done</field>
</record>
<record id="case_13_action_2" model="crm.action">
<field name="details">Meet in real life</field>
<field name="date" eval="time.strftime('%Y-%m-01')"/>
<field name="action_type_id" ref="meeting"/>
<field name="lead_id" ref="crm.crm_case_13"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">draft</field>
</record>

<record id="case_13_action_2" model="crm.action">
<field name="details">Meet in real life</field>
<field name="date" eval="time.strftime('%Y-%m-01')"/>
<field name="action_type_id" ref="meeting"/>
<field name="lead_id" ref="crm.crm_case_13"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">draft</field>
</record>
<record id="case_13_action_3" model="crm.action">
<field name="details">Organise a super demo to convince him that it is super easy and super fast</field>
<field name="date" eval="(datetime.now() + relativedelta(day=10)).strftime('%Y-%m-%d')"/>
<field name="action_type_id" ref="demo"/>
<field name="lead_id" ref="crm.crm_case_13"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">draft</field>
</record>

<record id="case_13_action_3" model="crm.action">
<field name="details">Organise a super demo to convince him that it is super easy and super fast</field>
<field name="date" eval="(datetime.now() + relativedelta(day=10)).strftime('%Y-%m-%d')"/>
<field name="action_type_id" ref="demo"/>
<field name="lead_id" ref="crm.crm_case_13"/>
<field name="user_id" ref="base.user_demo"/>
<field name="state">draft</field>
</record>


</data>
</openerp>
</odoo>
14 changes: 0 additions & 14 deletions crm_action/migrations/8.0.1.2.0/pre-migration.py

This file was deleted.

0 comments on commit fac5f1e

Please sign in to comment.