Commit Graph
141811 Commits
Author SHA1 Message Date
Andrea Grazioso (agr-odoo) 2387a045ab [FIX] sale_management: fix pricelist computation for optional products
1. Have a product with cost A
2. Have a pricelist which modify the price of the product to B based on
the quantity
3. Create a sale order with the pricelist. Under the "Optional
Products" tab add the product and match the pricelist requirements

No price modification will occur, because there is no reaction to the
quantity change

opw-2480696

closes odoo/odoo#68494

X-original-commit: ab24134abb81399acd6ee49c4553aa0930384e37
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-03-29 16:47:28 +00:00
Hendrik 59699c3886 [FIX] stock_account: Fix shadowed 'product' variable in anglo-saxon lines
closes odoo/odoo#68373

X-original-commit: bdace2f538718a521926f0c5d073c05c40e98fac
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Hendrik <hendrikw25@users.noreply.github.com>
2021-03-25 23:09:02 +00:00
Christophe Monniez 0bf5047889 [IMP] base: improve qweb barcode widget
As this backport already exists in saas-14.2 and master, only the
`lxml.html.Element` part is kept in this commit which is a safer way to
build the widget.

closes odoo/odoo#68483

X-original-commit: c891d61802018a14944c22d01316872427a40284
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-03-29 20:23:41 +00:00
Aaron Bohy 835cb1d593 [FIX] web: empty fields don't increase row height
Commit [1] tweaked the empty (unset) fields css rules s.t. they
have a non null height in readonly, to reduce the shift between
readonly and editable form view. This only concerns form view,
but the changed rule also applied in list view. As a consequence,
empty fields increased the rows height in list views.

https://github.com/odoo/odoo/commit/288b24cbdf54ac0dbee7e012f074fac9a0c68238

closes odoo/odoo#68482

X-original-commit: 020b814b3be055c6bf795153dce6079810d34b1c
Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-29 15:24:24 +00:00
fw-bot 4bc3c9303a [FIX] mrp_subcontracting_account: update inventory valuation
This reverts commit cfd68df.
The fix was to not value the subcontracting location while it has to be
valued.

closes odoo/odoo#68499

X-original-commit: b1ba8b48f69919d18b946e4f602b9a136e835d51
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-03-29 18:09:59 +00:00
Laurent Smet 7d7ca00940 [IMP] account_edi_ubl,l10n_be_edi: Use generic values to export invoice EDI
closes odoo/odoo#68190

Related: odoo/enterprise#17216
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-29 17:57:57 +00:00
Laurent Smet 9b993f4af7 [IMP] account_edi[_facturx]: Add generic values to export invoice EDI 2021-03-29 17:57:57 +00:00
Thibault Delavallée 13bf64b376 [FIX] calendar_sms, hr_presence: fix broken acls update on sms.template
odoo/odoo#64626 attempt at improving sms.template rules seems quite broken

  * do not restrict system group to calendar.event: this makes no sense.
    With this fix admins can now only use templates being linked to calendar
    event if calendar_sms is installed which is not really smart. Not sure
    what was the exact original purpose;
  * ir.rule in hr_presence has no use on hr.manager group if they do not
    have any access through access rules. Indeed they are currently
    restricted to read access as all standard internal users;

Task ID-2191254
COM PR odoo/odoo#68445
ENT PR odoo/enterprise#17340

closes odoo/odoo#68495

X-original-commit: 9353dedaf9111e5ee3ab5ed98e3571d5ac83cae8
Related: odoo/enterprise#17359
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-29 16:55:45 +00:00
Jérémy Hennecart 7a02ea0856 [FIX] sms, various: do not restrict read access on sms.template
sms.template model has several record rules to give access to templates
linked to models managed by certain groups (like crm.lead for sales managers)
These record rules were meant to restrict access to certain model to create,
write and unlink, but not read.

This is leading to issues when trying to read a template on other models.
Indeed people should always be able read sms.template content.

Unit test were also added to the sms module to ensure that a member of
group_user can always read a sms template.

Unit test is added to ensure admin always has full control on sms.templates.

Task ID-2191254
COM PR odoo/odoo#68445
ENT PR odoo/enterprise#17340

X-original-commit: 6a00157f79be30a6efd6d039504c57be07c449fd
2021-03-29 16:55:45 +00:00
Odoo's Mergebot 64964c06c3 [IMP] website_blog: add a blog snippet that relies on snippet filters
Before this commit the latest posts snippet implemented the lookup for
its templates and its rendering procedure.

After this commit a new blog posts snippet is introduced which relies on
the dynamic snippet mechanisms.

task-2477207
See https://github.com/odoo/upgrade/pull/2262

closes odoo/odoo#67334

Related: odoo/upgrade#2262
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-29 17:51:50 +02:00
Odoo's Mergebot a7b6a9bf7e [MERGE][ADD] mail_(plugin/client_extension), crm_plugin: be more modular, support multi-contacts / multi-records
PURPOSE

Improve mail_client_extension: be more modular, clean code organization,
support contact and multi-records, ease helpdesk integration.

SPECIFICATIONS: CODE CLEANING

mail_client_extension: split authentication and main controller code. Purpose
is to ease code understanding and split authentication code from business
related code.

crm_*: split crm code from mail_client_extension. Purpose is to allow the
user to use the mail_client_extension without needing to install CRM, this
will also allow the usage of the mail connector in other modules without
the need for CRM.

Rename {crm/mail}_client_extension to {crm/mail}_plugin: easier to read
and to work with.

SPECIFICATIONS: CONTACTS / MULTI RECORDS SUPPORT

This merge adds support for searching multiple contacts using a text query in
the email plugin rather than forcing the user to stick with a single matching
contact. This is done to give more functionality to the user and to enable him
to perform actions (log emails, create opportunities...) on other contacts
and not only on the matched contact. Also add the ability to log emails into
contacts.

Legacy and deprecated routes/methods/actions have not been deleted in order to
ensure that older versions of the plugin would still work after this update,
these are now marked with a comment.

See sub commits for more details about this PR's content and technical
challenges.

LINKS

Task-2427737

closes odoo/odoo#66139

Com-pr: odoo/odoo#66139
Ent-pr: odoo/enterprise#16913
Upg-pr: odoo/upgrade#2156
Related: odoo/upgrade#2156
Related: odoo/enterprise#16913
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-29 16:53:53 +02:00
Benoit Socias e306ec7ca3 [IMP] website_blog: remove the old latest blog posts snippet
Before this commit the old latest blog posts snippet was still
available.

After this commit the old latest blog posts snippet has been removed.

task-2477207
https://github.com/odoo/odoo/pull/67334
See https://github.com/odoo/upgrade/pull/2262
2021-03-29 14:27:58 +00:00
Benoit Socias 3c0d98bcd8 [IMP] website_blog: add a blog snippet that relies on snippet filters
Before this commit the latest posts snippet implemented the lookup for
its templates and its rendering procedure.

After this commit a new blog posts snippet is introduced which relies on
the dynamic snippet mechanisms.

task-2477207
https://github.com/odoo/odoo/pull/67334
2021-03-29 14:27:58 +00:00
Benoit Socias d65101b254 [MOV] website_blog: prepare for blog snippet refactoring
The purpose of this commit is to isolate the move operations that happen
before the refactoring of the blog snippet into a dynamic snippet so
that the refactoring diffs can be understood.

task-2477207
https://github.com/odoo/odoo/pull/67334
2021-03-29 14:27:58 +00:00
nounoubensebia 3d514037bb [REF] [crm_]mail_client_extension: rename to mail_plugin
Rename the mail_client_extension and crm_mail_client_extension modules to
mail_plugin and crm_mail_plugin respectively, purpose is to shorten the name of
the modules as it is now quite big and verbose.

Task-2427737

UPG-PR: https://github.com/odoo/upgrade/pull/2156
COM-PR: https://github.com/odoo/odoo/pull/66139
2021-03-29 14:21:05 +00:00
nounoubensebia 5107028082 [IMP] [crm_]mail_client_extension: add contact & multi-record support
This commit adds support for searching multiple contacts using a text query in
the email plugin rather then forcing the user to stick with a single matching
contact. This is done to give more functionnality to the user and to enable him
to perform actions (log emails, create opportunities...) on other contacts
and not only on the matched contact.

It also brings the following changes:

- Enable the user to create a lead with the email message being directly set
  in the description field, as the user would probable want the email message
  to be included in the lead, this is done through the "crm_lead_create"
  method, which the plugins will use in order to create the lead and send the
  related information, the plugin would then directly redirect the user to the
  lead form view realted to the created lead in edit mode.

- Extra information about the contact (leads, tickets...) are returned directly
  with the contact using the _prepare_contact_values method which other modules
  could override by adding new keys in the returned dictionary to provide more
  data, this is done in order to eliminate the need for the get_modules method
  and also to avoid adding new routes in the sub modules, it also eases the
  future maintenance of the plugins as we can freely add new data without
  breaking older versions of the plugins

- Adds the ability to log emails into contacts, and refactors the logging
  method to make it able to log emails into all "loggable" models, these
  models are returned by the mail_content_logging_models_whitelist method
  which can also be overriden in sub modules to add new loggable models,
  Thus eliminating the need for creating new routes/methods in sub modules
  if we want to log emails into new models

- In case the partner is present in the database, no longer implicitly enrich
  and link a company to the partner, as this can lead to some undesired
  behaviour (the partner  will for example have his related invoices with the
  newly linked company header), the user would still be able to do this but
  only if he explicitly clicks on the enrich button, for this reason the new
  "res_partner_enrich_and_create_company" route has been added in order to
  enrich a partner if the user wants to.

- Add a state to Odoo to know which script Gmail should execute when the
  user is redirected to Gmail.

- change route names from mail_client_extension/... to mail_plugin/...
  because the old mail_client_extension makes route names too long and
  is too verbose.

Legacy and deprecated routes/methods/actions have not been deleted in order to
ensure that older versions of the plugin would still work after this update,
these are now marked with a comment.

Task-2427737

UPG-PR: https://github.com/odoo/upgrade/pull/2156
COM-PR: https://github.com/odoo/odoo/pull/66139
2021-03-29 14:20:08 +00:00
Aurélien Warnon 2bf049fd50 [FIX] crm: reposition tooltip to avoid resize flicker
The tour bubble "animation" that makes it to bounce up and down can cause
issues when its position is at the edge of the bottom of the screen.

In the CRM tour, this would make the window constantly resize to show a
scrollbar and then resize to hide the scrollbar, creating quite a sickening
effect visually.

While waiting for a more "robust" solution on the framework side, we solve this
occurrence of the issue by simply moving the tooltip position on top of the
button instead of below it.

Task-2476595

closes odoo/odoo#68470

X-original-commit: cdb7a8ad7647649ad8f595454aa9dc0464117568
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-29 13:16:41 +00:00
nounoubensebia 6c81ee556f [REF] [crm_]mail_client_extension, base_setup, crm[_iap_lead_enrich], iap: split mail specific and crm specific code
- split the mail_client_extension module onto two modules:
  1) module mail_client_extension having mail/contact specific code,
  depends on iap and contacts only
  2) module crm_mail_client_extension having crm specific code,
  depends on CRM and mail_client_extension.

  Purpose is to allow the user to use the mail_client_extension
  without needing to install CRM, this will also allow
  the usage of the mail connector in other modules without
  the need for CRM.

- add the module_mail_client_extension field to the
  res_config_settings model of the base_setup module
  in order to enable the user to install the
  mail_client_extension module directly from the settings

- move the crm_lead model from the mail_client_extension_module
  to the newly created crm_mail_client_extension_module, as this
  model is no longer needed by the mail_client_extension module
  because it no longer not implemants CRM functionality

- move the iap_enrich_api model from the crm_iap_lead_enrich
  module onto the iap module as it is only related to contacts
  and not to CRM, this way it can be used in other modules such
  as the mail_client_extension module without the need for CRM
  module

Task-2382870
UPG-PR: https://github.com/odoo/upgrade/pull/2156
COM-PR: https://github.com/odoo/odoo/pull/66139
2021-03-29 11:59:11 +00:00
nounoubensebia fa26aaaa07 [MOV] mail_client_extension: split authentication and main controller code
This commit splits the code located in the mail_client_extension module into
two separate files, an "authentication.py" file containing authentication
related code and a "mail_client_extension.py" file containing everything else.

Purpose is to better organize the code and to avoid having a bloated main
controller.

This commit does not change anything functionally, it only moves and refactors
code.

Task-2382870

UPG-PR: https://github.com/odoo/upgrade/pull/2156
COM-PR: https://github.com/odoo/odoo/pull/66139
2021-03-29 11:59:10 +00:00
Tiffany Chang (tic) f338274c9c [IMP] stock: split outgoing moves sort logic in availability report
Currently the non-reserved moves in the availability report are sorted
by priority, date, id (same as reserved moves). This commit makes it so
non-reserved moves are now sorted by reservation_date first + the
previous ones (i.e. different sorting logic from the reserved moves).

The idea is to make it easier to reserve moves according to the set
reservation_method logic. Unfortunately there isn't an easy way to split
the sorting logic and we need to search for some overlapping moves
ordered in a different way.

closes odoo/odoo#65730

Task: 2418907
Related: odoo/upgrade#2143
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-03-29 06:54:30 +00:00
Tiffany Chang (tic) 0d61d3fccb [IMP] mrp, stock: update reservation logic
This commit adds 2 small feature additions to reservation logic:

1. Add another # days parameter for reserve "before scheduled date"
   option for priority moves (i.e. so they can be marked for reservation
   earlier)
2. Add Reserve button in the forecast report

It also cleans up some auto-reserving logic:
- 'at confirm' now has a reservation_date = day of confirmation:
  - removes need to check `reservation_method` when doing automated
    _action_assign (i.e. in scheduler + completed incoming move).
  - allows ordering by reservation_date during automated _action_assign
    for more consistent and logical reservations.

Task: 2418907
Upgrade PR: odoo/upgrade#2143
2021-03-29 06:54:30 +00:00
Odoo's Mergebot c0269814f6 [FW][MERGE] im_livechat, rating, website(_links): fixes multiple issues linked to livechat
This merge fixes various inconsistencies and other bugs in im_livechat and website_livechat apps.

- rename Rated user filter into Rated Operator
- improve livechat window feedback layout: add padding to improve readability of the feedback screen
- use real odoo url for placeholders (contact us)
- apply internal livechat window style to external livechat window: apply missing style rules
to external livechat window in order to make it look like the internal version of the livechat window.
- fix rating values (during rating of the conversation or in livechat channel rating page)
- hide page views information for non website_designer to avoid crash for other user groups.

Task ID: 2301261

closes odoo/odoo#68464

Forward-port-of: odoo/odoo#60549
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-29 14:01:54 +02:00
David Beguin a7b3003f9f [FIX] im_livechat, website_livechat: fix rating values
Rating values have been reviewed to be between 1 and 5 but not in livechat apps.
This commit align rating values.

Task ID-2301261
PR odoo/odoo#60549

X-original-commit: ed408d45e8d35eff94a73e37183cbf2e91833f15
2021-03-29 11:17:48 +00:00
David Beguin 2d715d381c [FIX] im_livechat: apply internal livechat window style to external livechat window
This commit applies missing style rules to external livechat window
in order to make it look like the internal version of the livechat window.

Task ID-2301261
PR odoo/odoo#60549

X-original-commit: da1d2ca0c593e6179b166f94f2e280445e059da7
2021-03-29 11:17:48 +00:00
David Beguin 14167ea884 [FIX] website_livechat: hide visited website.page for non website_designer
When opening the visitor view, if user is not website designer, there was an
access error as only website editor can read website.page model.

This commit applies the website_designer group to page_ids field to avoid crash.
There are no viable solution to show the visited page in stable without changing
the model definition. Hide the info is then the better solution.

Task ID-2301261
PR odoo/odoo#60549

X-original-commit: 69cc2911b52fd17b37fb71544574f63cf09dd17e
2021-03-29 11:17:47 +00:00
David Beguin 14316fbc31 [FIX] im_livechat: fix livechat usability
Fix issues in livechat display

  * rename Rated user filter into Rated Operator
  * add padding to improve readability of the feedback screen in the livechat
window.
  * fixed URL in placeholders to match existing "contactus" page URL

Task ID-2301261
PR odoo/odoo#60549

X-original-commit: 60e27876bb7ccdd6a6f871db82d44ac194b6f739
2021-03-29 11:17:47 +00:00
Simon Genin (ges) 51e660c47e [IMP] web: align date range widget behavior with date picker's.
The range date lib would open the selector on focus.
This is a behavior we don't want in lists, but want to keep in quickedit
forms.

Task id: 2492914

closes odoo/odoo#68390

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-29 09:38:07 +00:00
Stephane Debauche 132157fc2a [FIX] website_mail_channel: fix archive groups statistics computation
Compute reliable statistics independently from actual ACLs.

Task ID-2078313

closes odoo/odoo#68450

X-original-commit: fa42fd0575769d737112125dded63eef05a6dd3d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-29 09:05:43 +00:00
Benoit Socias 9cacad4b2a [FIX] website_sale: remove remaining parts of recenlty viewed products
Before this commit some references to the old recently viewed products
snippet were remaining.

After this commit there are no references to the old recently viewed
products snippet anymore.

closes odoo/odoo#68446

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-29 08:07:36 +00:00
Pierre Masereel cd51c0c98a [IMP] point_of_sale: fix attribute type default value
When you are creating product attributes from the point_of-sale menu
item, the default type of attribute is never.

Those changes has been done because, there is a new feature that show a
product configurator in POS for a product having attributes "never".

closes odoo/odoo#68444

Task-id: 2342501
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-03-29 07:21:30 +00:00
JF Aubert 3fbfbf02ce [FIX] uom: allow ratio change
Allow unit of measure ratio change when there are no product currently reserved
or in stock using this unit of measure.

opw-2455914

closes odoo/odoo#67827

X-original-commit: d78238843ea8933b62d340d1b231a12e94bbf957
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Jean-François Aubert <ajf-odoo@users.noreply.github.com>
2021-03-15 10:22:09 +00:00
Nicolas Lempereur 26b29de7d2 [FIX] web_editor: no quick edit on html link click
When clicking on link in html fields, we do not wish to start quick
edition. With this change this is excluded.

closes #68023

closes odoo/odoo#68212

X-original-commit: ecbdddbf0cff0964b44e7f0571d372ccbd051a72
Related: odoo/enterprise#17235
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-22 16:59:38 +00:00
Nicolas Lempereur 0e004e1b7c [FIX] web: no quick edit on mouse text selection
Do not trigger quick edit when we are selection text with mouse:

- click and holding to select text
- multiple clicks selecting text

Since click on an editable field now change the edit mode, we could no
longer select the text.

With this change, quick edit is delayed by a given delay and if the edit
mode is not enabled if:

- there is a subsequent click within the delay
- there is a text selection when the click event is handled

closes #68023

X-original-commit: 2939ea4dd4736e659cc3e4df2226a3b08ac8ec48
2021-03-22 16:59:38 +00:00
Tiffany Chang (tic) 0de75b228a [FIX] stock: remove broken doc link
Remove obsolete quality documentation link (added after v14, hence 2
separate PRs).

Related PR: odoo/odoo#68135

closes odoo/odoo#68228

Task: 2457087
X-original-commit: 0994751d2966c9284341f96b7924b7fa9848d282
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Tiffany Chang <ticodoo@users.noreply.github.com>
2021-03-23 10:17:02 +00:00
Alexandre Kühn f5acf714b0 [FIX] mail: no traceback on uploading attachment
Task-2486731

closes odoo/odoo#68431

X-original-commit: fb713f58b20835bd9bc5257f87817628ff1cf69a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 22:17:10 +00:00
Dhruv Patel 0faeb2b769 [FIX] mail: chatter autoloading loads more messages too quickly
if you check on any chatter with a lot of messages, you will see that it starts
loading all the messages as soon as you scroll down even just 1 pixel.
This makes a lot of loading of the messages for no reason unnecessarily.
What should happen instead is that it should load more message only when
scrolling all the way down to the bottom.This works fine in chatwindow & discuss.

With this commit, resolved this issue by providing the exact scrollable element
to the message list from parent component to the child. so with proper element
we can have proper scrollable heights and other dimensions as well to handle
load more messages properly.

Task : 2382735

closes odoo/odoo#68430

X-original-commit: 63b15e23d95b310a12bdbc30c983081ed84187a3
Related: odoo/enterprise#17335
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 20:34:16 +00:00
Odoo's Mergebot a86382ffa2 [IMP] website, website_sale: support recently viewed in product snippet
Before this commit the recently viewed products were handled differently
from the dynamic product snippet.

After this commit the dynamic product snippet supports the functionality
of the recently viewed products snippet:
- its template used to show each product
- its filter of displayed products
- its "Add to cart" feature (with the animation)
- its "Forget" feature (only applicable when viewing recently viewed)
Also added "Accessories" and "Recently Sold With" filterings.

Several kinds of filtering can be combined.
- Products can be restricted to a given category
  - Pseudo categories for all products or current category can be used
- Products can be restricted to matching names
- Products can be obtained from one of the following:
  - Newest
  - Latest sold: ordered by descending frequency in last 8 orders
  - Latest viewed
  - Accessories (of the current product)
  - Recently sold with (the current product)
Accessories and recently sold with are only available in product pages.

Also, generic templates have been considered useless and the whole
mechanism allowing them has been removed (this includes the
pre-rendering mechanism for the fields specified in the filter).

task-2453416
See https://github.com/odoo/upgrade/pull/2153

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

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

closes odoo/odoo#65554

Related: odoo/upgrade#2153
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-26 23:34:42 +01:00
Priyanka Kakadiya fc34260bee [FIX] mail: command suggestion should only show if '/' is first char
PURPOSE:

command suggestion should only open if command is the first char.

SPECIFICATION:

command suggestion should only open if command is the first char.

Task-2487518

closes odoo/odoo#68428

X-original-commit: 2208a9b5e18881f5fbfea56872990daafba45579
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 19:52:37 +00:00
Xavier Dubuc 49663be314 [FIX] mail: fix attachment preview for previewable files
task-2412150

closes odoo/odoo#68427

X-original-commit: 2e1bcb079ec361d85a80d790b8a2cc395055f09a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 19:51:11 +00:00
Priyanka Kakadiya 725a1b674d [FIX] mail: do not show typing when using a / command
PURPOSE:

Currently typing status is sent when typing a command.

SPECIFICATION:

Typing status should not be sent when typing a command.

Task-2363267

closes odoo/odoo#68424

X-original-commit: 7f28e68776849993f16b4b27e6213c0cce67de37
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 19:04:07 +00:00
Benoit Socias 3355dc1623 [REF] website, website_sale: support recently viewed in product snippet
Before this commit the recently viewed products were handled differently
from the dynamic product snippet.

After this commit the dynamic product snippet supports the functionality
of the recently viewed products snippet:
- its template used to show each product
- its filter of displayed products
- its "Add to cart" feature (with the animation)
- its "Forget" feature (only applicable when viewing recently viewed)
Also added "Accessories" and "Recently Sold With" filterings.

Several kinds of filtering can be combined.
- Products can be restricted to a given category
  - Pseudo categories for all products or current category can be used
- Products can be restricted to matching names
- Products can be obtained from one of the following:
  - Newest
  - Latest sold: ordered by descending frequency in last 8 orders
  - Latest viewed
  - Accessories (of the current product)
  - Recently sold with (the current product)
Accessories and recently sold with are only available in product pages.

Also, generic templates have been considered useless and the whole
mechanism allowing them has been removed (this includes the
pre-rendering mechanism for the fields specified in the filter).

task-2453416
https://github.com/odoo/odoo/pull/65554
2021-03-26 15:41:44 +00:00
Benoit Socias 429f9b70af [IMP] website, website_sale: remove recently viewed products
Before this commit recently viewed products included below the single
product details were a specific snippet.

After this commit recently viewed products has been removed and
cross-product drop areas have been added to the product page.

task-2453416
https://github.com/odoo/odoo/pull/65554
See https://github.com/odoo/upgrade/pull/2153
2021-03-26 15:41:13 +00:00
Nicolas Lempereur 8a5d22826c [FIX] website_forum: show normal image modal in forum
In #67893 the image icon was removed, but it contradicts the interface
and made a feature that was working for employee less available.

Since saas-12.3, we always use the full media dialog when showing the
editor on the forum so we could not add an image with the image icon if
were not an employee.

Before saas-12.3, the original summernote image dialog was shown for
everyone but website editor that saw the full media dialog (beecause we
are using the same editor to do both things).

With this change, we always have the original dialog in the forum
message editor thanks to a new option "disableFullMediaDialog".

opw-2470720

closes odoo/odoo#68166

X-original-commit: c026c360fb77ce43f47f7645f48e37bced988b85
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-03-19 18:30:00 +00:00
Ipsita Borisagar 5c4133f074 [IMP] mail: display subject in chatter
PURPOSE

Currently subject of message is visible in Discuss' Inbox and mailing channels,
need to add subject into chatter and non mailing channels.

SPECIFICATION

Adding subject into the message in chatter and non mailing channels.

LINKS

PR https://github.com/odoo/odoo/pull/61570
Task-2156170

closes odoo/odoo#61570

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-23 10:11:37 +00:00
Julien Castiaux 7a235c19ff [IMP] core: Deprecate cr.autocommit(True)
Since Odoo 13.0 and the refactor of the internal synchronisation between
the cache and the database, it is unsafe to use the ORM with the cursor
in autocommit mode. The function is deprecated for removal in the
future.

closes odoo/odoo#68313

Task: 2442905
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-03-26 16:10:12 +00:00
Adrien Dieudonne 19f21e364e [FIX] hr_skills: Employee resume alignment on mobile
Before this commit, you had to scroll horizontally to see
some options like "add" and "delete" in the "resumé" tab.
It's because long titles aren't break to the next line.

.o_resume_line_title had "white-space: nowrap" property because
of list view global rules.

Steps to reproduce:
- Go to "Employee"
- Select "Mitchell Admin"
- See "Université Libre de Bruxelles - Polytechnique" as title

closes odoo/odoo#68385

Task-id: 1929043
X-original-commit: ca0d8978b6585fe4f96100df56b8a7346468dc6c
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-03-26 12:10:09 +00:00
Romain Derie 7cdf04df67 [IMP] website: add qweb view to see view hierarchy
The core website behavior is the COW (copy on write) which makes it possible to
handle multiple websites on a single database.

When you do a CRUD operation on an `ir.ui.view` in a website context, the ORM
normal behavior is bypass to perform special stuff, such as:
  - Write: if the view is generic (no `website_id`), we bifurcate the write on
           the specific view (same `key` but with `website_id` set). If that
           view doesn't exist, we create it and fork its whole descending
           hierarchy. This write behavior is known as COW.
  - Create: we ensure that view is created only for the website and no other.
            Basically we just add a `website_id` to that view, but it might
            also be about setting the correct `inherit_id` by finding the
            specific view among multiple views with the same `key`.
  - Unlink: if the view is generic, we will unlink that view but also create a
            copy of that view for every other websites so they remain
            unmodified: this is known as COU (copy on unlink).

All those behavior aims to satisfy to the multi website holy grail:
 -- Any modification in a website context should never impact another website --

Because of those uncommon behaviors, it is sometimes hard to understand or
investigate a database, as views might be copied, up to the point where there
is multiple whole view hierarchies.

This commit attempts to create an user interface to easily figure what's going
on in a database at an `ir.ui.view` level.
The mains advantages of that new `ir.ui.view` Qweb view is to:
  - easily figure which views are COW'd on which website
  - easily detect which views have a real `arch` modification
  - easily see that `arch` change

Closes #63040

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-26 15:29:42 +00:00
Romain Derie 905c9b52a7 [IMP] base: add filter on ir.ui.view to filter modified views
Closes #63040
2021-03-26 13:52:02 +00:00
Romain Derie fd0538c5b8 [IMP] website: clean website views file
Regroup, reorder and section comment

Closes #63040
2021-03-26 13:52:02 +00:00
Olivier Dony 9427804ef4 [FIX] ir.cron: execute jobs in priority order (again)
The selection mechanism selects 1 job at a time from the jobs that are
ready to execute, but while doing this it should respect the `priority`
defined on the jobs. Otherwise the field is useless, and the user has no
way to ensure that a long-running job does not cause starvation.
(Assuming execution resources that are insufficient for 100% of the
processing to happen)

The `priority` ordering was apparently lost during the introduction of
the trigger mechanism in #62124 via
4b28f1162a.
It was previously taken into account in `_process_jobs()`.

The `ORDER BY` is not strictly necessary in `_get_all_ready_jobs()`, but
it seems more consistent for this method to return an ordered list as
well, given the semantics of the `priority` field. We don't know what
the caller will do with the result.

closes odoo/odoo#68411

X-original-commit: 9d570662b4016b5cd9ad3c85abbcb5428c169cc6
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-03-26 15:04:23 +00:00