Commit Graph
141376 Commits
Author SHA1 Message Date
wan 9b3c19b41e [FIX] account: fix standalone test with demo data creation
The test is running in sudo mode, so we need to specify the company in
the search.

Also do not load the demo data when installing as we would do the work
twice for most localization.

closes odoo/odoo#67235

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-04 14:11:50 +00:00
Adrien Widart 567f192d98 [REV] l10n_mx: prevent MX from printing receipts
PR #66910 has been created so the MX can print their receipts.
Eventually, this needs to be reverted since printing a receipt is
actually illegal.

closes odoo/odoo#67209

X-original-commit: 7e9261cacd9f6963dca517fe7b1f3de067af1366
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-03-04 10:33:08 +00:00
Josse Colpaert cefb6bb39b [FIX] l10n_id_efaktur: filter invoice lines on display_type
opw-2451571

closes odoo/odoo#67163

X-original-commit: 9bafbca93150a55f8c8dcad19d5861bd05d40b99
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-03-04 13:41:28 +00:00
Barad Mahendra 3fe4016f6a [IMP] website_hr_recruitment,google_recaptcha: auto install online job
Currently, website_hr_recruitment(online job) is not auto
installed when hr_recruitment and website is installed.

So in this commit, auto install the online job(website_hr_recruitment)
when only website and hr_recruitment is installed.
so removed website_partner dependency from website_hr_recruitment as it's
not really needed. also make the website_hr_recruitment and
google_recaptcha auto install.

closes odoo/odoo#66737

Taskid: 2374617
Related: odoo/upgrade#2201
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-04 12:39:00 +00:00
Nidhi Patel dc9ef81ab2 [IMP] hr_timesheet, sale_timesheet: add a group by inv/so in portal view
Currently, user cannot group the timesheet by inv/so in portal view.

In this commit, add a group the timesheet by inv/so in portal view and
move the `view timesheets` button next th each sol to the top left pannel.

closes odoo/odoo#65932

Taskid: 2451359
Related: odoo/upgrade#2214
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-01 12:29:13 +00:00
Robin Heinz 0d0ba71f85 [IMP] hr: rename group Attendance
Rename group "Attendance" to "Attendance/POS"

closes odoo/odoo#65537

Task-id: 2244289
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-03-03 13:56:56 +00:00
Robin Heinz 9b97764ed0 We remove the "close session" button to prevent an employee to have access to the back end if not eligible.
For example:
User A start a pos session.
Employee B, not related to User A, could close the session and have access to the back end as User A.

This commit also allows to display the select cashier popup correctly in mobile view.

Task-id: 2244289
2021-03-03 13:56:56 +00:00
Kevin Baptiste 278f5a6995 [IMP] hr_expense: show confirmation on duplicate expenses
Display a confirmation dialog when a user creates duplicate expenses.

Two expenses (or more) are considered duplicates when they share the same
date, amount, product, employee, company and currency.

closes odoo/odoo#64190

Taskid: 2368636
Related: odoo/upgrade#2061
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-04 12:54:34 +00:00
Xavier Dubuc b85bde9854 [FIX] mail: do not show falsy value in tracking values messages
task-2438828

closes odoo/odoo#67227

X-original-commit: 49585b8ee726af7edd113c3012b1168d24dc4d7c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-03-04 12:41:05 +00:00
fw-bot ee58f698fd [FIX] sale_timesheet: give no sol if sol in task is False
Before this commit, when the project is employee rate and the user sets
the sale order item to False in a task with this project, the linked
timesheets should have the sales order item to False, but if a
employee mapping is matched for this timesheet, the sales order item of
this mapping is given to the timesheet.

This commit checks if the sales order item in the task linked to the
timesheet and if no sales order item in the task then the sales order
item in the timesheet should also be empty (False).

closes odoo/odoo#67202

Forward-port-of: #67055
X-original-commit: a325e75a8565039d5120d169df67ef2d16c7fdc4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-04 09:05:46 +00:00
Ronald Portier 81c3974a01 [CLA] Add Danny de Jong to Therp CLA
closes odoo/odoo#67073

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-03-02 14:43:35 +00:00
Odoo's Mergebot f11fcba83c [MERGE] web,hr_timesheet,partner_autocomplete: make multi company timesheet uom work
# Purpose

This PR's primary objective is to ensure that the timesheet uom is working in accordance with the company settings in a multi company environment.

Prior to this PR:

 - The timesheet preferences sent to the front end were always those of the default
   company of the user.
 - The timesheet related widgets initialisation process (adding the correct ones in
   the fieldRegistry) was performed before the front end treatment of cids and coockies
   which prevented applying the front end selected company settings.

After this PR:

 - A dictionnary is used in the session in order to structure the companies info.
 - The company timesheet preferences are sent to the front end through the company dict.
 - The uom info is sent to the front end through the session.
 - The timesheet uom is now managed from the frontend and is now in sync with the settings.
 - Timesheet widgets are initialised during the AbstractWebClient init and are in sync with
   the multicompany front end settings

task-2168337

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#66551

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-04 13:25:17 +01:00
Odoo's Mergebot 667d3d1132 [MERGE] mail, mass_mailing, event, various: improve usability across various marketing-related apps (activities, marketing)
# Purpose
General Marketing usability improvements based on what has been seen observing users on Fullstory.
As the changes are relatively minor and related to specific apps, the rationale and improvements will be explained in more details in each commit.
# Commits
##### [IMP] `base`: modify some displayed texts for res_partner
* Error messages when trying to delete/archive a partner linked to an active user
* Partner Form placeholders
* Update main_flow tour to be consistent with above changes
* Update test_orm to use a model with less functional constraints
##### [IMP] `mass_mailing_sms`: prevent raising an error in sms mailing
* Allow to launch a sms campaign without recipients without raising an error
##### [IMP] `mass_mailing`: add various usability improvements
* Mass mailing preview in a new tab (to prevent data loss when leaving the page)
* Data display adjustments (better wording...)
##### [IMP] `mail`: revamp the activity type form view
* Change "force_next" checkbox into "chaining_type" selection
* Update the Form layout and wording
* Renamed fields :
  * default_next_type_id -> triggered_next_type_id
  * next_type_ids -> suggested_next_type_ids
  * default_description -> default_note
##### [IMP] `event`: improve the event form editor and update the tour
* Fix an undesired behavior with duplicate lines when switching event_type templates
* Remove steps from the event tour
##### [IMP] `web`: add an initial_date context key for CalendarView
* Add a context key ('initial_date') to the calendar view (to open it around a specified date)
##### [IMP] `crm`: add a reschedule action for activities
* Add a reschedule action alongside snooze 7d, for event-related activities
##### [IMP] `crm`: change the search order for a won stage
* In case "not won" stages are placed between "won" stages, put an opportunity marked as "won" in the correct stage (higher sequence if possible)
##### [MOV] `website_event`: move the website_event tour to tests/tours
* The scope of another tour (event_tour) include the scope of this tour and actually starts from the Event module. This smaller tour is thus disabled and kept as a test.
# Links
Task ID : 2410217
ENT PR : https://github.com/odoo/enterprise/pull/15406
UPGRADE PR : https://github.com/odoo/upgrade/pull/2167

closes odoo/odoo#63370

Related: odoo/upgrade#2167
Related: odoo/enterprise#15406
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-04 13:25:07 +01:00
Laurent Stukkens (LTU) a77aad8820 [IMP] hr_timesheet: add js tests for timesheet_uom
Prior to this commit:

- There were no tests on the timesheet_uom and the fact that the widget
  that is loaded in the fieldRegistry is corresponding to the current
  company preferences.

After this commit:

- Tests will be performed in order to check that the timesheet_uom that
  is loaded in the fieldRegistry is corresponding to the current company
  preferences.

task-2168337
Closes: #66551
2021-03-04 10:34:45 +01:00
Laurent Stukkens (LTU) 3e847fc8f4 [FIX] web,hr_timesheet,partner_autocomplete: make multi company timesheet uom work
This commit's primary objective is to ensure that the timesheet uom is working in accordance
with the company settings in a multi company environment.

Prior to this commit:

 - The timesheet preferences sent to the front end were always those of the default
   company of the user.
 - The timesheet related widgets initialisation process (adding the correct ones in
   the fieldRegistry) was performed before the front end treatment of cids and coockies
   which prevented applying the front end selected company settings.

After this commit:

 - A dictionnary is used in the session in order to structure the companies info.
 - The company timesheet preferences are sent to the front end through the company dict.
 - The uom info is sent to the front end through the session.
 - The timesheet uom is now managed from the frontend and is now in sync with the settings.
 - Timesheet widgets are initialised during the AbstractWebClient init and are in sync with
   the multicompany front end settings

task-2168337
Closes: #66551
2021-03-04 10:34:32 +01:00
Laurent Stukkens (LTU) c815ba7d40 [FIX] web: add missing semicolons and typo in multi company files
Before this commit:

 - Some semicolon where missing
 - There was a typo in the variable name

After this commit:

 - The above problems are solved

task-2168337
Closes: #66551
2021-03-04 09:05:47 +01:00
Raphael Collet 08d4707fe3 [FIX] website_event_meet: autovacuum method
Convert the override of method `power_on()` to an `@autovacuum` method.

closes odoo/odoo#67178

X-original-commit: f212223305a4d1da0f01f008c3874a72945fcae0
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-03-03 16:26:58 +00:00
Goffin Simon b6762a0b41 [FIX] sale: Wrong untaxed_amount_to_invoice
Steps to reproduce the bug:

- Let's consider an included tax T (10%) and a product P (11€) with invoicing policy based on delivery
- Create a sale order SO with one line L with 2 P and T
- Confirm SO and deliver it

Bug:

The untaxed_amount_to_invoice was 40€ on L instead 20€

opw:2457660

closes odoo/odoo#67188

X-original-commit: 56d92277f20566d5b652ce713551970d0b7784c0
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-03 18:30:29 +00:00
Odoo's Mergebot 03e2bd9638 [MERGE] sales_team, crm, crm_iap_*: improve reporting usability
PURPOSE

Purpose of this merge is to improve reporting usability
and views in crm, lead generation and iap services.

SPECIFICATIONS

Some usability improvements going to be done by this merge are listed
below.

Improve the action helpers for the actions bound to below listed menus
for better usability:

  * My Activities
  * Leads
  * Leads Analysis

Along with that, this commit also improves the following:

  * while generating leads, make 'Industries' field required on the modal so
    that results obtained are actionable instead of random leads;
  * after trying to generate leads, if no result is found, the same pop-up
    opens again with same criteria and displays a waring in the pop-up. It
    informs users that leads are not found and no credits are spent for their
    last search;
  * improve the warning message for unsuccessful enrichment due to invalid
    email;

This merge adds the color_picker widget for setting valid color of
CRM tags in the form view.

With this merge, the 'Enrich' button on lead now appears only after the
email is set and valid, which previously appeared even if no email is set
or if the value is not a valid email.

Right now, for the fetched contacts through enrichment, we display
name and title in separate columns (in the chatter), that leaves
lesser space for email and phone.

With this commit, we merge name and title columns, and provide a bit
extra space to email and phone so that chances for them being wrapped
in a new line are less. Also, if phone number is not available in any
contacts, the 'Phone' column is hidden, giving even more space for the
Name/Title and Email columns.

LINKS

COM PR odoo/odoo#64075
ENT PR odoo/enterprise#15561
Task ID-2393253

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-04 09:16:26 +01:00
Géry Debongnie 2c777546a7 [FIX] web: prevent traceback when pressing TAB in color_picker widget
The color_picker widget, that can be seen for example in the track form
view for event tracks, had an issue: if the user clicked on it, then
pressed TAB, a traceback was displayed.

The problem comes from the fact that the color picker widget inherits
from FieldInput, but is not a fieldinput, so many expectations made by
the FieldInput code do not hold, such as the code run when handling
navigation (by TAB and such keypress). Because of that, the code in
_onNavigationMove crashed, because it expected an input.

Since this is a bug fix, I simply disabled the navigation in that case,
so no crash happens.  Sadly, this widget has still a big issue: it
clearly does not work as most users would expect: pressing TAB or arrows
should update the selection.  But this would be a more complicated
refactoring, for a bug which is clearly not critical, therefore this
commit implements the simple and safe solution.

Also, we disable the focus outline to minimize the wrong expectation.
Seeing them kind of implied that one could update the selection with the
keyboard.

Note that the widget color_picker was moved from another addon to web/, without
any tests nor documentation.

OPW 2467369

closes odoo/odoo#67195

X-original-commit: 580456b6ab36d16195eae9ffd776ff245ecd936e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-03 22:05:10 +00:00
ijas ahammed 6832d7f3f8 [IMP] crm_iap_lead: merge name and title in enrichment template
Right now, for the fetched contacts through enrichment, we display
name and title in separate columns (in the chatter), that leaves
lesser space for email and phone.

With this commit, we merge name and title columns, and provide a bit
extra space to email and phone so that chances for them being wrapped
in a new line are less. Also, if phone number is not available in any
contacts, the 'Phone' column is hidden, giving even more space for the
Name/Title and Email columns.

Task ID-2393253
COM PR odoo/odoo#64075
2021-03-03 16:04:43 +00:00
ijas ahammed da523d2042 [FIX] crm_iap_lead_enrich: show 'Enrich' button only if email is valid
With this commit, the 'Enrich' button on lead now appears only after the
email is set and valid, which previously appeared even if no email is set
or if the value is not a valid email.

Task ID-2393253
COM PR odoo/odoo#64075
2021-03-03 15:59:42 +00:00
ijas ahammed 52c372352b [IMP] sales_team: add color_picker widget for CRM tags
This commit adds the color_picker widget for setting valid color of
CRM tags in the form view.

Task ID-2393253
COM PR odoo/odoo#64075
2021-03-03 15:58:53 +00:00
ijas ahammed 79476eb349 [IMP] sales_team, crm{_iap}*: improve action helpers and usability
This commit improves the action helpers for the actions bound to below listed
menus for better usability:

  * My Activities
  * Leads
  * Leads Analysis

Along with that, this commit also improves the following:

  * while generating leads, make 'Industries' field required on the modal so
    that results obtained are actionable instead of random leads;
  * after trying to generate leads, if no result is found, the same pop-up
    opens again with same criteria and displays a waring in the pop-up. It
    informs users that leads are not found and no credits are spent for their
    last search;
  * improve the warning message for unsuccessful enrichment due to invalid
    email;

COM PR odoo/odoo#64075
ENT PR odoo/enterprise#15561
Task ID-2393253
2021-03-03 15:56:23 +00:00
Laurent Smet bb839c75cb [FIX] hr_expense: Don't write 'payment_id' on aml
This line was an hack to manage the custom register payment wizard of hr_expense.
Since this wizard is gone and 'payment_id' is a related stored field in account.move.line, we should not write such data explicitely.

closes odoo/odoo#67162

X-original-commit: 2d7f45e76607736bcc4f37bec480967ae2b373d7
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-03-03 14:51:25 +00:00
Odoo's Mergebot 212b107fa1 [MERGE] survey: improve certification templates
PURPOSE

Improve certification templates and make them more aligned with current
state of the art certifications.

SPECIFICATIONS

Design has been completely redone to be more modern.

Also displays dynamic certification number based on the ID of
certification record for both modern and classic layouts. It consists in
minimum 10 digits. It means that if the ID of the record is 5 it is displayed
as 0000000005.

Also improves the behavior by adding name of the certification in page title
so that use can see the proper string on browser tab. For doing so, we create
a new wrapper template that sets the title for the page, and use an iframe
to loads the pdf file from existing controlloer (which returns response for the
preview pdf).

LINKS

Task ID-2341847
COM PR #66028

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-03 18:20:55 +01:00
Lavish Chhatwani 45eb2b397f [IMP] survey: display title on certification preview
Right now while previewing the certification template, the proper title is not
displayed on the tab of browsers.

This commit improves the behavior by adding name of the certification in title
so that use can see the proper string on browser tab. For doing so, we create
a new wrapper template that sets the title for the page, and use an iframe
to loads the pdf file from existing controlloer (which returns response for the
preview pdf).

Task ID-2341847
COM PR odoo/odoo#66028
2021-03-03 16:16:00 +00:00
Dharmraj Jhala 45b448af99 [IMP] survey: display certification number based on ID
This commit displays dynamic certification number based on the ID of
certification record for both modern and classic layouts. It consists in
minimum 10 digits. It means that if the ID of the record is 5 it is displayed
as 0000000005.

Task ID-2341847
COM PR odoo/odoo#66028
2021-03-03 16:14:57 +00:00
Elisabeth DickinsonandDharmrajsinh Jhala ae4435af84 [REF] survey: implement new certificate templates
Improve certification templates and make them more aligned with current
state of the art certifications.

Task ID-2341847
COM PR odoo/odoo#66028

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Dharmrajsinh Jhala <dja@odoo.com>
2021-03-03 16:13:20 +00:00
Julien Castiaux 412973f7d8 [FIX] mass_mailing: wrong clicks_ratio compute
Fine tuning of 2d63fff13be6d19170fb58fd0248e879e2be2de8

closes odoo/odoo#67173

X-original-commit: d4210430a911fb23d6fce5dbd4279f03f134cd2e
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-03-03 15:36:54 +00:00
Géry Debongnie 0cf7b8fd6f [FIX] web: issue with field named "length"
The underscore (_) library has a bug in which the _.each method does not
work with object which contains a "length" property. This is because it
does look for that key and if it is a number, it will assume that it is
an array with that length value.  Nicely done...

If that length value is set to 0, then it will just do nothing, since it
thinks that it is dealing with an empty array.

Note that if the value is set to an object, _.each is smart enough to
notice that it cannot be an array, and will do the correct thing in this
case.

Usually, our _.each calls are safe, since we usually iterate on arrays,
or on object with safe keys, or on object with values that cannot be a
number.

But there was 2 unsafe calls in basic_model, which leads to strange
bugs: some code is skipped, and the form view is then confused.  The
motivation for this fix is the fact that onchanges are not applied at
all, if there is a length field set to 0.

To fix this, we can just avoid using _.each.  Note to every Odoo JS
developers reading this: new Odoo code should avoid using the _ and $
libraries, because we do not really need them, and we want to keep our
dependencies to the strict mininum.

OPW: #2465808
closes odoo/odoo#66126

closes odoo/odoo#67172

X-original-commit: 8dbd1efef899fb637acca3c318ae99cb23838b8f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-03-03 15:36:34 +00:00
Damien Abeloos 72fab547fb [MOV] website_event: move the website_event tour to tests/tours
* Reassign the "event" tour to a classic test
  - Only the "event_tour" that starts from the Event App should be kept from a
    user perspective.
  - The "event" tour that launched itself once upon installing the Event App
    from the Website (Website App) and only covered the front-end part of
    the event creation will now only be kept as a classic test tour.
  - This tour is renamed "website_event_tour" instead of "event" for
    disambiguity with the other tour called "event_tour"

* This tour is now only intended to be used as a test, and as such, is moved
  to `tests/tours`

Task ID : 2410217
PR : #63370
2021-03-03 12:43:30 +00:00
Damien Abeloos 7498f6b87b [IMP] crm: change the search order for a won stage
* The "Mark As Won" button should first look for "won stages" that
  have a higher sequence than the one the opportunity currently is.
  If none is found, then it's "ok" to go to a stage with a lower sequence.

* In Fine, we would like to prevent a "not won" stage to have a higher
  sequence than any "is won" stage. But while this is not the case, searching
  for the "is won" stage while alterning the sequence order will correctly
  handle the following case :
    - stage sequence :
        [x] [x is won] [y] [y is won] [z] [z is won]
    - scenario :
        an opportunity in [y] and marked as "won" should go to [y is won].
        (not in [x is won] nor [z is won])

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
2021-03-03 12:43:30 +00:00
Damien Abeloos b0134452c0 [IMP] crm: add a reschedule action for activities
* Replace the "Snooze 7d" action for lead-related activities linked to
  a calendar event by a "Reschedule" action, which will redirect the user
  to the calendar view with the focus on the next event related to the
  opportunity
    - The "Snooze 7d" action only impacted the activity and not the meeting,
      and snoozing a meeting is not very logical anyway. The "Reschedule" fits
      better in this use case.

* It was discussed to show only a modal allowing to reschedule the next
  calendar event, but that could lead to inconsistent states (out of order
  sequence of scheduled events, if the first is rescheduled after the
  second).

* The reschedule option will be shown next to any activity related to a
  calendar_event regardless of its activity type. There are some edge cases
  that we may want to change in the future :
    - When changing the activity type of a 'meeting' activity associated to
      a calendar event to any other activity type, but without removing the
      calendar event, the reschedule action is still showing (since the event
      is still ongoing and was not deleted from the calendar).
    - Conversely, with a meeting which is not (yet?) related to a calendar event,
      the reschedule action will not be available.

* Add a new field to MailActivityMixin in the calendar module context. This
  field is the event linked to the next activity, if there is one such event.
  It is used to check whether the reschedule action should be available to the user.

* Add a test for this new field to validate the expected behavior.

* Add the priority widget to the priority field in the opportunity tree view

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
2021-03-03 12:43:22 +00:00
Damien Abeloos 67c7460be1 [IMP] web: add an initial_date context key for CalendarView
* This feature will be useful when the user needs to "reschedule" an event.
  It is more convenient to open the CalendarView around the original start date of the
  event instead of "Today"

* Add a test to ensure that the context key is correctly passed to the view as the initialDate

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
2021-03-03 12:25:06 +00:00
Damien Abeloos 498eb0cfed [IMP] event: improve the event form editor and update the tour
* In the Communication tab, prevent inserting multiple duplicate lines
  upon switching template.
    - Before, when the user was switching between templates, the lines
      introduced with the last template were not removed, and the amount of
      lines only kept increasing.
    - Now, only the lines that are linked to a registration are kept

* In the Tickets tab, prevent inserting multiple duplicate lines upon
  switching template (Ticketing) if there was already tickets linked to a registration.
    - Same problem as in the Communication tab, multiple lines could be introduced.
    - Now, only the lines that are linked to a registration are kept

* Add 2 tests (compute mails and tickets) to ensure those behaviors are properly
  maintained in future updates. As the issue occured only in a non-saved Form when
  switching event_type templates, the tests are a little low level (since we have
  to check the computed results directly in the Form).

* Remove the last 2 steps of the event_tour :
    - They are a bit out of scope and they break the rythm (better to end on a high note)

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
2021-03-03 12:24:55 +00:00
Damien Abeloos 8aa1d6ff02 [IMP] mail: revamp the activity type form view
* Reorganize and reword some of the fields for the activity form type view

* The fields `force_next` from `mail.activity.type` and its related
  field from `mail.activity` are removed.
  Instead, a new field `chaining_type`, which is a `selection` will
  improve the readability of the activity_type form. (It is made more
  obvious that the user has to choose between 2 modes :
    - 'Trigger Next Activity': used when the user wants to specify the type of the
      next activity, which will be triggered once the current activity is done
    - 'Suggest Next Activity': used when the user wants to recommend the
      next activity for the user to schedule once the current activity is done

* To be consistent with this change :
    - The field `default_next_type_id` is renamed `triggered_next_type_id`
    - The field `next_type_ids` is renamed `suggested_next_type_ids`

* The field `default_description` is renamed `default_note` to better match the
  `note` field from `mail.activity`

* About the specific case of activity_type.category = 'upload_file' :
    An activity which has this type's category is automatically marked as done as soon as
    the file is uploaded. This prevents the user from choosing a "next activity type".

    As such, an activity_type with this category can only make use of the
    chaining_type = "trigger", to be part of an automated process.

    An activity_type with this chaining_type should have the
    triggered_next_type_id set (usually required in the Form).
    But, since it does not make sense to set suggested_next_type_ids in this case :
      - chaining_type will stay hidden in the Form
      - triggered_next_type_id will always be shown and is not marked as required in the Form
      - if triggered_next_type_id is not set, chaining_type will be "suggest"

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
UPGRADE : https://github.com/odoo/upgrade/pull/2167
2021-03-03 12:12:52 +00:00
Damien Abeloos 62ae7896f5 [IMP] mass_mailing: add various usability improvements
* When clicking on a button that is a preview for a "mass mailing",
  always open it in a new window for the user that is editing the form, so
  that changes are not discarded (when leaving the page).
    - The option "Open in a new window" remains effective for the recipients of the mail.

* Rename Mailing Campaign to Campaign : this is just a mailing campaign,
  they are used everywhere in the marketing scope now. And it can be part of
  a multi-channel campaign.

* Show/hide mailings count depending on settings :
    - Mailing Campaign must be activated in the email marketing settings in
    order to display the Mailings count in the utm.campaign kanban view

* When there is no matching recipient for a mailing campaign,
  properly display 0 / 0 instead of 0 / 1 to better indicate that it is
  not expected that anyone will receive an email.

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
2021-03-03 12:12:52 +00:00
Damien Abeloos 4b1c37160d [IMP] mass_mailing_sms: prevent raising an error in sms mailing
* When the option "Skip Queue" is enabled, there shouldn't be an error
  raised in case there is no matching record for the specified domain
  when clicking on "Launch now".
  (i.e. : no partner/contact associated with a certain number)

  In other words, the user should be allowed to launch a campaign without
  recipient whether its mails or sms, even without a cron rule.

  This was already the case when launching the campaign without skipping
  the queue (= handled by cron).

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
2021-03-03 12:12:52 +00:00
Damien Abeloos 162f3059d5 [IMP] base: modify some displayed texts for res_partner
* Add a new error message upon deleting the partner linked
  to an active user.

* Improve the error message wording upon archiving the partner
  linked to an active user. Add the linked users names at the end of
  the message.

* If the user has 'write' access on res.users, raise a RedirectWarning
  instead of a ValidationError, to offer an easy access to the related users :
    - If there are multiple Users, redirect to a list view.
    - If there is only one User, redirect to the form view.

* Adapt the test_access_deleted_records from test_orm.py to use a more
  basic model : `res.partner.category` (with less business logic), because the
  new unlink error message is dependent on a condition that will throw an error
  in case of multiple unlinks of the same record (MissingError).

* Force close the frontend archive confirmation Dialog since _toggleArchiveState
  may be interrupted by another Warning/Error Dialog. If the new Dialog was the
  redirectWarning, and the user chose to be redirected, the first Dialog would
  stay open even thought the context already changed.

* Modify the placeholders for a partner Name/Company
  -> placeholders will change according to an Individual or a Company.

* Adapt the main_flow tour to correctly select the partner name field on
  mobile (tested in enterprise).

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
2021-03-03 12:12:47 +00:00
lejeune quentin cb4337ebc7 [FIX] hw_drivers: Fix default for action on iot mapping
Some requests are sended without specific action.
So we need set these call to fit to a default action
who is a empty string.

Pull requeste related: 63375

closes odoo/odoo#67089

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-03-02 15:32:41 +00:00
Yannick Tivisse 8bf4c194b7 [IMP] hr: Track job on employee form
closes odoo/odoo#66837

Related: odoo/enterprise#16678
Related: odoo/upgrade#2209
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-25 12:37:56 +00:00
nounoubensebia b3d5ce3f5f [IMP] event(_sale), website_event_track: apply some UX refinements
this commit aims at refining the UX for events, notably:

- create a helper for the magic button on the event_track form, because without
  this the user won't be able to understand what the button does.

- on stage update, the kanban state will be automatically set to "gray"
  beacause when changing stages it does not make sense to keep the previous
  kanban state especially when it is set to "green" or to "red".

- make the cost of the event registration product demo data lower then the sale
  price as it is not normal to have a sale price lower then the cost.

- change the style of the "discover all our events" marketing link in the event
  reminder email template in order to make it pop a bit more for the user as
  this is an important link

Task-2451125

closes odoo/odoo#65613

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-03 13:54:40 +00:00
Thibault Libioulle 4196af9c03 [IMP] web_editor: open external links in new tab
This commit aims to force to open in a new tab out-of-domain hyper-links
in backend html fields.

Previously:
When a user adds a link in an html backend field, the user is free to
choose if the link will open in a new tab or not with a check box.

After this commit:
When a user adds a link in an html backend field, this link opens a new
window if those two conditions are met:
    - The url doesn't begin with the current location origin;
    - The url doesn't begin with a "/", i.e. an internal link
      that has been stripped.

The user doesn't have the check box option.

Remark:
This doesn't affect previously added links BUT if a previously added
link is opened in a LinkDialog, it will be re-rendered following the
conditions hereabove.

Part of https://github.com/odoo/odoo/pull/64622
task-2377544

closes odoo/odoo#64622

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-03 13:46:06 +00:00
Thibault Libioulle 33efcabf93 [IMP] pad: open external links in new tab
This commit aims to change the behaviour of <a> links in readonly pad
widgets.

If the <a> redirects to a page that isn't in the domain (hostname
different of the current location hostname), we open it in a new
browser tab by adding a target.

Limitation: If you use the collaborative pad for a while and then
go back to a web editor html field, you'll have to edit each link
in order that the link opens a new tab by clicking on it.

Part of https://github.com/odoo/odoo/pull/64622
task-2377544
2021-03-03 13:45:18 +00:00
qsm-odoo 0c24a46f9e [IMP] website_form: allow to choose default number with arrow keys
Part of https://github.com/odoo/odoo/pull/47949
task-2011583

closes odoo/odoo#47949

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-26 14:40:49 +00:00
qsm-odoo 25173a4c29 [FIX] website_form, *: remove "Shown on mobile" opt for hidden fields
*: website

Part of https://github.com/odoo/odoo/pull/47949
task-2011583
2021-02-26 14:40:49 +00:00
qsm-odoo 0461714b95 [IMP] website_form: reorganize editor panel options
Part of https://github.com/odoo/odoo/pull/47949
task-2011583
2021-02-26 14:40:49 +00:00
qsm-odoo 8f4c51df24 [IMP] website_form: allow to format form field descriptions
Part of https://github.com/odoo/odoo/pull/47949
task-2011583
2021-02-26 14:40:49 +00:00
fja-odoo 0447f177ad [IMP] website_form: allow to add description to field
It is now possible to add a description to any field.

Part of: https://github.com/odoo/odoo/pull/47949
task-2011583
2021-02-26 14:40:49 +00:00