Commit Graph
475 Commits
Author SHA1 Message Date
Victor Feyens fba6ea5a47 [IMP] *: do not force admins to be app admins
For bugfix purposes, app administration groups have been given to
(implied by) the "Settings" group because without those rights,
opening/saving the settings crashed.

1) Do not load hidden view content

This commit uses the conditional inheritance of views
(depending on user groups) to avoid loading unnecessary view
& record content client-side.

This improves performance for admins without the specific application
admin rights, but also fixes the main bugfix problem,
caused by the webclient querying name_get for the records in relational
fields content.

Example:

sale_management adds a res.config.settings field to specify
the default sale.order.template for the current company.

If a 'Settings' user without 'sale.group_sale_manager' opens the
settings, he won't see this setting, but if a default template is
specified for the current company, the webclient will still request
the name_get of this template to the server, because the field
was present in the view, only hidden with a groups attribute.

With this commit change in sale, the field won't be in the view unless
you have the Sale manager group, avoiding the error/traceback/bug.

2) Remove implied application administration groups

Do not force the specific application groups on all 'Settings' user,
they globally do not need those rights, and if they need it, they
can add it to their account themselves.

3) Add a test to make sure settings user are able to manage settings.

4) Enforce 'settings' -> 'access rights' -> 'internal user' groups

As the previous test highlighted some 'false positives' because
it considered a settings user unable to read `crm.team`
and `stock.warehouse` records, we also took the opportunity to enforce
the fact that 'Settings' & 'Access rights' users must be internal users.

It makes no sense for a portal/public user to have access to the
settings, and didn't work anyway.

Part-of: odoo/odoo#91909
2022-06-23 23:48:29 +02:00
Patrick Hoste bf992f24b2 [IMP] various: improves usage of partners
SPECIFICATION

Various change for the partner view:
- Moved the activity widget to the bottom right of the kanban
- Moved the informations badge to the bottom right next to the
  activity widget and made them clickable
- Change the address options order and add a small help below
- Change the 'Remove' button function from delete to remove from
  the company and add a delete button to the right end.
- Correct some typo
- Add an 'Archived' ribbon to the kanban card
- Change various small things

LINKS

Task-2821356

closes odoo/odoo#89249

Related: odoo/enterprise#26442
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-14 11:41:15 +02:00
Jérémy Hennecart (jeh) bca719293d [FIX] base,crm: revert possibility to install language
Revert the possibility to install languages from the form views
of opportunity/lead and partner.
We consider that the quick installation of languages is too
advanced and admin people can go through the dedicated menu if
need be.

task-2839020

closes odoo/odoo#91750

X-original-commit: 5a616997659b2359ec946883b620e2fae6d6c39d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-19 13:45:01 +02:00
dht-odoo 3b3423d638 [IMP] web,crm: show sum of MRR on leads' kanban progress bar
This commit shows the sum of field 'recurring_revenue_monthly' on
leads' kanban progressbar next to the sum of 'expected_revenue',
if the recurring revenu is enabled for logged in user.

taskID-2414576

closes odoo/odoo#66237

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-17 16:03:03 +02:00
Fabio Barbero 47041f2d45 [IMP] base: allow user to activate multiple languages at once
Purpose
=======
Add "Activate" button when selecting multiple languages, select multiple
languages when clicking on "Add languages" in settings.

Specifications
=============
`lang` variable in `base.language.install` changed from Selection to
Many2many to allow multiple languages being activated at once.
Hide globe icon for language fields from view mode (only visible when
editing). Remove state in base.language.install since it's no longer
need to keep track of the installation step.

Task-2662548

closes odoo/odoo#78287

Related: odoo/upgrade#2921
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-14 08:42:58 +00:00
Fabio Barbero f953e61ba6 [IMP] crm: display globe button next to language for leads/opportunities
Purpose
=======
Add globe button next to language for leads and opportunities if the
database is in multi language mode and user has enough access rights.
User is also unable to edit language from view

PR: odoo/odoo/pull/78287
Task-2662548

Part-of: odoo/odoo#78287
2022-03-14 08:42:57 +00:00
Antoine Vandevenne (anv) adf70bf9dc [FIX] *: retarget documentation links to master
closes odoo/odoo#84990

X-original-commit: 39bdf46
Related: odoo/enterprise#24582
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-21 17:01:02 +00:00
std-odooandflch-odoo 78c0257ae4 [FIX] crm: sync the email / phone with the partner
Bug
===
If we
1. Open a lead with an email but without partner
2. Set a partner without email on the lead
3. The warning "The email will be propagated" is visible
4. When saving the form, the email is not propagated even if the
   warning message was visible

Solution
========
The reason is that, as the email was not changed, the inverse method
of this field was not called and so the email was not propagated.

The best solution would be to use "force_save" on those fields. But
this feature only works on readonly fields.

So, we simulate a real "force_save" on the email / phone, directly in
JS. That way the inverse will be called, and if necessary, the email /
phone will be propagated.

Task-2704904

closes odoo/odoo#84618

X-original-commit: 1d548c7eadcd25b97856c4769759358f86e00640
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: flch-odoo <flch@odoo.com>
2022-02-15 11:24:16 +00:00
Thibault Delavallée 5664ee04f4 [IMP] crm: remove outdated fields
PURPOSE

Improve performance in often used views and fields in a normal Odoo usage.

SPECIFICATIONS

On crm.lead model

  * remove field user_email and user_login fields. Those are related non stored
    and used in kanban for no reason (or even not used). Those can be removed
    completely;

Original commit seems to be odoo/odoo@ea2e8b64c4 which seems to show those
fields were added to add a gravtar based on user email, and its login was used
to display "responsible". Maybe an internal Odoo related spec, anyway not used
anymore.

Task-2752043

Part-of: odoo/odoo#83806
2022-02-15 10:25:57 +00:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
Florian Charlier dda6e65e15 [FIX] crm: fix priority stars alignment
Better aligns the stars with the label when no expected deadline is set,
by styling the parent div to space out non-empty children.

Task-2709761

closes odoo/odoo#81358

X-original-commit: 61925f488557181ae691d222a142a242c939d3e0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-14 09:11:23 +00:00
Philémon van Helden 3b833c73a7 [IMP] mass_mailing, *: improve mailing stat buttons
*mass_mailing_crm, mass_mailing_sale 

Currently, the Mailing stat buttons have a few problems.
The business reporting smart buttons send the user to a list of linked records,
which doesn't provide much value (e.g. what is the user supposed to do with a
list of 12345 leads?). They also show wrong values depending on access rights.
The Mailing KPI smart buttons lead to a blank screen if there's no data to show.

In this commit, we add/adapt all action helpers to help users understand what is
going on. For the business reporting smart buttons we instead send users to
relevant reporting actions, so they can make sense of the data we showed before.
The values of the business reporting smart buttons are now calculated as a super
user.
We also change some domains from the whole UTM Sale Domain to only using
Source ID, which simplifies computation while staying accurate.

task-2604515

closes odoo/odoo#76798

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-30 16:53:33 +00:00
Aurélien WarnonandJulien Banken e70c203910 [IMP] crm: add small view improvements for crm.lead
This commit simply re-organizes a few fields on the crm.lead form view to give
more visibility to the most important information and to give more space to the
"Notes" section.

Task-2677144

closes odoo/odoo#80591

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Julien Banken <jbn@odoo.com>
2021-11-30 16:07:43 +00:00
David Beguin 75e9b2bff7 [IMP] crm: display lead reporting on all leads even if not group_use_lead
Purpose
=======

As a Lead Manager, I do not really care about what's in the "Lead Pipeline"
since this does not exist. Instead, I want to keep an eye on all the leads that
entered the CRM to see how well they are doing and how they are spread.

Specifications
==============

- Remove the group on the Reporting
	> Leads menu item, this menu can be used with Opportunities only

- Move it below the Pipeline report

- By default, this menu shows all crm.lead :
   - no matter the type (lead/opp) but with the filters in the search view
     if needed
   - no matter if won/active/lost (but again, filters allow me to change that
     if needed)
   - Default grouped by month creation date
   - Filtered on records created this year to avoid displaying 10 years of CRM
     usage - already done

=> The difference if I activate leads is that then I have the extra filters, ...
but this is already valid if I'm only working with opportunities

Also, on the report list view of the leads, this commit brings some small
modifications in order to have a better view of what kind of lead and 'where'
they are:
- Hide by default the "City" field
- Add "Type" field before "Probability" field (only if Leads are activated)
- Add "Stage_id" after "Type" field

Task-2671372

closes odoo/odoo#78748

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-26 15:58:01 +00:00
Patrick Hoste 2625132dd7 [IMP] crm: add default language when creating partner in crm lead
PURPOSE

After this commit when creating a partner the language will default
to the crm lead value.

LINKS

Task-2580065

Pr: odoo/odoo#76812
Related: odoo/enterprise#20689
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-25 11:38:39 +00:00
Thibault Delavallée d1edc9e6a7 [REF] crm: correctly name lost_reason field on lead
As this is a many2one, it should end with an ``_id`` suffix. Otherwise we
may think this is a char field, which was probably the case at one point.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:51 +00:00
Fabio Barbero 1a9b6422ff [IMP] digest: organise digest view
Purpose
=======

Give the user a more organized view of the digest KPIs in the backend and
improve global wording of digest sections and KPIs.

Specifications
==============

Reorganize order of KPIs in digest view. Fix some typos, move buttons in
list and form views.

Task-2582128

closes odoo/odoo#77507

Related: odoo/enterprise#21340
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-16 19:20:57 +00:00
ijas ahammed 920b673098 [IMP] crm: improve pipeline analysis report search view
This commit improve the pipeline analysis search for a better
usability. The changes includes:

- Rename 'My Opportunities' filter to 'My Pipeline'
- Move 'Opportunity' filter above 'Lead', rename it to
  'Opportunities', and display only if leads are activated
- Rename 'Lead' filter to 'Leads', and display only if leads are
  activated
- Remove the string from filter 'Creation Date', and use the
  default field name (which is 'Created On').

Also updated some filter names to have a global convention
and avoid name clashing, updated filter names are listed below.

- `opportunity` to `filter_opportunity`
- `lead` to `filter_lead`

As we need to display same filters and groupby in both community and
enterprise pipeline report search view, we have removed the search
view `crm_opportunity_view_search` from enterprise so that we can use
the community view there and both becomes the same view.

So in this commit we have also added some filters and groupby to
community version(`crm.crm_opportunity_report_view_search`) which was
existed in enterprise search view (`crm_enterprise.crm_opportunity_view_search`)
so that we dont miss any filters used in enterprise.

The filter and groupby added are listed below:
 Filter:
  - inactive

 Groupby:
  - compaign
  - medium
  - source

Apart from this, we have added groups `crm.group_use_lead` to the
groupby filter `conversion_date`.

Enterprise: odoo/enterprise/pull/18797
Upgrade: odoo/upgrade/pull/2937
TaskID-2343223

closes odoo/odoo#71796

Related: odoo/enterprise#18797
Related: odoo/upgrade#2937
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-10-28 15:27:27 +00:00
Florian Charlier 80ce93cd44 [IMP] crm: add expected closing date in tree view
It is more convenient to be able to keep an eye on the expected
closing date of opportunities.

Task-2668131

closes odoo/odoo#78399

Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2021-10-20 13:01:12 +00:00
std-odoo 6e7b50708f [IMP] crm: remove the groups attributes on the recurring revenue fields
Purpose
=======
This commit remove the "groups" attribute  on the recurring revenue
fields. Instead we hide them directly in the views. This group was used
only to turn on / off the feature, not for security reason. So it's 
fine to move the group in the views.

It will help for the lead merge so we will not be forced to use SUDO
during the merge.

Task-2447721
PR odoo/odoo#75742
2021-10-19 15:58:57 +00:00
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
Victor Feyens ab022ec12d [FIX] *: target v15.0 documentation with doc links
X-original-commit: acc95ec204baa1dddbe292c379a1768fe1deccbf
Part-of: odoo/odoo#77923
2021-10-07 17:59:52 +00:00
dht-odoo 67bcdbb2a2 [IMP] crm: improve visibility of partner_id field in lead form view
When the crm.lead is of type 'lead', we don't want to display the
"Customer" field on the form view unless it's set (or debug mode).

Indeed, most of the times leads will not have this information set,
since when we assign a Customer we usually convert the lead to
an opportunity as well.

This means that on the lead form, we don't want to display this field
since it may be misleading for the end user.

When it's set however, we want to display it, mainly because there are
a few automatic synchronizations between the lead and its partner
(phone and email for examples), and this needs to be clear that modifying
one of those fields will in turn modify the linked partner.

Task-2596955

closes odoo/odoo#76233

Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2021-10-04 11:29:51 +00:00
Nikunj Ladava 5277316729 [IMP] {crm}_iap_enrich: enrich leads on creation for auto mode
Right now, when we choose to automatically enrich the leads from CRM
settings, it activates a cron to periodically enrich the leads using
IAP service.

This commit improves the behavior by enriching the leads after the
records creation using cron trigger. That way it is done nearly after
creation and user gets enrich information sooner.

To make it clear to users, the description for 'auto' mode is improved to
'Enrich all leads on creation'.

Also, now we select 'auto' mode by default instead of 'manual', and
display 'Enrich' button on form view irrespective of the selected mode
(if lead meets certain conditions) unlike before. Rest of the behavior
is still same as before. For example, we still have server action which
can enrich the selected leads in batch, which is useful if there are
existing leads before we enable 'Lead Enrichment' feature.

Task-2269743

Part-of: odoo/odoo#60605
2021-09-28 16:27:16 +00:00
Priyanka Kakadiya 38625a33a5 [IMP] crm: clean lead form view about Marketing information
This commit makes Lead and Opportunity form view cleaner with below
changes :

 * in Lead form view, renamed 'Tracking' group to 'Marketing'
 * in Opportunity form view, renamed 'Misc' group to 'Tracking'
   and moved 'Referred By' field to 'Marketing' group

Purpose is to better highlight important marketing information and better
label sections.

Task-2269743

Part-of: odoo/odoo#60605
2021-09-28 16:27:15 +00:00
Mitul Shah c1ea516aa7 [IMP] various: improves button titles for better command palette
Currently, in some of the important business objects' form views,
few header buttons are missing the title, and so the command palette
displays the button string which is not very clear/useful.

This commit improves the behavior by adding titles to the buttons. Below
are the model wise actions/methods linked with updated buttons:

 - preview_invoice (account.move)
 - action_sale_quotations_new (crm.lead)
 - action_set_lost (crm.lead)
 - action_set_won_rainbowman (crm.lead)
 - crm_lead_lost_action (crm.lead)
 - iap_enrich (crm.lead)

Task-2622266

closes odoo/odoo#75935

Related: odoo/enterprise#20680
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-15 07:48:06 +00:00
Mathieu Duckerts-Antoine 7545913020 [REF] *: graph archs cleaning
We clean various graph archs taking into consideration that:
 - the default type of a graph is "bar".
 - a bar chart is by default stacked.
 - the field attributes type="row" and type="col" does not make sense for
   a graph view (since its implementation was separated from the pivot
   implementation a long time ago))
 - the boolean attributes should now take 1 or 0 as value (but the other
   values are accepted for retrocompatibility).

Part-of: odoo/odoo#76065
2021-09-07 15:50:14 +00:00
ijas ahammed ea1b009386 [IMP] crm: move 'crm_menu_views.xml' to last in manifest
Usually, the actions are defined before the menu items. So with this
commit, we load the 'crm_menu_views.xml' file at the last.

TaskID-2582208

Part-of: odoo/odoo#73530
2021-09-06 08:21:29 +00:00
ijas ahammed 4c271090c4 [IMP] crm,{sale}s_team: improve the sales team kanban/list/form UI
- If we only install sales_team, on the footer of sale team kanban view
  there's empty grey border which looks ugly. Also, if the data are
  not available, the empty graphs don't look so beautifull.

  This commit improves the kanban view to avoid this empty grey border
  when there's no content within it, and in case of lack of the data,
  we now display sample data in graph with grey color. Note that the
  actual data now has colors, green for the future / present data range
  and pink for the past ones.

- When opening the configuration menu of team kanban from CRM, we observe
  three columns: View, New and Reporting. However, those columns are not
  consistent. For example, when leads are activated, we don't see 'Leads'
  action under 'New' column. Also the order for the actions are not
  consistent for 'View' and 'Reporting' columns.

  This commit re-organizes the sequence of the actions for these columns
  and thus makes them consistent. Note that we want to always show the
  'Activites' at the last, which is being added from crm with 'Leads' and
  'Opportunities' actions. So an empty seperator is introduced to keep
  them seperate, and push the sales related actions on the top of
  'Activities'.

- Right now, the alias on sales team's kanban view is being shown
  with `<small>` tag, but it is hard to read. Apart from that, in
  the list view, only the alias name is displayed even if the alias
  domain is configured.

  This commit makes the alias more easy to read by displaying it
  with `<span>` tag on the kanban view, and by showing the full
  alias along with the domain on list view. Note that on the kanban view,
  alias will now be displayed always, which previously was displayed only
  when 'leads' were enabled.

- This commit also changes of the action 'crm_activity_report_action' from
  'Pipeline Activities' to simply 'Activities' to avoid confusion.

- Apart from that, this commit also adds currency symbol in the form
  view and kanban view (while configuring the target), with the suffix
  ' / month' after the input. Adds the alias name in the
  team list view, and it adds 'many2one_avatar_user' widget on user_id
  field for both list and form view.

TaskID-2582208

Part-of: odoo/odoo#73530
2021-09-06 08:21:29 +00:00
ijas ahammed 6b67b6e41a [IMP] crm,{sale}s_team,base,contacts: add and improve action helpers
- if the alias is configured for the team, the action helper
  with the link of that email will be displayed. Otherwise, it will
  simply indicate user to either create lead manually, or to configure
  email alias.

- This commit improves action helper for the tags and adds
  sample data for better onboarding.

- This commit adds action helper on action 'sale.action_invoice_salesteams'
  for better onboarding.

- This commit updates the action helper for 'CRM > Customers'
  and 'Contacts' actions and make the helper message consistent.

TaskID-2582208

Part-of: odoo/odoo#73530
2021-09-06 08:21:28 +00:00
Mitul Shah 4450f8b093 [IMP] crm: allow sales users to access 'My Activities' menu
Currently, 'My Activities' menu (under CRM > Sales) is accessible only
by the sales manager. However, this menu should be accessible to the
sales user also. The existing records rules make sure that the menu
will display salespersons' own documents only and so there seems no
data leak in this case.

So with this commit, we make the 'CRM > Sales > My Activities' menu
available for the salesperson as well.

Task-2624721

closes odoo/odoo#75521

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-31 08:47:07 +00:00
Thibault Delavallée 528880aa9c [MOV] website_crm_iap_reveal: rename `crm_iap_lead_website` module
PURPOSE

Perform a global renaming / cleaning of IAP features often added or merged
with minimal review. Time to cleanup !

SPECIFICATIONS

Rename ``crm_iap_lead_website`` to ``website_crm_iap_reveal``. This module
is an addition to ``website_crm``, notably using visitor based information
to generate leads based on rules.

LINKS

Task-2630969
Prepares Task-2600047 (code improvements and cleaning)
COM PR odoo/odoo#75514
ENT PR odoo/enterprise#20424
UPG PR odoo/upgrade#2770
2021-08-25 13:10:15 +00:00
Thibault Delavallée 8eacdca937 [MOV] crm_iap_mine: rename `crm_iap_lead` module
PURPOSE

Perform a global renaming / cleaning of IAP features often added or merged
with minimal review. Time to cleanup !

SPECIFICATIONS

Rename ``crm_iap_lead`` to ``crm_iap_mine`` . Indeed it adds lead mining
feature on top of crm.

LINKS

Task-2630969
Prepares Task-2600047 (code improvements and cleaning)
COM PR odoo/odoo#75514
ENT PR odoo/enterprise#20424
UPG PR odoo/upgrade#2770
2021-08-25 13:10:09 +00:00
Thibault Delavallée 98d2f44526 [MOV] crm_iap_enrich: rename `crm_iap_lead_enrich` module
PURPOSE

Perform a global renaming / cleaning of IAP features often added or merged
with minimal review. Time to cleanup !

SPECIFICATIONS

Rename ``crm_iap_lead_enrich`` to ``crm_iap_enrich`` . Lead naming is not
really required as it is a bridge build on ``crm``.

LINKS

Task-2630969
Prepares Task-2600047 (code improvements and cleaning)
COM PR odoo/odoo#75514
ENT PR odoo/enterprise#20424
UPG PR odoo/upgrade#2770
2021-08-25 13:09:58 +00:00
Martin Trigaux d9e3aab69b [FIX] mail: convert res_model_id to selection
Following the removal of read access on ir.model (odoo/odoo#69120),
the mail.activity.type model was not accessible to non-admin users due
to the res_model_id many2one field.

Before this commit, a project user could not access the Activity Type
menu.

Convert it to a selection field with the selection values being
computed in sudo.

closes odoo/odoo#74981

Related: odoo/enterprise#20214
Related: odoo/upgrade#2734
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-23 06:56:00 +00:00
dht-odoo 10c5feab12 [IMP] crm: improves action helper messages
This commit improves action helper message for the crm menus
for better onboarding.

Menus

1) Activity Types(action -> mail_activity_type_action_config_sales)
2) Sales Teams(action -> crm_team_action_config)
3) Lost Reasons(action -> crm_lost_reason_action)

Task-2584073
PR odoo/odoo#74082
2021-08-20 13:10:59 +00:00
Touati Djamel (otd) 6bd5c69ed6 [FIX] crm: prevent the display of closed opportunities
Steps to reproduce the bug:
- Go to CRM and create a team.
- Create 2 Opportunities and assign them to the created team
- Put a date in the past for 'Expected Closing'
- Mark one of the opportunities as won
- Go to CRM > Sales > Teams
- You will see that the number of overdue opportunities is 1 but when clicking on it, it shows 2

Problem:
As an opportunity is in a stage with "is_won= True" so it was won (Probability 100%).
It should not be displayed with the overdue opportunities

Lost opportunities should not be displayed also.

Solution:
Opportunities won or lost have a closing date, so we can use this field to filter them:
https://github.com/odoo/odoo/blob/14.0/addons/crm/models/crm_lead.py#L590-L591

opw-2590471

closes odoo/odoo#75376

X-original-commit: b699c3e28c4cf745a91eb29bf5c85c429d152335
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 10:30:31 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Swapnesh Shah b42c4fed9e [FIX] crm: correctly label opportunities count in partner kanban view
Use correct label. This link leads to opportunities, not to "Favorites"
whatever that means.

closes odoo/odoo#60036

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-19 08:30:45 +00:00
Mohammed Shekha 88857a397e [IMP] crm,mail,project: support many2one_avatar_user on activity view
Currently, activity view does not support many2one_avatar_user widget due to
which clicking on image do not open chat window, with this commit, we add
support of many2one_avatar_user widget in activity_view so that user can click
on avatar image and open chat window.

task-2554466

closes odoo/odoo#71804

Related: odoo/enterprise#18803
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-01 11:50:24 +00:00
abd-msyukyu-odoo d287b81a0b [MOV] crm: move server actions from lead views to a dedicated file
Taking advantage of the new action_opportunity_forecast for crm leads to
create a dedicated ir_actions.xml file to store all server/client actions.

Task-ID: 2243913
PR odoo/odoo#69380
2021-06-30 09:51:42 +00:00
abd-msyukyu-odoo 2a48b989c1 [IMP] crm: implement the forecast feature for opportunities
Add a new submenu "Forecast" in "Reporting" for CRM

The Forecast shows 4 views:
  1. Kanban
  2. Graph
  3. Pivot
  4. List

Objective
  Shows the short term forecast for opportunities (crm_lead) based on their
  expected closing (date_deadline) and have an overview of the prorated
  revenues for each period (defaults to month).

Implementation
1. Kanban
- the progressbar is using the prorated_revenue
- the forecast_field is date_deadline
- the default groupby is date_deadline

2.3. Graph, Pivot
- the measure defaults to the prorated_revenue
- the row defaults to date_deadline

4. List
- shows the prorated_revenue

The special filter "Forecast" is defined to be used by the
forecastModelExtension (JS). (define the forecast_filter context key)

The forecast_field context key is defined in the action to be used by the
forecastModelExtension and the forecastService (JS).

The demo data for opportunities is updated to spread date_deadline over 4 months

Enable drag&drop and quickCreate features for the kanban view with the use of
the allow_group_range_value  <field> xml attribute

Add a "Won" flag for the forecast view to better distinguish opportunities that
need to be worked on

Test tour

Task-ID: 2243913
PR odoo/odoo#69380
ENT PR odoo/enterprise#18547
2021-06-30 09:51:42 +00:00
Thibault Delavallée 6a1cda64f8 [IMP] crm: remove duplicated field activity_deadline_my
Next to the addition of a generic field adding a compute to find
my next activity deadline there is no need to keep a custom field
on crm.lead model.

Task ID-2438822
COM PR odoo/odoo#72219

Related: odoo/upgrade#2566
Related: odoo/enterprise#19044
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-21 08:53:35 +00:00
bit-odoo 800f9c499a [FW][FIX] mail, various: show only my activities shown through systray
Before this commit, suppose we have a scenario like below

  Task-A:
    Activity-1:
      name: Email ( Today )
      Assigned to: User-1
  Task-B:
    Activity-1:
      name: Email ( Today )
      assigned to: User-2
    Activity-2:
      name: Call ( Due in 3 Days )
      assigned to: User-1

When User-1 goes through the systray 'Today' filter shortcut he gets both
Task-A and Task-B in the list instead of only Task-A. Indeed currently
activities are not filtered based on current user with its deadlines.

However purpose of systray is to indicate activities current user has to
perform instead of global activities.

After this commit activities will be filtered based on deadlines as well as the
current user. In order to achieve this behavior we needed to pass a domain like
[
   ('activity_ids.date_deadline','=', fields.Date.today()),
   ('activity_ids.user_id','=', 1)
]

And for that purpose we introduced a non-stored compute field with a search
method.

Task ID-2438822
COM PR odoo/odoo#72219

X-original-commit: f4eaf4d8fb2f97240201104dcd4fc7e2674bce02
2021-06-21 07:51:00 +00:00
Stéphane Debauche 5813242fe0 [FW][FIX] crm: dot not sync the phone / email from False to an empty string
Bug
===

1. Create a new database from the database selector
2. Do not select a country for your company
3. Install CRM
4. Create a new opportunity and select your company
5. The sync "warning" will be displayed, and it should not

The reason for that is the phone of the company is an empty string and the
phone of the lead is False. So we try to sync them and we show the warning
message even if for the user, nothing will happen.

This commit fixes that behavior by correctly checking that False / empty
strings are considered as equal.

UPDATE

In this commit we also display warnings about update only in edit mode to
avoid displaying irrelevant information to the user. Indeed email and phone
will be propagated at save, aka in edit mode.

TaskID-2499659

closes odoo/odoo#72286

X-original-commit: efea8fce6c7cb6e40b590cd827fe22e134cc3d13
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-17 12:38:34 +00:00
nounoubensebia c89c5ff3ed [FIX] crm: rearrange settings
Move the lead mining section to the top right as we now have a lot more empty
space after the removal of the outlook plugin settings

Task-2531032

closes odoo/odoo#71544

X-original-commit: 1cb0c743c4c15d6817773d66a7ac27321b8bbada
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-01 12:10:21 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Anjali a99d882c02 [IMP] crm,*_crm: better merge leads side documents
Purpose of this commit is to ensure side documents are redirected to the
master opportunity when merging leads. Those side documents include

  * communication history (mail.message);
  * attachments (ir.attachment);
  * visitors (website.visitor);

However some documents are currently not specifically handled :

  * meetings (calendar.event);
  * activities (mail.activity);
  * sale orders (sale.order);
  * attendees (event.registration);

In this commit we ensure all are attached to the final master opportunity.
That way we prevent loosing access to those documents and ensure we keep
the complete history of all merged leads.

Also tests are added to ensure the merging of leads and its contents.

A new field is added to have the o2m field between leads and calendar events.
In order to clarify naming, ``meeting_count`` is renamed to
``calendar_event_count`` to match naming.

Task Id-2457941
COM PR odoo/odoo#68884
UPG PR odoo/odoo#2494

Related: odoo/upgrade#2494
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-28 12:12:51 +00:00
yograj tandel e893651cec [IMP] *: remove widget='selection' from many2one fields
Currently, across Odoo, there are around 40+ many2one fields defined with a
'selection' widget. Since the many2one widget has options to limit record
creation and opening, there is no reason to define a many2one field with a
selection widget. The selection widget does not allow for searching, and is
limited to 100 records.

PURPOSE
to update the definition of any many2one on which we applied a 'selection'
 widget, and instead use the standard many2one widget with disabled
opening/creation instead.

after this commit,
for each many2one field defined with widget="selection",  widget="selection" is
replaced with options="{'no_open': True, 'no_create': True}"

Task : 2476488

closes odoo/odoo#68387

Related: odoo/enterprise#17316
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-20 11:01:28 +00:00
Victor Feyens 0348b95aee [FIX] *: update documentation links
Following the recent reorganisation of the documentation in 12.0+,
the majority of the documents have been moved and their old links are no longer valid.
Some redirection rules will soon be deployed, but those rules might be dropped in some years
and we want the links to still work, which is why we still replace the links to the new ones.

FW-Port of odoo/odoo#70675 (13.0)

closes odoo/odoo#70920

X-original-commit: bc9c1eef538ba6095e74c19d5d9ed9e01625ec7c
Related: odoo/enterprise#18361
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-17 19:26:27 +00:00