Commit Graph
105 Commits
Author SHA1 Message Date
Florent Lejoly 4aa1749699 [IMP] crm: improve stage messages, some strings and fix some typos
As part of the back2basics, the stage messages were modified to be clearer

* when an opportunity is lost previously 2 separated messages where
created in the chatter (one for the reason, one for the active state)
now, one message is created with both infos;
* new message when an opportunity is restored;

There where also some fixes to typos, and an the probability of a lead
to be successful received a new title "estimated by Odoo".

Task 2026297

closes odoo/odoo#35308

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-22 09:17:42 +00:00
David Beguin 3977e28baf [MOV-IMP] crm : move crm.lead.lang_id from enterprise to community
Since introduction of website_visitor,
we don't need to identifiy the lead with a lead_id cookie.
The visitor is identified and if a lead is created with the
contact form, the lead is created and linked to the visitor.

To avoid losing data, each time a visitor send a contact form,
it creates a new lead. All those leads are linked between them
via the website_visitor.

As the website_visitor already has the lang set on itself,
there is no reason to keep the lang_id of crm_lead at enterprise
side. So that lang_id on crm.lead has been moved to community.

This commit is directly linked to another one in enterprise
See https://github.com/odoo/enterprise/pull/4834 to get more details.

Task ID : 2028059
PR #34624
2019-08-19 06:34:20 +00:00
qmo-odoo 0d2be38333 [IMP] crm,sale,*: Improve UX
This commit improves the ux in CRM by changing a few things:
  - Restore the use_leads and use_quotations fields
    along with their features as they were in 12.0.
  - Hide the email alias if use_upportunities and use_leads
    are unchecked.
  - Show a link to the general settings instead of the alias_domain
    if no alias_domain has been configured.
  - fixes the "unassigned lead(s)" link so that
    it redirects the user to the actually unassigned leads

Task: #1962182
PR: #32372
2019-07-30 11:46:30 +00:00
David Beguin e20cc70d08 [IMP] crm : add and apply Predictive Lead Scoring
This new Predictive Lead Scoring (aka PLS) replaces the stage based probability mechanism.
It uses Naive Bayes probability computation theorem.

The lead probability is now computated automatically based on multiple criteria (= frequency fields).
Some are mandatory and will always be used, some are optional and can be activated
in the settings.
- Mandatory fields :
    - team_id
    - stage_id
    - tag_ids

- Optional fields :
    - email_state (validity of the email_from field: correct / incorrect or empty if email_from is empty)
    - phone_state (validity of the phone field !! not the mobile one !!: correct / incorrect or empty if phone is empty)
    - country_id
    - state_id
    - source_id (UTM Source)

PLS uses a start date to consider only the lead created after that date to generate the frequency table
and to recompute the lead probability. This date is also configurable in the CRM settings.
Default start date is date.todays() (at module install).

The settings for PLS are NOT company related :
PLS Fields = Many2many to a model that store only the fields allowed for PLS computation.
PLS Start Date = Date
As Date and Many2many fields are not allowed for config_parameters,
Char fields are used to store the configuration
and Date and m2m fields are used to ease the configuration by the user in the config panel.
Date and m2m fields are both computed fields based on their corresponding Char fields.
Char field for Date store a strigified date.
char field for Many2many store a comma separated string which is a list of activated fields.

Each mandatory field is used in a specific way
- Team_id : the frequency table is split for every team_id, plus once for leads that don't have a team_id.
Considering Lead A from Team 1 and Lead B from Team 2.
Even if Lead A and Lead B have the exact same attributes (country, phone, email,stage, ...),
their probability will most likely not be the same.
That's because each teams compute their leads' probability based on their own won/lost leads.

- Stage_id : if no optional fields are activated and if there is no tag on the lead,
this will make PLS work quite the same way as it was working with removed stage based probability,
as only the stage will count in the computation.
But here, instead of fixing manually the probability for each stage,
this stage related probability is automatically computed based on past experience (won and lost leads).

- Tag_ids : each tag is considered separatelly, as if the lead had only one tag.
(no link between tag on same lead is made). To avoid that a tag take to much importance if his subset is too
small, we include the tag frequencies in the frequency table only if at least 50 won or lost leads had this tag.

The frequency table is a table where all won and lost leads are aggregated by fields
(mandatory or optional if activated). For each team_id / field couple, we store the number of
won and lost leads that has that fields values.
For example: Lead A is assigned to team 1 and client comes from France and has been won.
If we consider only this lead A, the frequency table will looks like :
   id   |  variable   | value | won_count | lost_count | team_id
--------+-------------+-------+-----------+------------+---------
    1     country_id     FR         1           0            1

To computed the probability of a lead, we get all the records for the frequency table
that match all fields (per team_id) and we compute a won score and a lost score.
The probability is computed and normalized based on those scores
- P = S(Won) / (S(Won) + S(Lost))

Considering two variables A and B :
- S(Won) ∝ P(A∩B | Won)*P(Won) = P(A|Won) * P(B|Won) * P(Won)
- S(Lost) ∝ P(A∩B | Lost)*P(Lost) = P(A|Lost) * P(B|Lost) * P(Lost)

To overcome the 'zero frequency problem',
we do not start at 0 for the won or lost count for each variable / value combination.
It suggested to start at 1, but to avoid that a small subset take to much weight compared to
a larger one, we start at 0.1.

For example :
If we start at 1 : If team 1 has few records from France,
it can get high probability to win even if every lead where lost.

  variable   | value | won_count | lost_count | team_id | Probability
-------------+-------+-----------+------------+---------+-------------
 country_id     FR         1           7            1         0.125
 country_id     FR        198         7306          2         0.0263

If we start at 0.1 :

  variable   | value | won_count | lost_count | team_id | Probability
-------------+-------+-----------+------------+---------+-------------
 country_id     FR         0.1         6.1          1         0.0161
 country_id     FR        197.1       7305.1        2         0.0263

The more we have records for each couple, the more the computation become precise.

The allow the user to decide himself which probability should be set on the lead,
a manual probabiltiy system has been implemented using 2 stored fields + 1 computed field :
- probability (stored): Probability set on the lead, can be set manually in the lead form.
- automated_probability (stored): Probability computed by PLS.
- is_automated_probability (computed): If both previous fields are equal, the probability is considered
as automatic. and each time the automated_probability is updated, the probability is aligned.
If both are not equal, the probability is considered as manual. The automated_probability is still
updated but the probability is not aligned. The user can reset the probability in automatic mode
by clicking on the estimated probability displayed in edit mode in the lead form.

probability and automated_probability are not computed fields as they are manually computed at write and create.
The computation is triggered if one of the activated frequency fields is modified or set.
To trigger also the computation when modifying the lead values on the lead views (form and kanban),
_onchange methods have been added for each frequency field.

Also, a cron has been added to run every day to rebuild the frequency table and to recompute all active
and pending leads (not won nor lost) probability.

Task ID : 1925439
PR #33589

remove rerun cron on action lost and won
2019-06-11 07:04:33 +00:00
David Beguin 8e540558ee [IMP-REM] crm, * : remove stage based probability and add won_stage bool field on crm.stage
This commit prepares the next Predictive Lead Scoring (aka PLS) ones.
With the new PLS implementation, stage based probablility is not relevant anymore
as the probability will be computed based on multiple criteria
following the Naive Bayes probabilist theorem.
To determine if the stage is a won stage, a new 'won_stage' boolean field replaces
the old probability field that is now removed.
won_stage = True is equivalent to stage.probability = 100.

Task ID : 1925439
PR #33589
2019-06-11 07:04:33 +00:00
Thanh Dodeur c212cfe899 [REF] *: removes datas_fname from ir.attachment
This commit removes the field `datas_fname` from `ir.attachment` as
it was unnecessary and most of the time the duplicate of `name` or
`url`.

Task #1909865

closes odoo/odoo#32976

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-05 09:12:13 +00:00
Christophe Simonis 8dd5a85267 [MERGE] forward port branch saas-12.3 up to 60e71302a3 2019-05-13 15:26:12 +02:00
Christophe Simonis a97037c6d4 [MERGE] forward port branch saas-12.2 up to 78b3b650b0 2019-05-06 12:27:51 +02:00
Denis Ledoux fd0a10026c [MERGE] forward port branch saas-12.1 up to b11930047f 2019-05-02 09:45:14 +02:00
Christophe Simonis 15b8d353c7 [MERGE] forward port branch 12.0 up to 2830b93a3a 2019-04-17 19:47:37 +02:00
Julien Castiaux c42551b5d2 [FIX] crm, sale: safe override of sales team
The user can delete teams created during the installation of the Sale
Team module, both CRM and Sale modify those teams but the way they
modify the teams doesn't take their deletion into account.

This reverts commit 30a848bffb to replace
post_init_hooks by `forcecreate=False` in the datas.

closes odoo/odoo#32742

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-16 15:10:45 +00:00
Julien Castiaux 30a848bffb [FIX] crm, sale: safe override of sales team
The user can delete teams created during the installation of the Sale
Team module, both CRM and Sale modify those teams but the way they
modify the teams doesn't take their deletion into account.

opw-1962297

closes odoo/odoo#32412

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-08 13:42:52 +00:00
Raphael Collet d87443a213 [FIX] convert: enable kwargs in tag <function>
closes odoo/odoo#31417

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-03-22 16:42:14 +00:00
Jeremy Kersten 199adbd0e1 [IMP] crm: revert renaming of subtype
Seems better to have wrong term for lead an correct for opportunity
that have not wrong for Lead an not wrong for Opportunity.

task-1932070 related to b6f4d97

closes odoo/odoo#30482
2019-01-23 13:59:00 +00:00
Jeremy Kersten b1f8d4fb6c [FIX] crm: track type on crm.lead
Until now, you cannot find easily if it is a lead or an opportunity that
 has been created.

"Opportunity created" is written in the log but it is in reality a Lead.

Now we track the change on the field type to know what was the type at the
creation AND when it has been converted to opportunity.

task:common-sense-in-real-life
2019-01-23 12:01:58 +00:00
qmo-odoo 1da63f0ab0 [IMP] salesteam: Simplify sales team config and improved team dashboard
Reason:
  *Sales team configuration is too complex with fields you
   don't understand and that bring no added value
  *Remove the team type, every team should be able to handle
   a POS or a website for example
Contains:
  *Removal of the team_type, use_quotations, use_leads fields
  *Removal of the graph configuration fields
  *Adapting the filters that were based on the team_type
  *Clear distinction between the team dashboard behavior in crm
   from the one in sales
  *Cleansing of now dead code due to the removal of the previously
   mentionned fields

Task: #1830105
Enterprise PR: #3006
Closes: #28063
2018-12-05 15:32:53 +00:00
Geoffroy Larue 87ab98832e [IMP] crm: usability improvements
Purpose : Various relabelling and design improvements in crm:
- opportunity, lost reason, lead, team, tag forms
- hide "convert to opportunity" button for inactive/lost
leads (actually nothing happened when clicked anyway)
- Checkbox in crm.team to hide all alias related fields
- New many2one field appearing in crm.team form to select the user to
whom lead created by alias will be assigned.
- Set the admin as leader of the initial crm.team

closes odoo/odoo#28851
2018-12-03 14:12:43 +00:00
Christophe Simonis cf52a04979 [MERGE] forward port branch saas-12.1 up to d3b8422c9c
closes odoo/odoo#30614
2019-01-28 13:58:11 +00:00
Thibault Delavallée abc212f59a [REF] mail: remove create_user_id field on activity
As activities are created using the current user there is no need anymore to
have another field to store the activity creator. We can therefore remove
create_user_id and replace its use by the magic create_uid field.

This commit is linked to task ID 1856417 and PR #27619.
2018-12-12 12:45:24 +00:00
Thibault Delavallée 678e04c19d [FIX][IMP] various: improve lang computation in mail templates
Purpose: add lang definition on templates where it is missing

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
Nicolas Martinelli c15551a3f2 [FIX] crm: default CRM team
Keep the default value for the default CRM team (False) since leads are
not activated by default.

opw-1929489

closes odoo/odoo#30360
2019-01-18 14:08:22 +00:00
Mathieu Duckerts-Antoine 5141f42d0e [IMP] crm: add new leads in demo data 2018-10-02 22:03:22 +02:00
Vincent Schippefilt 1da9ed30c2 [FIX] crm: add more demo data for dashboard 2018-09-27 13:04:00 +02:00
RomainLibert 379b09e2ee [IMP] crm,sale*: change/add demo data for dashboards 2018-09-26 18:35:13 +02:00
Xavier Morel e1837721a8 [FIX] *: reassociate various demo data to admin instead of root 2018-09-24 15:55:06 +02:00
Olivier Colson 7b8b477915 [FIX] crm: demo data: properly link attachment to lead and assign main attachment field
For consistency between the behavior of the platform and the demo data.
2018-09-21 13:10:16 +02:00
Xavier Morel 68715a46d1 [FIX] *: reassign data & demo mail aliases from system to admin 2018-09-21 10:06:23 +02:00
Xavier Morel 97b82ff7c1 [FIX] crm: reassign leads from system to admin 2018-09-21 10:06:23 +02:00
RomainLibert 61f249a495 [IMP] crm, website_sale: change create date of demo datas
In order to have some data to display in the dashboard views, we need to
set the create_date of the crm.lead and sale.order so that they are not
all created today.

We can now set the create date directly in the demo data, so we remove
the hack that was previously used in website_sale
2018-09-17 13:53:00 +02:00
XavierDo 83fc5dc03c [IMP] mail: add more powerfull delays on activity.
It was possible to define a delay in days on activity type
to reschedule next activity. It is now possible to specify a unit
(days, weeks, months) and a starting point for the delay
(as before, from the moment when the new activity is scheduled,
but also after the deadline of the previous activity).

We realy need to have all javascript action triggering a done
and schedule next to call the python corresponding method on
activities. A part of the work have been there but some
cleaning could still be done in activity.js.

Task: #1870662
PR: #26272
2018-08-10 15:20:37 +02:00
Thibault Delavallée 28433c0a3c [IMP] mass_mailing, crm, sale: improve demo data related to UTM
Purpose is to be able to have some basic demo data for crm and sales linked
to UTMs. Those will be used when introducing crm and sale bridge module with
mass mailing in order to display some documents linked by UTMs.

This commit is linked to task ID 1872198 and PR #26188.
2018-08-09 12:18:32 +02:00
Yannick Tivisse 58fc4e4409 [IMP] base: Improve partners/employees demo data
- Update all the pictures
- Rename the partners with a name that is easy to say for an English speaker (No more 'Agwoleight')
- Update all the addresses/phone numbers in the american format
- Unify the demo data with the new theme (Wood shop/manufacture,...)
2018-07-25 17:34:06 +02:00
lejeune quentin 9c9215fef2 [IMP] crm : Modify followers subtype "lead created" by "opportunity created" and checked by default 2018-07-25 15:41:30 +02:00
lejeune quentin 63af046331 [IMP] crm : Add administrator to be followers by default of sales team "Sales" AND "Website" 2018-07-25 15:41:30 +02:00
Kirti Choudhary 298904f1d9 [REM] crm: remove unnecessary mail template data
This template was linked to an old automated rule used as a demo sending
an email to old opportunities. The demo automated rule has been removed
since. Moreover there is already a mail template used for mass mailing
in crm. No need to have unnecessary data especially it is not linked to
any business flow.

This commit is linked to task ID 1841503 (and 1868112) and to PR #25388
(and #25889).
2018-07-24 15:33:22 +02:00
Mitali Patel d00382d569 [REM] crm: remove onboarding mail
Removed current onboarding mail which was send when module was installed.
It is considered as not necessary now that we have a digest module sending
KPIs and tips by email.

This commit is related to task ID 30655 and PR #18318.
2018-07-19 11:26:48 +02:00
Mitali Patel 707bd1bfb4 [IMP] crm: implement digest KPIs / tips
Purpose of this commit is send lead / opportunity creation as well as
won opportunities KPIs in digest emails. Those are added in the default
digest template.

A tip to remind to use the mailgateway is also integrated.

This commit is linked to task ID 30655 and PR #18318.
2018-07-19 11:26:46 +02:00
Fabien Pinckaers bed29a4aea [IMP] product: Unify/Clean product demo data
PURPOSE
=======

1. Unified product demo data
2. Less demo: one per use case
3. Demo data for all models

Specification
=============

1. Refactor all the brol in the demo data
2. Adapt the tests to make them green, as some products are
   renamed, removed, created in python instead of as demo data
   ...
2018-07-05 08:57:41 +02:00
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.


* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:22:21 +02:00
Fabien Pinckaers 9690685d65 [IMP] crm: removing object crm.opportunity.report
Use crm.lead instead of a the crm.opportunity.report object for
reporting. This allows to show more fields (e.g. tags_ids). The only
field not accessible in the report is #activities, but there is a
deicated report dedicated to activities.

Improved the default search. Example: when reporting on leads, you want
leads+opps by creation date (and not only leads) as an opportunity has
been a lead created too.
2018-06-09 20:45:09 +02:00
Fabien Pinckaers 39780b5037 [IMP] crm: improved dema data, to show a beautiful pipe by default 2018-02-27 13:22:15 +01:00
RomainLibert 1734b8f8de [IMP] crm: onboarding
- Add missing tour stage in crm creating opportunity and minor fixes
- Label, Placeholder and Tip IMP
- Restrict Create new sales channel
- No Content Help Improvements
- Schedule Activity Button Layout Change
- Chatter Log IMP
2018-01-15 10:23:13 +01:00
Christophe Simonis 362f0489d0 [MERGE] forward port branch 11.0 up to fe22a0f9ca 2018-01-03 12:28:52 +01:00
Nicolas Martinelli aa65a46fc5 [FIX] auth_signup, crm, project_timesheet_holidays, sales_team, website_sale: settings access error
The new settings model loads by default all settings. In the case of
non-admin user having the 'Settings' access rights this can lead to
access errors.

This commit deals with the multi-company issues on a standard
installation. If the admin is in Company A and the other user in Company
B, accessing the settings is pretty much impossible because of records
rules.

This fixes the master or demo data to avoid setting a company by
default. Note that it only fixes a standard installation: if the
settings are later customized, there is no guarantee that it will still
work.

Problematic fields:
`auth_signup_template_user_id`
`crm_default_team_id`
`leave_timesheet_task_id`

opw-801210
2018-01-03 08:49:32 +01:00
Christophe Simonis 4708812b6c [MERGE] forward port branch 11.0 up to b37cc1f9b7 2017-12-12 18:50:59 +01:00
Miquel Raïch a578531ca3 [FIX] v11 urls
Was still pointing to old links

Closes #21590
2017-12-12 17:19:01 +01:00
Yannick Tivisse 7ed9a7fabe [REM] web_planner: Remove the module
Purpose
=======

User tests have been made by the Product Owners team. It showed that the planners are not used by new users on Odoo due to several reasons (They are too static, too heavy to use,...)

Specification
=============

Remove the module and its different applications. The onboarding on the business flow will be improvement in the weeks to come.
2017-10-26 16:14:21 +02:00
Rohan Patel e2342a562d [IMP, ADD] base_import,account,...: Provide import templates to ease the import process
PURPOSE
=======

Provide import templates to ease the import process

Specification
=============

SPECIFICATION
==============

1/ Add specific templates to import screens: e.g. for product.template, res.partner and bank statements

2/ Replace import files suggested in planners (sales & website) by those ones.

3/ Add import template to bank statement import wizard for CSV, OFX, QIF and CODA files
2017-10-24 10:37:35 +02:00
Fabien Pinckaers 32f4888cce [IMP] mail: no default text for activity types. Avoid bug when changing activity 2017-09-06 21:40:26 +02:00
Thibault Delavallée bce4a31ec7 [REF] various: update community to enterprise change 2017-08-22 10:42:26 +02:00