Commit Graph
144588 Commits
Author SHA1 Message Date
Xavier-Do fdaee845d5 [FIX] base: remove options parameters
Regarding previous commit, the option parameter can be removed
from _get_asset_content api, followed by a nice snowball effect.

Part-of: odoo/odoo#75248
2021-08-26 10:21:10 +00:00
Xavier-Do 2921f60055 [IMP] base: remove dead code
options are not used anymore since 8cc066173d

This was discovered by @d-fence

Part-of: odoo/odoo#75248
2021-08-26 10:21:10 +00:00
Arnaud Joset b19dc63468 [IMP] calendar,google_calendar,microsoft_calendar: allow to create events with non-default attendee state
Before this commit, it was not possible to create events with defined attendee state. The default value was always set.
This was a limitation when the events were part of a recurrence and all events attendee needed to be created with a known state.

To reproduce, one would create a recurrent event, sync it with Google and in Google, 'decline' this event and the following.
The attendee state was not properly set.

closes odoo/odoo#68700

Taskid: 2484335
Related: odoo/upgrade#2537
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-26 10:21:02 +00:00
Arnaud Joset f7d16b4599 [IMP] microsoft_calendar: apply the google_calendar improvements into this module
Several imrovements have been made in google_calendar that affets the efficiency of the sync and the validity of the synched data
This commit apply the more relevant modifications to this module.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:02 +00:00
Arnaud Joset 40fd44f618 [IMP] calendar,google_calendar,microsoft_calendar: Improve UI
Before this commit, the calendar UX was not good enough. The look and feel was not modern.
This commit improves a lot of small details, remove unneeded or not mature features (like the videocall location url).

Counted recurrence now brings a better experience. When weekly or montly recurrences are created, occurences in the past are dismissed but before this commit their number was not adapted.
User would end up with less occurences than the provided number without explanations.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:02 +00:00
Arnaud Joset 24c2d7e9d6 [IMP] google_calendar: move credentials from res_user table to a dedicated table
Before this commit, several token related data were stored on the res_users table. During event sync, the table could be locked and this commit aims to move these data to a dedicated table to avoid bottleneck effets.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:01 +00:00
Arnaud Joset 415d49f3f1 [FIX] calendar: allow to copy event without messing with attendees
Before this commit, when an event was duplicated, the attendee records were shared between copies. Accepting an event in one event would set the same answer on the other.
After this commit, the attendee records are recreated based on the partner and attendee status are reset.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:01 +00:00
Arnaud Joset 966d0fae41 [IMP] calendar,google_calendar,microsoft_calendar: change sync button and attendee status
UI changes:
 * Improve the sync buttons. Before this commit, the buttons would be defined in JS and take more place.
 * Improve the FieldMany2ManyTagsAvatar widget.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:01 +00:00
Arnaud Joset 57dbfff2db [IMP] web: improve calendar view
Before this commit, the calendar filter was a little bit limited: you could add filters to only display events related to these filtered records or display all events.
If you wanted to select all active filters, we had to check all these individual filter.
This commit introduce the possibility to select all existing filter at once or to unselect them. It is quite convenient when a lot of filter are displayed but unchecked.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:00 +00:00
Arnaud Joset bb9f21d945 [IMP] calendar,google_calendar,google_calendar: allow modifying all event in recurrence
Before this commit, it was not possible to reapply all events in recurrence, delete all events of a recurrence or archive them.
This commit remove that limitation by reapplying the recurrence and remove all the existing events. When the events are synched, the action_mass_archive is used and it must ensure that only a request for the recurrency should be sent.
Individual request for each event are not sent.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:00 +00:00
Arnaud Joset 3466ccfe01 [IMP] calendar: allow to display all fields of private events for attendees
Before this commit, attendees were not able to see private event information.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:00 +00:00
Arnaud Joset 9f53946ccf [IMP] calendar: prevent usererror when grouping by private fields.
Before this commit, read_group with private fields would automatically raise an user error, preventing the action.
This commit filter out the private records that the user should not access and display the public ones according to the current user.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:20:59 +00:00
Arnaud Joset 24a36c6c8f [IMP] calendar: rename calendar.contacts model
Before this commit, the 'magic' model calendar.contacts name was misleading. This model is only used to save calendar view preferences in the calendar app.
As the calendar events are already mentionning attendees, partners, users, the 'contact' name for a technical field was confusing.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:20:59 +00:00
Arnaud Joset 8cb96696b8 [MOV] calendar: rename calendar_contact to calendar_filter
Before this commit, the model calendar.contacts was only used for UI purpose and could easily be confused with calendar.attendee or partner_ids.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:20:58 +00:00
Odoo's Mergebot 74101efa6f [MERGE] crm_iap_*: rename and reorder modules
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``.

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.

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

Reorganize addons according to guidelines, notably: split python, views and
data files, rename them according to their content. Globally rename and lint
main code bits.

Add some tests for lead mining and reveal. Provide some light fixes spotted
during code reading.

No functional change should occur with this merge. It contains only code
move and renaming.

LINKS

Task-2630969
Prepares Task-2600047 (code improvements and cleaning)

closes odoo/odoo#75514

Related: odoo/enterprise#20424
Related: odoo/upgrade#2770
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-25 19:48:25 +02:00
Qiuyu (QHO) 463af6f61b [IMP] mail, im_livechat: improve Discuss sidebar
The commit is to refactor the discuss sidebar

 - threads are now organized in categories based on the thread type e.g. chat, channel
 - categories can be folded or unfolded by clicking the category title
 - for active thread, even if the category is folded, it remains under the category title
 - for channel category, a new cog button is added to view all channels
 - the active indicator bar is removed. The active item now is highlighted with a different background color
 - thread avatar is used for livechat, chat and channel
 - for livechat and chat, threads are now sorted by last activity time (pin or message exchange)

closes odoo/odoo#70986

Task-id: 2440073
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-08-25 17:00:06 +00:00
Thibault Delavallée 1644c3d8d1 [FIX] crm_iap_mine: stop refining builtins
Help is a keyword. We may use something else.

Task-2630969
Prepares Task-2600047 (code improvements and cleaning)
COM PR odoo/odoo#75514
2021-08-25 13:10:52 +00:00
Thibault Delavallée 5f24dccd40 [FIX] website_crm_iap_reveal: fix potential loops if iap result is broken
Currently if output from IAP does not hold 'no_result' for each failed
IP address we may end up with a loop. This commit ensures that a void
result for an ip correctly set its views as no_result to avoid endless
loops.

LINKS

Task-2630969
Prepares Task-2600047 (code improvements and cleaning)
COM PR odoo/odoo#75514
2021-08-25 13:10:44 +00:00
Thibault Delavallée f66d487253 [IMP] website_crm_iap_reveal: add tests for reveal
Purpose of this commit is to add some tests related to lead generation through
reveal and website. We add tests checking IAP response management and lead
creation. We introduce a mock for IAP reveal calls, as well as some tool data
generation methods in base IAP mock class available in iap_crm.

We also add some tests for corner cases (credit issue, no result, exception
during call) in order to improve coverage.

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
Thibault Delavallée 5f07a52a30 [IMP] iap, crm_iap_mine: add tests for mine
Purpose of this commit is to add some tests related to mine request. We add
tests checking IAP response management and lead creation. We introduce a
mock for IAP mine calls, as well as some tool data generation methods in
base IAP mock class available in iap_crm.

We also add some tests for corner cases (credit issue, no result, exception
during call) in order to improve coverage.

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:31 +00:00
Thibault Delavallée df824e0a33 [MOV] website_crm: reorganize and guidelinize addon
PURPOSE

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

SPECIFICATIONS

Reorganize module according to guidelines. Notably correctly name files,
split python fiels and views according to their model, split some data
to ease module organization and understanding.

Perform some code re-ordering in some big files in order to have code clearly
separated by main usage and ease future changes.

Quickly lint or update some view names.

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:27 +00:00
Thibault Delavallée fd86521e12 [MOV] website_crm_iap_reveal: reorganize and guidelinize addon
PURPOSE

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

SPECIFICATIONS

Reorganize module according to guidelines. Notably correctly name files,
split python fiels and views according to their model, split some data
to ease module organization and understanding.

Perform some code re-ordering in some big files in order to have code clearly
separated by main usage and ease future changes.

Quickly lint or update some view names.

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:23 +00:00
Thibault Delavallée 7951870b3e [MOV] crm_iap_mine: reorganize and guidelinize addon
PURPOSE

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

SPECIFICATIONS

Reorganize module according to guidelines. Notably correctly name files,
split python fiels and views according to their model, split some data
to ease module organization and understanding.

Perform some code re-ordering in some big files in order to have code clearly
separated by main usage and ease future changes.

Quickly lint or update some view or record names.

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:19 +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
std-odoo 9d13bb4534 [FIX] mail_plugin: fix missing translations
Purpose
=======
Fix missing translations on the Outlook plugin and add them in the
mail plugin module.

Task-2612788

closes odoo/odoo#74399

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-29 12:27:45 +00:00
Ivàn Todorovich 606452598e [REM] website_sale: remove dead extra_info code
Since e4a317a the extra info form is not posted on this controller
anymore. It posts to /website_form/shop.sale.order instead.

closes odoo/odoo#75590

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-25 14:37:24 +00:00
Achraf (abz) 08cde66c6c [FIX] stock: Don't set DO to ready if a move is empty
A stock move with 0 qty in initial demand is considered as 'ready'. But
those stock moves should be excluded of the picking state computation to
not false the readiness of the picking, especially if the delivery
policy is set to 'direct'.

opw-2611018

closes odoo/odoo#75589

X-original-commit: bc7198961583562243b393bd8cd009c5e7220ad0
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-08-25 13:55:31 +00:00
Odoo's Mergebot 33116422df Master mail order tde
closes odoo/odoo#75571

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-25 17:38:25 +02:00
Andrea Grazioso (agr-odoo) 9bda4c25ef [FIX] sale_stock: fix effective picking date
- Create a sale order that generates picking and confirm it.
- Validate the picking  when the local DATE and the GMT DATE
are different (i.e. GMT-4, between local 20:00:00 and 23:59:59)

Effective Date will be different in the SO and the picking

opw-2559308

closes odoo/odoo#75457

X-original-commit: 99fe3477fecc4948ac621fda82d93bf263933f02
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-08-25 13:50:20 +00:00
Thibault Delavallée cc109457cc [REM] mail: remove dead controllers
Some controllers are not called anymore. Let us remove them to remove
unnecessary entry points.

Task-2631873
PR odoo/odoo#75571
2021-08-25 13:12:11 +00:00
Thibault Delavallée 18191b9055 [FIX] mail: fix wrong override of write
Somehow a context parameter was still given to write. This should not happen
in new API (Odoo v8).

Task-2631873
PR odoo/odoo#75571
2021-08-25 13:12:11 +00:00
Thibault Delavallée 1b4e0099d4 [MOV][FIX] mail: quickly reorder code parts, remove dead imports, fix code bits
Reorganize code to ease future additions understanding and setting code
at the right place.

Rename some compute methods to have understandable names.

Remove dead imports.

Fix pytz.utc usage.

No functional change comes with this commit. This is only code move.

Task-2631873
PR odoo/odoo#75571
2021-08-25 13:12:11 +00:00
Thibault Delavallée cb67c23888 [MOV] mail: reorder controllers and views
As mail grows and will continue to grow, ordering views and having right
files is important to understand module organization and content.

Split main.py controller file into two files, one for mail related controllers
(redirections) and one for discuss.

Rename files according to guidelines for wizards and views.

No functional change comes with this commit. This is only code move.

Task-2631873
PR odoo/odoo#75571
2021-08-25 13:12:11 +00:00
Thibault Delavallée 5553ad50bf [MOV] mail: reorder model files
As mail grows and will continue to grow, ordering imports and having right
files naming as well as right content in them is important to understand
module organization and content.

Containing

  * reorder init file to give an overview of models;
  * move ResGroups override in its own file, outside of res_users file;
  * split file containing MailActivity model and MailActivityMixin so that
    mixin is contained in its own file, easing followup;
  * split Activity and ActivityType models into two files;

No functional change comes with this commit. This is only code move.

Task-2631873
PR odoo/odoo#75571
2021-08-25 13:12:11 +00:00
Rémy Voet (ryv) bdc2241260 [IMP] barcodes: Avoid extra request
Avoids to do a RPC if the nomenclature is direclty passed through the
arguments while the barcode parser is initiate.

Also, makes the `load` method always returns a promise.

closes odoo/odoo#72685

Related: odoo/upgrade#2713
Related: odoo/enterprise#19226
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-08-24 15:23:51 +00:00
Rémy Voet (ryv) 0e3dcf091c [IMP] base: add warning if Chrome not installed
For test tours.
2021-08-24 14:13:33 +00:00
Rémy Voet (ryv) 6b6a333e71 [IMP] stock: add related use_existing_lots on picking 2021-08-24 14:13:33 +00:00
Benoit Socias 1aa9a7d76d [FIX] website: avoid losing link focus when clicking on popover
Before this commit clicking between the buttons of the link popover
widget did deselect the link. When this happened, if edit was clicked
and the edited link was one within the popover widget instead of the one
on the page.

After this commit clicking on the popover between the buttons has no
effect anymore.

task-2630257

closes odoo/odoo#75544

X-original-commit: 536f72333297ea70cd06c83d92ab0d8f25c0142e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-08-25 12:02:03 +00:00
Benoit Sociasandqsm-odoo f240a42ab5 [FIX] web: avoid freezing the browser when scrolling to undefined
Before this commit the browser did freeze if scrollTo(undefined) was
called. This happened because our "closestScrollable"'s jQuery addition
entered an infinite recursive exploration of .parent() elements starting
from $(undefined).

After this commit such wrong calls to scrollTo() will not freeze the
browser anymore but crash instead. The closestScrollable function was
also made more robust and return an empty element instead of looping.

task-2630257

X-original-commit: d1cda0f3ebb942ad58273db36692f28fa8a3b197
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-08-25 12:02:03 +00:00
William Braeckman 1285726ff9 [FIX] project_timesheet_holidays: prevent multi-company issue in time
off.

When validating a time off with a company-less time off type, if the
time off type is configured to create timesheet entries in a project, a
multi-company security rule could be triggered by accessing the project.
We now check that the company of the task is valid in the current
context (it would make no sense to have an employee work on a task from
another company anyway) before creating the timesheets.

Closes odoo/odoo#75308

Task ID: 2628148

closes odoo/odoo#75579

X-original-commit: 29662626f7d67480926fbb12986ca644d213151c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
2021-08-25 12:19:18 +00:00
Pierre Paridans 055b1eed65 [FIX] web: backport mobile OS detection support
This commit backports the mobile OS detection support, and specifically
Android & iOS one to allow more specific targeting of edge cases (i.e.
disabling native date picker in the mobile iOS app only).

opw-2613810

closes odoo/odoo#75577

X-original-commit: 7015dcd56566e93418f51e8e3562f384d10b4ffa
Related: odoo/enterprise#20446
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2021-08-25 11:37:41 +00:00
Benoit Socias 78e2546006 [FIX] web_editor: make the background image positioning usable again
Since [1], this commit the controls for the background image positioning
were not accepting events anymore and were below margin handles.

After this commit the controls for the background image positioning can
be used again.

[1]: https://github.com/odoo/odoo/commit/a37f27d08fe2113a81668959d23282e9ae741115

task-2627710

closes odoo/odoo#75576

X-original-commit: e266669361cde6f799683fa6b082777d0f416c57
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-25 11:12:23 +00:00
Zelong Lin ab33ea0282 [FIX] website_slides: prevent crash due to incorrect import
task-2510656

closes odoo/odoo#75573

Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2021-08-25 11:39:04 +00:00
Swapnesh Shah cd709652e3 [FIX] sale_crm: create "customer" partner when converting leads to quotations
When creating a new partner on the fly at lead convert time we should created
a customer-oriented partner. This is done through the use of a specific
``res_partner_search_mode`` context key allowing to handle creation of a
partner flagged as "customer".

closes odoo/odoo#75572

X-original-commit: 7d4d3d8f6582f23cf890aa2ba4d841702e4f3f89
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-25 10:27:05 +00:00
Tiffany Chang (tic) 37c01cd2c4 [FIX] mrp: correctly copy cancelled MO
Missed the case of copying a cancelled MO needing its cancelled
move_finished_ids to still be copied during commit:
79efbd0e4707892041ee7c58c81c1d7edd033edd

Steps to reproduce:
Step 1: make a MO and cancel it
Step 2: duplicate the MO and try to mark as done

Expected result: qty is produced
Actual result: Validation Error about quantity to produce must be
               positive (due to no move_finished_ids)

Follow up to task: 2618962

closes odoo/odoo#75569

X-original-commit: 56e7d4acc59a802c7613c1184858bda5bfb26748
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-08-25 10:06:32 +00:00
Yannick Tivisse 24713b76b5 [REV] fleet: Revert multiple fleet mechanism
I don't get why you don't get it...

Partial revert of the taskID: 2415309
Com PR: https://github.com/odoo/odoo/pull/70313
Ent PR: https://github.com/odoo/enterprise/pull/18114
Upg PR: https://github.com/odoo/upgrade/pull/2447

closes odoo/odoo#75475

Related: odoo/enterprise#20406
Related: odoo/upgrade#2765
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-25 12:20:39 +00:00
alt-odoo b096f2a676 [IMP] lunch: add and order lunch orders by site in confirmation email
In case a vendor needs to deliver to more than one location site, we should
add the location name and address in the email sent to him.

closes odoo/odoo#75423

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-25 06:03:39 +00:00
alt-odoo 1aaef7614d [FIX] lunch: use correct timezone when retrieving today's lines order
On the kanban view to order your lunch, we are retrieving today's order lines for
the current user. In _get_current_lines, we are using today's date without taking
into account the timezone of this user, which can prevent him to see/modify his
order of today in case it was ordered very early.
2021-08-25 06:03:39 +00:00