Commit Graph
151076 Commits
Author SHA1 Message Date
Samuel Degueldre 92497ed4f1 [FIX] web: fix tooling failing to run due to bash-specific syntax
In #86163 we added a check on the branch name to avoid running the
tooling on stable branches, however this check used bash-specific
syntax. While the hashbang in the pre-commit hook specifies that the
hook should be run using bash, we were using the npm module "husky" to
manage git hooks, which would ignore this hashbang and always run the
hook using sh, causing the hook to fail in all cases.

After some consideration, we have decided to stop using husky, as its
main purpose is to make hook management easier in npm-based projects.
Since we already need a script to enable the tooling, we can do
essentially the same thing that husky is doing but with more control
over the process with no drawbacks.

closes odoo/odoo#87436

X-original-commit: 3104ab16ecf88d4f7b1618db4d62e7f57df34e6c
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-03-29 12:00:11 +02:00
tsm-odoo ccdd00303d [IMP] mail: remove activity menu fake model
task-2792108

closes odoo/odoo#87434

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-29 12:00:07 +02:00
tsm-odoo 0c847108ac [IMP] mail: register m2x avatar user fake model
In preparation of test adaptation after introducing a new way to
seed test data, the fake model present on the m2x avatar user test
have been registered to the model definitions instead of being
declared on it's test.

task-2792108

closes odoo/odoo#87433

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-29 12:00:04 +02:00
Laurent Desausoi (lade) b1d21f126a [FIX] base: Change state_id DIF to CMX for Mexico City
There has been a change in the code for the state_id for Mexico City. Since the beginning of 2022, the new code is CMX instead of DIF.

opw-2801208

closes odoo/odoo#87419

X-original-commit: fd72db46667e4e612a0f1d70a9e3e3ccf163de43
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
2022-03-29 12:00:00 +02:00
William Henrotin 2b003b8d39 [FIX] mrp: always confirm empty production
Before this commit, production created via `_run_manufacture()` without
bom or with a bom without component, will not be confirmed because of b4fd050e20c1

closes odoo/odoo#87412

Task: 2802652
X-original-commit: 27a651f01fa5868295d2dafa7d4e03ce896e64c9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-03-29 11:59:56 +02:00
Zelong Lin 74696cab83 [IMP] mail, hr: constraints when channel_type is not 'channel'
The group_public_id and group_id and subscription_department_ids
should only be used when the channel_type is 'channel'.

task-2766712

closes odoo/odoo#84813

Related: odoo/upgrade#3266
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-29 11:59:45 +02:00
roen-odoo 739ab40e38 [FIX] point_of_sale: Fix traceback for multistep routes in PoS
Current behavior:
When you have multistep routes activated for a warehouse and SN/Lots activated
you have a traceback when trying to validate an order in the Point of sale

Steps to reproduce:
- In the Inventory App, set a 2 or 3-Step Delivery for a warehouse.
- Set a product to be tracked by Lots or Serial Number.
- Activate "Ship Later" in a POS shop.
- Set the 2 or 3-Step Delivery route in the "Ship Later" section.
- Open POS Shop.
- Select product that has a Lot/SN.
- Set any Customer.
- Set any payment method.
- Select "Ship Later".
- Validate Order.
- A traceback appears

opw-2779462

closes odoo/odoo#87437

X-original-commit: 696371f3316e3df3784eeaed4b1b9449ce36690a
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-03-29 10:56:43 +02:00
Thibault Francois fc65ae4dfe [FIX] cloc: do not count studio qweb
Since
https://github.com/odoo/odoo/commit/d2e0b48271dbd8cd7bbdbc5c2c1649c55c51417b,
qweb view from imported module are counted. the issue is that qweb view
created with the wysiwig editor of studio got an external ID from
studio_customization module which is declared as imported

So those views were wrongly counted for the maintenance fee.

Solution
--------
Exclude qweb view from studio_customization module

closes odoo/odoo#87424

X-original-commit: 77db024140e4f7c9ae8e6b5eb95de857afbab0da
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-03-29 10:56:40 +02:00
Florian Damhaut d9f16de7bb [FIX] microsoft_calendar: Send html description to outlook
Step to reproduce:
- Create a with a link in the decription
- Edit + Save multiple times

Current behaviour :
- Since c2b545fd8d91b7d24380ada07adee02f24623ecf we fetch the full
description with html tags which are rendered via the
- When we resend this message to outlook, the description
 will be updated via html2plaintext.
 In the case of URL, they will be added as a footnote and thus
 duplicated if the url is it's own name

Behaviour after thr PR:
- We could then also send the description with the html tags to
ensure full compatibility between the description
- Using html2plaintext update the descrtiption to markdown, with some
issues, since html is now supported in the odoo editor, using
html on both end will remove the need to use html2plaintext and
the descriptions changes stemming from it.

opw-2746358

closes odoo/odoo#87411

X-original-commit: 4c3b69a30d5724dfef2b179ac8eaeecb8ff3da42
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2022-03-29 10:56:36 +02:00
dbkosky 57874da264 [FIX] account_edi_proxy_user: update test server url
The proxy test server has been updated, and there is a new url, this
commit updates the default server constant in the code to match the new
url.

closes odoo/odoo#87271

X-original-commit: d1485227096a6bf1d473c6d3c26ca54dbffbe3e0
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2022-03-29 10:56:30 +02:00
Victor Feyens b3869ab297 [IMP] resource, hr: avoid updating resources directly after their creation
Make sure related values are correctly propagated to the
resource.resource creation, and discard the inverse update post record
creation when it doesn't change anything

closes odoo/odoo#85601

Related: odoo/enterprise#25664
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-29 10:56:25 +02:00
Victor Feyens c8404ca846 [IMP] hr: improve employees creation speed
* post onboarding notes in batch
* subscribe users in batch
* Only fetch the menu_hr_root data once, instead of once for each record 
created.

Part-of: odoo/odoo#85601
2022-03-29 10:56:25 +02:00
Gorash 7ddf8e4d21 [IMP] base: modify the structure of generated methods
This flat structure makes caching easier if odoo adds shared caches for
example. In addition, the use of idempotent names makes it possible to
compare methods during development.

closes odoo/odoo#85110

Related: odoo/design-themes#554
Related: odoo/enterprise#24622
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-03-29 10:56:17 +02:00
Gorash ca4fe12a37 [IMP] base: rename var option into compile_context
In order to make it easier to understand the code of qweb.

Part-of: odoo/odoo#85110
2022-03-29 10:56:16 +02:00
Martin Trigaux 1d8f6a5bcd [REF] base: new report methods api.model
That use report references and no recordset.
This avoids mixing environment of rendering and access to the report object.

Part-of: odoo/odoo#85110
2022-03-29 10:56:16 +02:00
Martin Trigaux a9db04a719 [FIX] base: make _prepare_html a api.model
It is used in account.tour.upload.bill without a record

Part-of: odoo/odoo#85110
2022-03-29 10:56:16 +02:00
Martin Trigaux f41ec39abe [IMP] base: get_view_id becomes private
Add new helper get_view
Remove dangerous documented comment

Part-of: odoo/odoo#85110
2022-03-29 10:56:16 +02:00
Gorash 6498333850 [IMP] base: remove get_view_xmlid method
Part-of: odoo/odoo#85110
2022-03-29 10:56:15 +02:00
Gorash 880954ebfc [IMP] *: remove _render from ir.ui.view and simplify report
There were inconsistencies in the calls to `_render`.
* the view context could contain information that misled developers.
Indeed, the context and value of the view are not supposed to be found
in the rendering. Thus by calling `ir.qweb` with the name of the
template, we ensure that there is no unwanted information and in
addition the cache key is that of the name of the template which saves
a query.
* the context used for rendering was modified by a method on
`ir.ui.view`, except this is not information used by this model. There
is now a `_prepare_environment` method residing on `ir.qweb`. This
method allows to modify the value dictionary as well as the context in
which the rendering will be done. This preparation of the data as well
as my security check is done only once per rendering. This also saves
some queries
* Freeze options for rendering were inconsistent. It could be that
options on which rendering depends were not part of the cache key. Thus,
depending on the user who generated the generation of the rendering
function, there was or was not information in the template. For example
for automatic branding. This is no longer possible, because it is the
context that is used. The options serving as a cache key are only
recorded for information (for the profiling system for example). A
simplification of the `ir.qweb.field` models could be made.

The report rendering and call `ir.qweb` instead of `ir.ui.view`.

Part-of: odoo/odoo#85110
2022-03-29 10:56:15 +02:00
Gorash a327b2ec8a [IMP] http_routing: display UserError from Qweb error
Part-of: odoo/odoo#85110
2022-03-29 10:56:15 +02:00
Andrea Colangelo 17eab595f0 [CLA] Andrea Colangelo
closes odoo/odoo#87399

X-original-commit: 164e84869d96406a8685591313d59daa6bb754b5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-03-29 09:54:48 +02:00
Thibault Libioulle 2e7cc0d82f [IMP] payment{,_stripe},{,website_}sale: clean up stripe connect code
This commit removes deprecated actions and methods kept after the merge
of PR #79621 in stable.

Follow-up
task-2685160

closes odoo/odoo#84789

Related: odoo/upgrade#3256
Related: odoo/enterprise#25369
Signed-off-by: Thibault Libioulle (tle) <tle@odoo.com>
2022-03-29 08:57:43 +02:00
Olivier Dony 4c98b836d4 [FIX] reqs: bump deps for deployments without security backports
Update the default requirements according to latest security risks in
relevant dependencies. The baseline required version is kept in
comments, and it perfectly safe to use when security backports are
present. In other words, using the official Debian/Ubuntu packages
on a supported LTS version of these operating systems, with
unattended upgrades turned on, is a simpler safe option.

closes odoo/odoo#87397

X-original-commit: b488bd8f88a56af553c090351ff6b2ecdfb411dc
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Olivier Dony <odo@odoo.com>
2022-03-29 02:27:49 +02:00
roen-odoo 1dd6fa6b64 [FIX] hr_timesheet: Fix traceback when grouping timesheets by date
Current behavior:
When accessing your timesheets with /my/timesheets/ and changing language to something else than english
you get a traceback

Steps to reproduce:
- Have timesheets app installed
- Have atleast one other language than english installed (e.g French)
- Go to /my/timesheets and group the timesheets by date
- Change the language by accessing for example fr_FR/my/timesheets
- You get a traceback, because we try to convert a string into a datetime object wich is not working correctly with different languages

opw-2785268

closes odoo/odoo#87381

X-original-commit: 5e3ee492c97dddb6f9430144429febfa6327d4d0
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-03-29 01:20:30 +02:00
Jinjiu Liu ed9814059b [FIX] website_slides: added redirection for invalid slide URLs
Reproduction:
1. Install eLearning, delete sitemap.xml from Settings->Technical->
Database structure -> Attachment
2. Regenerate sitemap.xml by opening odoo.com(or localhost)/sitemap.xml
3. Open a URL, for example,
http://odoo14:6014/slides/slide/tools-and-methods-25
4. A ValueError is thrown

Reason: the URL generation for model slide.slide uses the default
method, which doesn’t filter out the category slides. An example of a
category is: http://odoo14:6014/slides/slide/unforgettable-tools-28 The
tools-and-methods is a category in the course content

Fix: Added a special case for category slides. If it's a category,
redirect to the channel's homepage

opw-2579913

closes odoo/odoo#87369

X-original-commit: eca5ea22624268eaccc5cf9fa7585d51cb6d16cc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-29 00:09:10 +02:00
Fabio Barbero 101c08011a [IMP] digest: update documentation links
Purpose
=======
Update documentation links for digest in settings menu.

Task-2800588

closes odoo/odoo#87351

X-original-commit: ca7502b0c2d46dd16547272cec0265c8c4aeca8e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-29 00:09:07 +02:00
Fabio Barbero 1356a490e1 [IMP] digest, *: show pictures stored on Odoo
Purpose
=======
Pictures from the digest emails are currently stored on the database
itself, meaning that if the database expires (e.g. after trial expires) all
pictures from previously sent emails won't be visible.
This is an issue since digest tips are meant as a marketing tool to bring
people to Odoo after trying a database.

Digest pictures are now taken from Odoo's server
(https://download.odoocdn.com/digests) so that the pictures will still
be visible after the database has expired.

From this commit onwards, it should not be allowed to change a digest
picture with the same name (to display a gif of a newer version), since
all databases with previous versions would receive pictures of a version
that does not correspond to theirs.

This also means that everyone client's Odoo  server will contain pictures
that are never used. This could be fixed if Odoo stored them somewhere
else and didn't make them dependent from the git repository.

Task-2372195

closes odoo/odoo#87343

X-original-commit: 35157677a2a63a2559a72aff21e62e23a3c671a2
Related: odoo/enterprise#25654
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-29 00:08:59 +02:00
Fabio Barbero 71bcd3bca7 [IMP] digest, *: update digest pictures
Purpose
=======
Update pictures with higher quality, up-to-date equivalent.

Task-2372195

X-original-commit: 476ca7e5abfbe25f7375a426a249da6fb41098cf
Part-of: odoo/odoo#87343
2022-03-29 00:08:59 +02:00
Victor Feyens 57cd8080ee [FIX] website_sale: do not assign public/portal user as salesman
for orders created on the e-commerce

closes odoo/odoo#87337

X-original-commit: 3c377de0f14fff1b4448220c0a373dab7b800e27
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-28 23:10:56 +02:00
Zelong Lin 72cf79a1ff [IMP] mail: channel_type cannot be changed
get prevention when transforming the channel type.

task-2774330

closes odoo/odoo#85128

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 23:10:49 +02:00
William Braeckman 2a1928eef7 [IMP] website_sale: disable archived variants
Prior to this commit archived variants would not appear as disabled
 in the shop, the different options will now be greyd out if selecting
 them would result in an archived variant.

TaskId-2762122

closes odoo/odoo#84711

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-28 21:45:49 +02:00
Yannick Tivisse 0a84221920 [FIX] sale_coupon: Prevent already encoded-expired coupons to be used
closes odoo/odoo#79022

Taskid: 2439224
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-28 19:58:50 +02:00
Jérémy Hennecart (jeh) 32c2321097 [IMP] crm: improve format of duration in log meeting
Instead of displaying the float duration in the log, we display it
with this format:
1.5 => 1 hour 30 minutes
0.5 => 30 minutes

task-2665863

closes odoo/odoo#87057

Related: odoo/enterprise#21799
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-28 19:58:42 +02:00
tsm-odoo b168313f0e [IMP] mail: adapt component tests data seeding
This PR adapts mail components tests after the introduction
of a new way to seed test data.

task-2792108

closes odoo/odoo#86655

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 19:00:00 +02:00
Tiffany Chang (tic) bee32f88d4 [IMP] repair,stock: allow creation/link of repairs from returns
This feature supports the use case of:
- a customer receives a delivery from you.
- there is a defective product in the delivery
- they schedule a repair (RO) + return (picking) for the product

We want to ease the creation/management of the repair order associated
with the return, therefore the following features are added:

- Create links between ROs and return pickings (smart button in return
  of all repairs associated with it + field in RO)
- Option (requires active setting) to create RO(s) directly from a
  return picking

Implementation notes:
- Because return picking type doesn't have its own "Type of Operation"
  (it is 'code'='incoming'), we default to only incoming picking types
  that have at least 1 other picking type it is the
  'return_picking_type_id' of.
- Originally a Wizard for choosing which/how many products should have
  ROs created for them was designed (i.e. to match return wizard + to
  multi-create ROs), but this was determined to be too complicated due
  to SN/lot selection. Instead simple approach of creating a single RO
  each time button is pushed was implemented to match the helpdesk >
  repair button workflow.
- ROs are purposely allowed for 'draft' and 'cancelled' returns/moves to
  support different types of workflows (e.g. RO is confirmed before
  return is)

closes odoo/odoo#85157

Task: 2732517
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-03-28 18:59:57 +02:00
Tiffany Chang (tic) bee16a76ab [IMP] stock: add missing button hotkey
Based on spreadsheet from task: 2588233, `action_assign` button is
supposed to have data-hotkey="q", but it doesn't. It was probably missed
by accident so we add it in now.

Discovered during task: 2732517

Part-of: odoo/odoo#85157
2022-03-28 18:59:56 +02:00
William Braeckman 9da54951e8 [IMP] website_sale: Update attribute display type in front
Allow editing the attribute's display type from the front end using the
web editor.

Closes: odoo/odoo#85153

TaskId-2675390

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-28 18:59:51 +02:00
Alexandre Kühn d7dea4c68d [IMP] mail: turn "Rtc/pingInterval" into field
Task-2734101

closes odoo/odoo#85029

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-28 18:59:47 +02:00
Antoine Guenet 62f9e01d92 [REF] mass_mailing, web_editor: don't redefine target in generic methods
Commit [1] redefined the target in generic methods of snippet options so
that some buttons of the Design Tab snippet option could target a
different node than their parent option. This reverts that in favor of
the more generic `apply-to` data attribute.

[1]: c4bfedc37b

closes odoo/odoo#87325

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-28 17:55:28 +02:00
tsm-odoo a3607cae81 [IMP] mail: remove fake model for FieldMany2ManyTagsEmail tests
task-2792108

closes odoo/odoo#87303

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 17:55:24 +02:00
Alexandre Kühn 39c778c611 [IMP] mail: create 'RtcSession/isCurrentUserInitiatorOfConnectionOffer'
This is exactly the field 'RtcSession/isConnected', but it was badly named.

Task-2734101

closes odoo/odoo#87284

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-28 17:55:20 +02:00
Sébastien Theys 3e249661af [IMP] mail: move getScrollableElement to message list model
task-2801089

closes odoo/odoo#87267

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-28 17:55:16 +02:00
rhe-odoo e4d125463d [FIX] point_of_sale: fix quantity decrease popup
When the popup was canceled, the input value was null and it lead to an error.

Now we add a check to ensure the value exist.

closes odoo/odoo#87194

X-original-commit: b04b5898033ff28c14f84a83d28c43e446f0e4b3
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-03-28 17:55:12 +02:00
Thibault Francois e9e6292b82 [FIX] sale: O qty change to 1
How to reproduce the issue
--------------------------

Set the quantity of a sale order line to 0.0
then change the product_uom of the line
it triggers the computation of the product_uom
and the quantity is changed to 1.0

After this commit
----------------

The default value is not embedded in the compute anymore
The value do not change each time the compute is triggered
if the value was 0.0

closes odoo/odoo#87166

X-original-commit: 9015d25617b3992b0129547a1bec8887d6462bc5
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-28 17:55:08 +02:00
Nicolas Bayet f6fccdbdce [FIX] website: propagate action_demand onFailure to promises
Before this commit
The code called `action_demand` without specifying a failure
method.
In website, there is bug arising where a promises is not rejected
causing spinner of the sidebar of the website builder to never stop.

After this commit
Failure is propagated and the website builder bug does not prevent
the user from continuing to work.

closes odoo/odoo#87125

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2022-03-28 17:55:04 +02:00
william d999840957 [IMP] account: avoid subqueries while constraining on user type
Avoid doing a `search` in a loop.

closes odoo/odoo#86204

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-03-28 15:54:41 +02:00
william 51c0612c1d [FIX] account: remove trailing spaces in account_account.py
Part-of: odoo/odoo#86204
2022-03-28 15:54:41 +02:00
Alexandre Kühn b04ea8e173 [IMP] mail: turn "RtcSession/rtcDataChannel" into field
Task-2734101

closes odoo/odoo#85024

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 13:55:09 +02:00
Didier (did) 6a0cbf8562 [FIX] mail: fix guard on load video
task-2806331

closes odoo/odoo#87324

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 12:57:02 +02:00
luvi 90695d16df [FIX] web: fields _onClick handler triggered twice
This commit fixes a bug present in FieldEmail and
FieldPhone where the handler on the click event was
triggered twice and was not preventing the field to
turn into quick edit mode appropriately.
A test has been added for EmailField to ensure the
correct behavior

PR enterprise: odoo/enterprise#25506

closes odoo/odoo#87196

X-original-commit: 852e084c355e9be77c693b32bf1119570e4d49d0
Related: odoo/enterprise#25558
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-28 12:56:52 +02:00