mirror of
https://github.com/bringout/oca-ocb-crm.git
synced 2026-04-18 03:12:00 +02:00
19.0 vanilla
This commit is contained in:
parent
dc68f80d3f
commit
7221b9ac46
610 changed files with 135477 additions and 161677 deletions
|
|
@ -10,7 +10,6 @@ pip install odoo-bringout-oca-ocb-crm
|
|||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- base_setup
|
||||
- sales_team
|
||||
- mail
|
||||
|
|
@ -18,37 +17,16 @@ This addon depends on:
|
|||
- resource
|
||||
- utm
|
||||
- web_tour
|
||||
- web_kanban_gauge
|
||||
- contacts
|
||||
- digest
|
||||
- phone_validation
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: CRM
|
||||
- **Version**: 1.8
|
||||
- **Category**: Sales/CRM
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: True
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `crm`.
|
||||
- Repository: https://github.com/OCA/OCB
|
||||
- Branch: 19.0
|
||||
- Path: addons/crm
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
This package preserves the original LGPL-3 license.
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ Lead Automation and Marketing Campaigns
|
|||
Drive performance by automating tasks with Odoo <a href="https://www.odoo.com/app/crm">CRM</a>.
|
||||
|
||||
Use our marketing campaigns to automate lead acquisition, follow ups and
|
||||
promotions. Define automated actions (e.g. ask a salesperson to call, send an
|
||||
promotions. Define automation rules (e.g. ask a salesperson to call, send an
|
||||
email, ...) based on triggers (no activity since 20 days, answered a
|
||||
promotional email, etc.)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,5 @@
|
|||
|
||||
from . import controllers
|
||||
from . import models
|
||||
from . import populate
|
||||
from . import report
|
||||
from . import wizard
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
{
|
||||
'name': 'CRM',
|
||||
'version': '1.8',
|
||||
'version': '1.9',
|
||||
'category': 'Sales/CRM',
|
||||
'sequence': 15,
|
||||
'summary': 'Track leads and close opportunities',
|
||||
|
|
@ -17,7 +17,6 @@
|
|||
'resource',
|
||||
'utm',
|
||||
'web_tour',
|
||||
'web_kanban_gauge',
|
||||
'contacts',
|
||||
'digest',
|
||||
'phone_validation',
|
||||
|
|
@ -36,6 +35,7 @@
|
|||
'data/ir_cron_data.xml',
|
||||
'data/mail_message_subtype_data.xml',
|
||||
'data/crm_recurring_plan_data.xml',
|
||||
'data/crm_tour.xml',
|
||||
|
||||
'wizard/crm_lead_lost_views.xml',
|
||||
'wizard/crm_lead_to_opportunity_views.xml',
|
||||
|
|
@ -50,6 +50,7 @@
|
|||
'views/crm_lead_views.xml',
|
||||
'views/crm_team_member_views.xml',
|
||||
'views/digest_views.xml',
|
||||
'views/mail_activity_plan_views.xml',
|
||||
'views/mail_activity_views.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/res_partner_views.xml',
|
||||
|
|
@ -62,34 +63,33 @@
|
|||
],
|
||||
'demo': [
|
||||
'data/crm_team_demo.xml',
|
||||
'data/crm_stage_demo.xml',
|
||||
'data/mail_template_demo.xml',
|
||||
'data/crm_team_member_demo.xml',
|
||||
'data/mail_activity_type_demo.xml',
|
||||
'data/crm_lead_demo.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
'assets': {
|
||||
'mail.assets_messaging': [
|
||||
'crm/static/src/models/*.js',
|
||||
],
|
||||
'web.assets_backend': [
|
||||
'crm/static/src/views/**/*.js',
|
||||
'crm/static/src/views/**/*.xml',
|
||||
'crm/static/src/js/tours/crm.js',
|
||||
'crm/static/src/scss/crm.scss',
|
||||
'crm/static/src/scss/crm_team_member_views.scss',
|
||||
'crm/static/src/**',
|
||||
('remove', 'crm/static/src/views/forecast_graph/**'),
|
||||
('remove', 'crm/static/src/views/forecast_pivot/**'),
|
||||
],
|
||||
'web.assets_backend_lazy': [
|
||||
'crm/static/src/views/forecast_graph/**',
|
||||
'crm/static/src/views/forecast_pivot/**',
|
||||
],
|
||||
'web.assets_tests': [
|
||||
'crm/static/tests/tours/**/*',
|
||||
],
|
||||
'web.qunit_suite_tests': [
|
||||
'crm/static/tests/crm_kanban_progress_bar_mrr_sum_field_tests.js',
|
||||
'crm/static/tests/mock_server.js',
|
||||
'crm/static/tests/forecast_kanban_tests.js',
|
||||
'crm/static/tests/forecast_view_tests.js',
|
||||
'crm/static/tests/crm_rainbowman_tests.js',
|
||||
'web.assets_unit_tests': [
|
||||
'crm/static/tests/mock_server/**/*',
|
||||
'crm/static/tests/crm_test_helpers.js',
|
||||
'crm/static/tests/**/*.test.js',
|
||||
'crm/static/tests/crm_mock_server.js'
|
||||
],
|
||||
},
|
||||
'author': 'Odoo S.A.',
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
<field name="email_from">jdunagan@leclub.example.com</field>
|
||||
<field name="body"><![CDATA[<p>Hello,<br />
|
||||
I am Jacques from Le Club SARL. I am interested in attending a training organized by your company.<br />
|
||||
Can you send me the details ?</p>]]></field>
|
||||
Can you send me the details?</p>]]></field>
|
||||
<field name="message_type">email</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
</record>
|
||||
|
|
@ -232,7 +232,7 @@ Contact: +1 813 494 5005</p>]]></field>
|
|||
<field name="author_id" eval="False"/>
|
||||
<field name="email_from">logan_expert@gmail.example.com</field>
|
||||
<field name="body"><![CDATA[<p>Hi,<br />
|
||||
Could you send me your product catalogue please ?<br />
|
||||
Could you send me your product catalogue please?<br />
|
||||
Regards,<br />
|
||||
David Logan<br />
|
||||
ESM Expert<br />]]></field>
|
||||
|
|
@ -302,8 +302,8 @@ Andrew</p>]]></field>
|
|||
<field name="type">lead</field>
|
||||
<field name="name">Estimation for Office Furnitures</field>
|
||||
<field name="contact_name">Thomas Passot</field>
|
||||
<field name="partner_name">Deco Addict</field>
|
||||
<field name="email_from">p.thomas@agrolait.com</field>
|
||||
<field name="partner_name">Acme Corporation</field>
|
||||
<field name="email_from">p.thomas@acme-example-company.com</field>
|
||||
<field name="partner_id" ref="base.res_partner_1"/>
|
||||
<field name="function">Functional Consultant</field>
|
||||
<field name="country_id" ref="base.be"/>
|
||||
|
|
@ -360,7 +360,7 @@ Andrew</p>]]></field>
|
|||
<field name="street">Kensington Road 189</field>
|
||||
<field name="tag_ids" eval="[(6, 0, [ref('sales_team.categ_oppor1')])]"/>
|
||||
<field name="priority">1</field>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(weeks=4)).strftime('%Y-%m-%d %H:%M')"/>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
|
||||
<field name="team_id" ref="sales_team.team_sales_department"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="date_open" eval="(DateTime.today() - relativedelta(weeks=3)).strftime('%Y-%m-%d %H:%M')"/>
|
||||
|
|
@ -377,14 +377,8 @@ Andrew</p>]]></field>
|
|||
<field name="color">7</field>
|
||||
<field name="expected_revenue">24000</field>
|
||||
<field name="probability">10.0</field>
|
||||
<field name="partner_name">Deco Addict</field>
|
||||
<field name="email_from">info@agrolait.com</field>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field name="country_id" ref="base.be"/>
|
||||
<field name="city">Wavre</field>
|
||||
<field name="zip">1300</field>
|
||||
<field name="street">Rue de Namur 69</field>
|
||||
<field name="phone">+32 10 588 558</field>
|
||||
<field name="tag_ids" eval="[(6, 0, [ref('sales_team.categ_oppor2')])]"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
|
||||
|
|
@ -405,10 +399,6 @@ Andrew</p>]]></field>
|
|||
<field name="probability">30.0</field>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field name="email_from">virginie@agrolait.com</field>
|
||||
<field name="country_id" ref="base.be"/>
|
||||
<field name="city">Wavre</field>
|
||||
<field name="street">Rue de Namur 69</field>
|
||||
<field name="phone">+32 10 588 558</field>
|
||||
<field name="tag_ids" eval="[(6, 0, [ref('sales_team.categ_oppor1')])]"/>
|
||||
<field name="priority">1</field>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
|
||||
|
|
@ -454,10 +444,6 @@ Andrew</p>]]></field>
|
|||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="attachment_ids" eval="[(6, 0, [ref('msg_case15_attach1')])]"/>
|
||||
</record>
|
||||
<!--Main attachment is usually registered by message_post, so here we must set it manually-->
|
||||
<record id="crm_case_15" model="crm.lead">
|
||||
<field name="message_main_attachment_id" ref="msg_case15_attach1"/>
|
||||
</record>
|
||||
<record id="msg_case15_3" model="mail.message">
|
||||
<field name="subject">Re: Plan to buy RedHat servers</field>
|
||||
<field name="model">crm.lead</field>
|
||||
|
|
@ -676,6 +662,7 @@ Andrew</p>]]></field>
|
|||
<field name="create_date" eval="datetime.now() - timedelta(days=8)"/>
|
||||
<field name="type">opportunity</field>
|
||||
<field name="name">5 VP Chairs</field>
|
||||
<field name="date_last_stage_update" eval="datetime.now() - timedelta(days=6)"/>
|
||||
<field name="expected_revenue">5600</field>
|
||||
<field name="probability">30.0</field>
|
||||
<field name="contact_name">Benjamin Flores</field>
|
||||
|
|
@ -763,13 +750,8 @@ Andrew</p>]]></field>
|
|||
<field name="name">Open Space Design</field>
|
||||
<field name="expected_revenue">11000</field>
|
||||
<field name="probability">45</field>
|
||||
<field name="partner_name">Deco Addict</field>
|
||||
<field name="email_from">info@agrolait.com</field>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field name="street">Rue de Namur 69</field>
|
||||
<field name="country_id" ref="base.be"/>
|
||||
<field name="city">Wavre</field>
|
||||
<field name="zip">1300</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="tag_ids" eval="[(6, 0, [ref('sales_team.categ_oppor2')])]"/>
|
||||
<field name="team_id" ref="sales_team.crm_team_1"/>
|
||||
|
|
@ -787,13 +769,8 @@ Andrew</p>]]></field>
|
|||
<field name="name">Interest in your products</field>
|
||||
<field name="expected_revenue">2000</field>
|
||||
<field name="probability">80</field>
|
||||
<field name="partner_name">Deco Addict</field>
|
||||
<field name="email_from">info@agrolait.com</field>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field name="country_id" ref="base.be"/>
|
||||
<field name="city">Wavre</field>
|
||||
<field name="zip">1300</field>
|
||||
<field name="street">Rue de Namur 69</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="tag_ids" eval="[(6, 0, [ref('sales_team.categ_oppor2')])]"/>
|
||||
<field name="date_deadline" eval="DateTime.today().strftime('%Y-%m-%d %H:%M')"/>
|
||||
|
|
@ -811,13 +788,8 @@ Andrew</p>]]></field>
|
|||
<field name="name">Furnish a 60m² office</field>
|
||||
<field name="expected_revenue">7500</field>
|
||||
<field name="probability">20</field>
|
||||
<field name="partner_name">Deco Addict</field>
|
||||
<field name="email_from">info@agrolait.com</field>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field name="country_id" ref="base.be"/>
|
||||
<field name="city">Wavre</field>
|
||||
<field name="zip">1300</field>
|
||||
<field name="street">Rue de Namur 69</field>
|
||||
<field name="priority">0</field>
|
||||
<field name="tag_ids" eval="[(6, 0, [ref('sales_team.categ_oppor1'), ref('sales_team.categ_oppor5')])]"/>
|
||||
<field name="date_deadline" eval="DateTime.today() + relativedelta(days=12)"/>
|
||||
|
|
@ -877,14 +849,12 @@ Andrew</p>]]></field>
|
|||
<record id="crm_case_31" model="crm.lead">
|
||||
<field name="create_date" eval="datetime.now() - relativedelta(months=1)"/>
|
||||
<field name="type">opportunity</field>
|
||||
<field name="name">Quote for 150 carpets</field>
|
||||
<field name="name">Devis pour 150 tapis</field>
|
||||
<field name="partner_id" ref="base.res_partner_5"/>
|
||||
<field name="expected_revenue">40000</field>
|
||||
<field name="probability">10.0</field>
|
||||
<field name="contact_name">Erik N. French</field>
|
||||
<field name="email_from">ErikNFrench@armyspy.com</field>
|
||||
<field name="country_id" ref="base.au"/>
|
||||
<field name="city">Chevy Chase</field>
|
||||
<field name="street">1920 Del Dew Drive</field>
|
||||
<field name="tag_ids" eval="[(6, 0, [ref('sales_team.categ_oppor1')])]"/>
|
||||
<field name="priority">1</field>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
|
||||
|
|
@ -896,6 +866,39 @@ Andrew</p>]]></field>
|
|||
<field name="source_id" ref="utm.utm_source_search_engine"/>
|
||||
</record>
|
||||
|
||||
<record id="msg_case31_1" model="mail.message">
|
||||
<field name="author_id" ref="base.res_partner_5"/>
|
||||
<field name="body" type="html"><p>Bonjour,</p>
|
||||
<p>J'ai eu le plaisir de découvrir votre catalogue et je dois dire que vos produits m'ont vraiment impressionné.</p>
|
||||
<p>Pourriez-vous me fournir un devis pour une commande de 150 tapis de différentes couleurs?</p>
|
||||
<p>Merci de m'envoyer cela avant la fin de la semaine car nous sommes en phase finale de nos travaux de rénovation
|
||||
et prévoyons d'emménager dans nos nouveaux locaux dans 15 jours.</p>
|
||||
<p>Je vous remercie par avance pour votre réactivité et vous souhaite une agréable fin de journée.</p>
|
||||
<p>Cordialement,</p></field>
|
||||
<field name="incoming_email_cc">openwood.cc@example.com</field>
|
||||
<field name="incoming_email_to">openwood.to@exampel.com</field>
|
||||
<field name="partner_ids" eval="[(4, ref('base.res_partner_4'))]"/>
|
||||
<field name="message_type">email</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="res_id" ref="crm_case_31"/>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
</record>
|
||||
|
||||
<record id="msg_case31_2" model="mail.message">
|
||||
<field name="author_id" eval="False"/>
|
||||
<field name="body" type="html"><p>Bonjour,</p>
|
||||
<p>Petite précision par rapport au précédent message: il s'agit bien des tapis Jama.</p>
|
||||
<p>Cordialement,</p></field>
|
||||
<field name="email_from">openwood.josianne@example.com</field>
|
||||
<field name="incoming_email_cc">openwood.cc@example.com</field>
|
||||
<field name="incoming_email_to">openwood.to@exampel.com</field>
|
||||
<field name="partner_ids" eval="[(4, ref('base.res_partner_4'))]"/>
|
||||
<field name="message_type">email</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="res_id" ref="crm_case_31"/>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_32" model="crm.lead">
|
||||
<field name="create_date" eval="datetime.now() - relativedelta(months=2)"/>
|
||||
<field name="type">opportunity</field>
|
||||
|
|
@ -1260,18 +1263,21 @@ Andrew</p>]]></field>
|
|||
<field name="res_model_id" ref="crm.model_crm_lead"/>
|
||||
<field name="activity_type_id" ref="mail.mail_activity_data_call"/>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(days=1)).strftime('%Y-%m-%d %H:%M')" />
|
||||
<field name="summary">Call to renew service contract</field>
|
||||
</record>
|
||||
<record id="activity_9" model="mail.activity">
|
||||
<field name="res_id" ref="crm.crm_case_21" />
|
||||
<field name="res_model_id" ref="crm.model_crm_lead"/>
|
||||
<field name="activity_type_id" ref="mail.mail_activity_data_call"/>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(days=4)).strftime('%Y-%m-%d %H:%M')" />
|
||||
<field name="summary">Discuss project progress by phone</field>
|
||||
</record>
|
||||
<record id="activity_10" model="mail.activity">
|
||||
<field name="res_id" ref="crm.crm_case_22" />
|
||||
<field name="res_model_id" ref="crm.model_crm_lead"/>
|
||||
<field name="activity_type_id" ref="mail.mail_activity_data_email"/>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(days=-2)).strftime('%Y-%m-%d %H:%M')" />
|
||||
<field name="summary">Email invoice to customer</field>
|
||||
<field name="create_uid" ref="base.user_admin"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
|
@ -1280,6 +1286,7 @@ Andrew</p>]]></field>
|
|||
<field name="res_model_id" ref="crm.model_crm_lead"/>
|
||||
<field name="activity_type_id" ref="mail.mail_activity_data_email"/>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(days=1)).strftime('%Y-%m-%d %H:%M')" />
|
||||
<field name="summary">Send welcome email to customer</field>
|
||||
<field name="create_uid" ref="base.user_admin"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
|
@ -1288,6 +1295,7 @@ Andrew</p>]]></field>
|
|||
<field name="res_model_id" ref="crm.model_crm_lead"/>
|
||||
<field name="activity_type_id" ref="mail.mail_activity_data_email"/>
|
||||
<field name="date_deadline" eval="(DateTime.today() + relativedelta(days=2)).strftime('%Y-%m-%d %H:%M')" />
|
||||
<field name="summary">Confirm order by email</field>
|
||||
<field name="create_uid" ref="base.user_admin"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@
|
|||
<div>
|
||||
Created on: <span t-field="lead.create_date"/>
|
||||
</div>
|
||||
<div t-if="lead.date_action_last">
|
||||
Last Action: <span t-field="lead.date_action_last"/>
|
||||
<div t-if="lead.date_automation_last">
|
||||
Last Automation: <span t-field="lead.date_automation_last"/>
|
||||
</div>
|
||||
<div t-if="lead.date_deadline">
|
||||
Expected Closing: <span t-field="lead.date_deadline"/>
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
Tags:
|
||||
<div class="ms-2 d-flex flex-row">
|
||||
<div t-foreach="lead.tag_ids" t-as="tag" t-esc="tag.name"
|
||||
t-attf-class="badge rounded-pill o_tag_color_#{tag.color} d-inline-block"/>
|
||||
t-attf-class="badge rounded-pill o_tag o_tag_color_#{tag.color} d-inline-block"/>
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="lead.user_id" class="mt-3">
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<div class="mt-3"
|
||||
t-if="lead.contact_name or lead.partner_name or lead.phone or lead.mobile or lead.email_from or lead.website">
|
||||
t-if="lead.contact_name or lead.partner_name or lead.phone or lead.email_from or lead.website">
|
||||
<div class="fw-bold">
|
||||
Contact Details:
|
||||
</div>
|
||||
|
|
@ -95,9 +95,6 @@
|
|||
<div t-if="lead.phone">
|
||||
Phone: <span t-field="lead.phone"/>
|
||||
</div>
|
||||
<div t-if="lead.mobile">
|
||||
Mobile: <span t-field="lead.mobile"/>
|
||||
</div>
|
||||
<div t-if="lead.email_from">
|
||||
Email: <span t-field="lead.email_from"/>
|
||||
</div>
|
||||
|
|
@ -168,7 +165,7 @@
|
|||
<div t-if="'values' in property"
|
||||
class="ms-2 d-flex flex-row"> <!-- Tags -->
|
||||
<div t-foreach="property['values']" t-as="tag" t-esc="tag['name']"
|
||||
t-attf-class="badge rounded-pill o_tag_color_#{tag.get('color', 0)} d-inline-block me-2"/>
|
||||
t-attf-class="badge rounded-pill o_tag o_tag_color_#{tag.get('color', 0)} d-inline-block me-2"/>
|
||||
</div>
|
||||
<div t-else="" class="ms-2" t-esc="property['value']"/>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
</record>
|
||||
<record id="crm_pls_fields_param" model="ir.config_parameter">
|
||||
<field name="key">crm.pls_fields</field>
|
||||
<field name="value" eval="'phone_state,email_state'"/>
|
||||
<field name="value">phone_state,email_state,state_id,country_id,source_id,lang_id,tag_ids</field>
|
||||
</record>
|
||||
<record id="crm_pls_start_date_param" model="ir.config_parameter">
|
||||
<field name="key">crm.pls_start_date</field>
|
||||
|
|
@ -40,8 +40,6 @@
|
|||
<field name="code">model._cron_update_automated_probabilities()</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
<record model="crm.stage" id="stage_lead1">
|
||||
<record model="crm.stage" id="stage_lead1" forcecreate="False">
|
||||
<field name="name">New</field>
|
||||
<field name="sequence">1</field>
|
||||
<field name="color">11</field>
|
||||
</record>
|
||||
<record model="crm.stage" id="stage_lead2">
|
||||
<record model="crm.stage" id="stage_lead2" forcecreate="False">
|
||||
<field name="name">Qualified</field>
|
||||
<field name="sequence">2</field>
|
||||
<field name="color">5</field>
|
||||
</record>
|
||||
<record model="crm.stage" id="stage_lead3">
|
||||
<record model="crm.stage" id="stage_lead3" forcecreate="False">
|
||||
<field name="name">Proposition</field>
|
||||
<field name="sequence">3</field>
|
||||
<field name="color">8</field>
|
||||
</record>
|
||||
<record model="crm.stage" id="stage_lead4">
|
||||
<record model="crm.stage" id="stage_lead4" forcecreate="False">
|
||||
<field name="name">Won</field>
|
||||
<field name="fold" eval="False"/>
|
||||
<field name="is_won">True</field>
|
||||
<field name="sequence">70</field>
|
||||
<field name="color">10</field>
|
||||
</record>
|
||||
</odoo>
|
||||
7
odoo-bringout-oca-ocb-crm/crm/data/crm_stage_demo.xml
Normal file
7
odoo-bringout-oca-ocb-crm/crm/data/crm_stage_demo.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record id="stage_lead3" model="crm.stage">
|
||||
<field name="rotting_threshold_days">5</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
<odoo><data noupdate="1">
|
||||
<record id="sales_team.team_sales_department" model="crm.team" forcecreate="False">
|
||||
<field name="alias_name">info</field>
|
||||
<field name="alias_user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
<record id="sales_team.salesteam_website_sales" model="crm.team" forcecreate="False">
|
||||
|
|
@ -13,7 +12,4 @@
|
|||
<field name="use_opportunities" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="sales_team.ebay_sales_team" model="crm.team" forcecreate="False">
|
||||
<field name="use_opportunities" eval="False"/>
|
||||
</record>
|
||||
</data></odoo>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record id="sales_team.team_sales_department" model="crm.team" forcecreate="False">
|
||||
<field name="assignment_domain">[['probability', '>=', '20']]</field>
|
||||
<field name="assignment_domain">[['probability', '>=', 20]]</field>
|
||||
</record>
|
||||
|
||||
<record id="sales_team.crm_team_1" model="crm.team">
|
||||
|
|
|
|||
8
odoo-bringout-oca-ocb-crm/crm/data/crm_tour.xml
Normal file
8
odoo-bringout-oca-ocb-crm/crm/data/crm_tour.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="crm_tour" model="web_tour.tour">
|
||||
<field name="name">crm_tour</field>
|
||||
<field name="sequence">10</field>
|
||||
<field name="rainbow_man_message">Congrats, best of luck catching such big fish! :)</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -16,9 +16,9 @@
|
|||
<div>
|
||||
<t t-set="record" t-value="object.env['crm.team'].search([('alias_name', '!=', 'False')], limit=1)" />
|
||||
<p class="tip_title">Tip: Convert incoming emails into opportunities</p>
|
||||
<t t-if="record and record.alias_domain">
|
||||
<p class="tip_content">Did you know emails sent to <t t-out="record.alias_id.display_name or ''"></t> generate opportunities in your pipeline?<br/>
|
||||
<a t-attf-href="mailto:{{record.alias_id.display_name}}" target="_blank">Try sending an email</a> to your CRM. This email address is configurable by sales team members.</p>
|
||||
<t t-if="record.alias_email">
|
||||
<p class="tip_content">Did you know emails sent to <t t-out="record.alias_email"></t> generate opportunities in your pipeline?<br/>
|
||||
<a t-attf-href="mailto:{{record.alias_email}}" target="_blank">Try sending an email</a> to your CRM. This email address is configurable by sales team members.</p>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<p class="tip_content">Did you know emails sent to a Sales Team alias generate opportunities in your pipeline?</p>
|
||||
|
|
@ -33,8 +33,8 @@
|
|||
<field name="tip_description" type="html">
|
||||
<div>
|
||||
<p class="tip_title">Tip: Did you know Odoo has built-in lead mining?</p>
|
||||
<p class="tip_content">For a sales team, there is nothing worse than being dry on leads. Fortunately, in just a few clicks, you can generate leads specifically targeted to your needs: company size, industry, etc. To help you test the feature, we offer you 200 credits for free.</p>
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/generate-leads.gif" class="illustration_border" />
|
||||
<p class="tip_content">For a sales team, there is nothing worse than being dry on leads. Fortunately, in just a few clicks, you can generate leads specifically targeted to your needs: company size, industry, etc. To help you test the feature, we offer you 20 credits for free.</p>
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/milk-generate-leads.gif" width="540" class="illustration_border" />
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
<div>
|
||||
<p class="tip_title">Tip: Opportunity win rate is predicted with AI</p>
|
||||
<p class="tip_content">Odoo's artificial intelligence engine predicts the success rate of each opportunity based on your history. You can always update the success rate manually, but if you let Odoo do the job the score is updated while the opportunity moves forward in your sales cycle.</p>
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/probability-rate.gif" class="illustration_border" />
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/milk-probability-rate.gif" width="540" class="illustration_border" />
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
<div>
|
||||
<p class="tip_title">Tip: Manage your pipeline</p>
|
||||
<p class="tip_content">A great tip to boost sales efficiency is to always define a next step on each opportunity. To manage ongoing activities, click on any status of the progress bar to filter opportunities based on their next activities' status. Click on the grey area of the progress bar to see all opportunities that have no next activity.</p>
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/pipeline-progress.gif" class="illustration_border" />
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/milk-pipeline-progress.gif" width="540" class="illustration_border" />
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
<div>
|
||||
<p class="tip_title">Tip: Do not waste time recording customers' data</p>
|
||||
<p class="tip_content">Did you know you can search a company by name or VAT number to instantly fill in all its data? Odoo autocompletes everything for you: logo, address, company size, business information, social media accounts, etc.</p>
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/autofill.gif" class="illustration_border" />
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/milk-autofill.gif" width="540" class="illustration_border" />
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -82,7 +82,31 @@
|
|||
<div>
|
||||
<p class="tip_title">Tip: Turn a selection of opportunities into a map</p>
|
||||
<p class="tip_content">Did you know you can turn a list of opportunities into a map view, using the top-right map icon? A lot of screens in Odoo can be turned into a map: tasks, contacts, delivery orders, etc.</p>
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/mapview-toggle.gif" class="illustration_border" />
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/milk-mapview-toggle.gif" width="540" class="illustration_border" />
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
<record id="digest_tip_crm_6" model="digest.tip">
|
||||
<field name="name">Tip: Identify Bottlenecks at a glance</field>
|
||||
<field name="sequence">3600</field>
|
||||
<field name="group_id" ref="sales_team.group_sale_salesman"/>
|
||||
<field name="tip_description" type="html">
|
||||
<div>
|
||||
<p class="tip_title">Tip: Identify Bottlenecks at a glance</p>
|
||||
<p class="tip_content">Check the Stage Tracker of Leads to identify bottlenecks in your Sales process.</p>
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/18-lead-stage-bottleneck.png" width="540" class="illustration_border"/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
<record id="digest_tip_crm_7" model="digest.tip">
|
||||
<field name="name">Tip: Turn Sales Forecasting into Child's Play</field>
|
||||
<field name="sequence">4400</field>
|
||||
<field name="group_id" ref="sales_team.group_sale_salesman"/>
|
||||
<field name="tip_description" type="html">
|
||||
<div>
|
||||
<p class="tip_title">Tip: Turn Sales Forecasting into Child's Play</p>
|
||||
<p class="tip_content">Use the CRM Forecast Kanban to easily define when Opportunities are expected to be won.</p>
|
||||
<img src="https://download.odoocdn.com/digests/crm/static/src/img/18-opportunity-forecast.gif" width="540" class="illustration_border"/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -4,27 +4,12 @@
|
|||
<!--
|
||||
'Mark as Lost' in action dropdown
|
||||
-->
|
||||
<record id="action_mark_as_lost" model="ir.actions.server">
|
||||
<field name="name">Mark as lost</field>
|
||||
<field name="model_id" ref="model_crm_lead"/>
|
||||
<field name="binding_model_id" ref="crm.model_crm_lead"/>
|
||||
<field name="binding_view_types">list</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if not 'opportunity' in records.mapped('type'):
|
||||
records.action_set_lost()
|
||||
elif records:
|
||||
action_values = env.ref('crm.crm_lead_lost_action').sudo().read()[0]
|
||||
action_values.update({'context': env.context})
|
||||
action = action_values
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_your_pipeline" model="ir.actions.server">
|
||||
<field name="name">Crm: My Pipeline</field>
|
||||
<field name="path">crm</field>
|
||||
<field name="model_id" ref="crm.model_crm_team"/>
|
||||
<field name="state">code</field>
|
||||
<field name="groups_id" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="group_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="code">action = model.action_your_pipeline()</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -32,7 +17,7 @@ elif records:
|
|||
<field name="name">Crm: Forecast</field>
|
||||
<field name="model_id" ref="crm.model_crm_team"/>
|
||||
<field name="state">code</field>
|
||||
<field name="groups_id" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="group_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="code">action = model.action_opportunity_forecast()</field>
|
||||
</record>
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,5 @@
|
|||
<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>
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
</data></odoo>
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<record id="mail_activity_demo_followup_quote" model="mail.activity.type">
|
||||
<field name="name">Follow-up Quote</field>
|
||||
<field name="icon">fa-file-text-o</field>
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="delay_count">30</field>
|
||||
</record>
|
||||
<record id="mail_activity_demo_make_quote" model="mail.activity.type">
|
||||
<field name="name">Make Quote</field>
|
||||
<field name="icon">fa-file-text-o</field>
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="delay_count">15</field>
|
||||
</record>
|
||||
|
||||
<record id="mail_activity_demo_call_demo" model="mail.activity.type">
|
||||
<field name="name">Call for Demo</field>
|
||||
<field name="icon">fa-phone</field>
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="delay_count">10</field>
|
||||
<field name="category">phonecall</field>
|
||||
</record>
|
||||
|
||||
<record id="mail_activity_type_demo_email_with_template" model="mail.activity.type">
|
||||
<field name="name">Email: Welcome Demo</field>
|
||||
<field name="icon">fa-envelope</field>
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="mail_template_ids" eval="[(4, ref('crm.mail_template_demo_crm_lead'))]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -4,8 +4,9 @@
|
|||
<record id="mail_template_demo_crm_lead" model="mail.template">
|
||||
<field name="name">Welcome Demo</field>
|
||||
<field name="model_id" ref="crm.model_crm_lead"/>
|
||||
<field name="partner_to">{{ object.partner_id != False and object.partner_id.id }}</field>
|
||||
<field name="email_to">{{ (not object.partner_id and object.email_from) }}</field>
|
||||
<field name="partner_to" eval="False"/>
|
||||
<field name="email_to" eval="False"/>
|
||||
<field name="use_default_to" eval="True"/>
|
||||
<field name="body_html" type="html">
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; color: #454748; width: 100%; border-collapse:separate;"><tr><td align="center">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="590" style="padding: 24px; background-color: white; color: #454748; border-collapse:separate;">
|
||||
|
|
@ -33,7 +34,7 @@
|
|||
<tr>
|
||||
<td valign="top" style="font-size: 13px;">
|
||||
<div>
|
||||
Hi <t t-out="object.partner_id and object.partner_id.name or ''">Deco Addict</t>,<br/><br/>
|
||||
Hi <t t-out="object.partner_id and object.partner_id.name or ''">Acme Corporation</t>,<br/><br/>
|
||||
Welcome to <t t-out="object.company_id.name or ''">My Company (San Francisco)</t>.
|
||||
It's great to meet you! Now that you're on board, you'll discover what <t t-out="object.company_id.name or ''">My Company (San Francisco)</t> has to offer. My name is <t t-out="object.user_id.name or ''">Marc Demo</t> and I'll help you get the most out of Odoo. Could we plan a quick demo soon?<br/>
|
||||
Feel free to reach out at any time!<br/><br/>
|
||||
|
|
@ -73,11 +74,10 @@
|
|||
</td></tr>
|
||||
<!-- POWERED BY -->
|
||||
<tr><td align="center" style="min-width: 590px;">
|
||||
Powered by <a target="_blank" href="https://www.odoo.com?utm_source=db&utm_medium=email" style="color: #875A7B;">Odoo</a>
|
||||
Powered by <a target="_blank" href="https://www.odoo.com?utm_source=db&utm_medium=email" t-attf-style="color: {{object.company_id.email_secondary_color or '#875A7B'}};;">Odoo</a>
|
||||
</td></tr>
|
||||
</table>
|
||||
</field>
|
||||
<field name="lang">{{ object.partner_id.lang }}</field>
|
||||
<field name="auto_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import res_users
|
||||
from . import calendar
|
||||
from . import crm_lead
|
||||
from . import crm_lost_reason
|
||||
|
|
@ -16,3 +15,4 @@ from . import crm_lead_scoring_frequency
|
|||
from . import utm
|
||||
from . import crm_recurring_plan
|
||||
from . import mail_activity
|
||||
from . import res_users
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@ class CalendarEvent(models.Model):
|
|||
event.is_highlighted = True
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals):
|
||||
events = super(CalendarEvent, self).create(vals)
|
||||
def create(self, vals_list):
|
||||
events = super().create(vals_list)
|
||||
for event in events:
|
||||
if event.opportunity_id and not event.activity_ids:
|
||||
event.opportunity_id.log_meeting(event.name, event.start, event.duration)
|
||||
event.opportunity_id.log_meeting(event)
|
||||
return events
|
||||
|
||||
def _is_crm_lead(self, defaults, ctx=None):
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from random import randint
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class LeadScoringFrequency(models.Model):
|
||||
class CrmLeadScoringFrequency(models.Model):
|
||||
_name = 'crm.lead.scoring.frequency'
|
||||
_description = 'Lead Scoring Frequency'
|
||||
|
||||
|
|
@ -12,12 +14,17 @@ class LeadScoringFrequency(models.Model):
|
|||
lost_count = fields.Float('Lost Count', digits=(16, 1)) # Float because we add 0.1 to avoid zero Frequency issue
|
||||
team_id = fields.Many2one('crm.team', 'Sales Team', ondelete="cascade")
|
||||
|
||||
class FrequencyField(models.Model):
|
||||
|
||||
class CrmLeadScoringFrequencyField(models.Model):
|
||||
_name = 'crm.lead.scoring.frequency.field'
|
||||
_description = 'Fields that can be used for predictive lead scoring computation'
|
||||
|
||||
def _get_default_color(self):
|
||||
return randint(1, 11)
|
||||
|
||||
name = fields.Char(related="field_id.field_description")
|
||||
field_id = fields.Many2one(
|
||||
'ir.model.fields', domain=[('model_id.model', '=', 'crm.lead')], required=True,
|
||||
ondelete='cascade',
|
||||
)
|
||||
color = fields.Integer('Color', default=_get_default_color)
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
from odoo import fields, models, _
|
||||
|
||||
|
||||
class LostReason(models.Model):
|
||||
_name = "crm.lost.reason"
|
||||
class CrmLostReason(models.Model):
|
||||
_name = 'crm.lost.reason'
|
||||
_description = 'Opp. Lost Reason'
|
||||
|
||||
name = fields.Char('Description', required=True, translate=True)
|
||||
|
|
@ -16,16 +16,16 @@ class LostReason(models.Model):
|
|||
lead_data = self.env['crm.lead'].with_context(active_test=False)._read_group(
|
||||
[('lost_reason_id', 'in', self.ids)],
|
||||
['lost_reason_id'],
|
||||
['lost_reason_id']
|
||||
['__count'],
|
||||
)
|
||||
mapped_data = dict((data['lost_reason_id'][0], data['lost_reason_id_count']) for data in lead_data)
|
||||
mapped_data = {lost_reason.id: count for lost_reason, count in lead_data}
|
||||
for reason in self:
|
||||
reason.leads_count = mapped_data.get(reason.id, 0)
|
||||
|
||||
def action_lost_leads(self):
|
||||
return {
|
||||
'name': _('Leads'),
|
||||
'view_mode': 'tree,form',
|
||||
'view_mode': 'list,form',
|
||||
'domain': [('lost_reason_id', 'in', self.ids)],
|
||||
'res_model': 'crm.lead',
|
||||
'type': 'ir.actions.act_window',
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue