Commit Graph
148697 Commits
Author SHA1 Message Date
Brice bib Bartoletti 4e679ab943 [IMP] PoS: test create_ui_order_data add discount
This commit gives the possibility to create pos_order_line with discount
This is needed in order to reproduce real usecase.

X-original-commit: 49bfb576a76e2ad4449326c4b12ebf57bece7069
Part-of: odoo/odoo#85461
2022-02-26 21:30:54 +00:00
Nasreddin Boulif (bon) 0eaedc4606 [FIX] portal: remove hardcoded line-height rule for o_page_header class
Steps to reproduce:

  - Install website_appointment module
  - Change website theme and select : Cobalt Theme
  - Go to website
  - In menu, click on Appointment
  - Select anyone, select any date and confirm appointment

Issue:

  Title text on each other.

Cause:

  The custom page_header class (in portal module) override the default
  line-height with 2.1 rem (instead of 1.1).
  In some themes, the headings tags font-size has been changed with
  3.875rem (instead of 2.5rem).
  => font-size is too big regarding the line-height

Solution:

  Remove line-height rule.

ref. commit: https://github.com/odoo/odoo/commit/86ab1c55b4229afb74f630b5041a8354c705f849

opw-2745485

closes odoo/odoo#85453

X-original-commit: b84d9597df1be89ba418c7969a2cf8c632eb8316
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-02-26 18:59:36 +00:00
Pierre Paridans 7df7ecae9b [FIX] auth_totp,web: TOTP login from mobile apps
Since PR odoo/odoo#78857 , the TOTP authentication support is broken
when used inside either Android or iOS mobile apps.

Due to our inability to update the iOS app (following review from
Apple), this commit aims at restoring the bare minimum requirements to
make the current mobile apps (specially iOS but also Android)
authentication workflow works.

As extended explanation:
- Set-Cookie header is expected to be sent even when session_id hasn't
  changed (iOS specific).
- Successful credentials check on `/web/session/authenticate` expect a
  successful response with a result containing `uid` set to `null` to
  mark the need of an additional totp handshake (both platforms).

closes odoo/odoo#85463

Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-02-26 13:41:23 +00:00
Audric Onockx (auon) 73f873ab4c [FIX] board : drag task between personnal stages in dashboard
Steps :
Install Project and Dashboard.
Project > My task > Favorites (search zone) > Add to Dashboard.
Notice you can drag task between stages.

Issue :
Dashboard > Notice you cannot.

Cause :
m2m groupby normally (in kanban_renderer.js) does not allow drag.
project_kanban overrides its _setState() method to allow it for parsonnal
stages, because they "become m2o" with a user.
Yet, in the dashboard, we pass through the default method, because the
wrong view is created.

Fix :
Take into account the js_class in the arch to create the view.

opw-2752072

closes odoo/odoo#85033

X-original-commit: 4d864c05dfa8f9be25d41bbae318f75a61d0cde2
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-02-26 09:18:51 +00:00
BVE 400b686027 [FIX] account: update default value in alias on journal type change
Steps to reproduce the bug:
- Go to settings and enable “External Email Servers” option
- Go to accounting > Configuration > journals
- Create a new journal, Choose "purchase" type
- save
- Go to advanced settings tab > click on email alias
- Note that default value = `in_invoice`
- Create another journal, choose "Miscellaneous" type > save
- Change the type to "purchase"

Problem:
the default value = "out_invoice", because it is not updated in the write function after changing the journal type
In the case of type == 'purchase', the default value should be 'in_invoice', and in any other case, it should be 'out_invoice'.

opw-2618357

closes odoo/odoo#85292

X-original-commit: c86b1e5a46b5923136fa920a8bb4fc1c8bd31c2d
Related: odoo/enterprise#24708
Signed-off-by: William André (wan) <wan@odoo.com>
2022-02-25 21:51:17 +00:00
Xavier BOL (xbo) 96533aa014 [FIX] project: remove doc_count field in project kanban view
Before this commit, the `doc_count` field is defined into the kanban
view of `project.project` model but it is never used. Since it is
defined into the view, the compute of this field is unnecessary
called.

This commit removes `doc_count` field in the kanban view of project to
avoid computing the view since this field is never used.

closes odoo/odoo#85405

X-original-commit: 3c62c4aad5cecb9cc305925ca76ef24d375f5a09
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-25 20:13:47 +00:00
Loan (lse) 8d77f113b6 [FIX] website: delete website assets/views on uninstallation
###To reproduce (V15):

Video:
https://drive.google.com/file/d/1wCebPCVQMXmQk7G4CIMkh1MbZ89HW9ek/view
1. Install the module "Product Availability" ("website_sale_stock")
 (that will install ecommerce & stock)
2. Choose a theme for the website (like developement)
3. Uninstall website
=> Internal server error
```
Exception: Unallowed to fetch files from addon website

Error when render the template
Exception: Unallowed to fetch files from addon website
Template: web.frontend_layout
Path: /t/html/head/t[1]
Node: <t t-call-assets="web.assets_common" t-js="false"/> - - -
```

###Analysis:
The assets and view should in theory be deleted in cascade when
the websites records are uninstalled.
However, if a website record fails to be removed,
for instance - in this case - because of pricelist which have an
`ondelete=restrict` PSQL constraint on its `website_id` field.
The PSQL cascade constraints on the other record are dropped
before being applied which result in the resource being still
there but not usable.

Note: this issue is not specific to the website app in particular.
It's just not worth to think for a more sophisticated way to fix
this issue in a stable version.

OPW-2700476

closes odoo/odoo#85443

X-original-commit: ef5296ab32426422698b763c33b2ddb5d0da6cc6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-02-25 19:21:46 +00:00
Kartik Chavda 229046e830 [FIX] project: display rating average percentage
This commit display rating average percentage in project update right
side panel view's rating stat button instead of just displaying
rating_avg_percentange field's value.

task-2732325

closes odoo/odoo#82859

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-25 19:21:42 +00:00
smdc-odoo bf1ec3faac [IMP] l10n_it: Change the Italian Chart of account
These changes have been made:
	- Each account name now starts with a upper case letter. This was change to be more coherent with the other localisation
	- There was too much account that allowed reconciliation. Only some should so we have change that (in particular, receivables and payable accounts)
	- We have added tags to account to more easily manage the control domains. By doing so, the control domains can be more precise about where the error lies
	- We have change the type of some account. Before that there was too much 'Current Assets' or 'Liabilities' without distinction for 'Fixed Assets', 'Equity', 'Off Balance'...

It also contains a local migration script to update current installation of the Chart of Account by adding the tags.

task-2468834

closes odoo/odoo#84857

X-original-commit: 534c0384ff64ef141168ee2dd4152116ae0287f8
Related: odoo/enterprise#24498
Signed-off-by: Olivier Colson <oco@odoo.com>
2022-02-25 14:29:44 +00:00
Raf Geens 731d0d85c2 [FIX] orm: string pattern for Reference wasn't correct
In reality the separator is a comma instead of a dot as can be seen
in the code a bit further below.

closes odoo/odoo#85396

X-original-commit: 2a6e9f166d493aaefc006e949ab45e42311ac886
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-02-25 12:35:51 +00:00
Odoo's MergebotandGéry Debongnie [ged@odoo.com](mailto:ged@odoo.com) 98e8e8a5f5 [MERGE][REF] *: update owl to version 2 with fine-grained reactivity
This PR updates owl to version 2 with fine-grained reactivity, and adapts the code in Odoo accordingly.

closes odoo/odoo#84314

Related: odoo/enterprise#24218
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Géry Debongnie [ged@odoo.com](mailto:ged@odoo.com)
2022-02-25 13:35:45 +01:00
Jorge Pinna Puissant df944e3f9c [REF] mail: remove the hook useShouldUpdateBasedOnProps
With the new fine-grained reactivity in owl 2, this hook is not
necessary any more.

Part-of: odoo/odoo#84314
2022-02-25 12:35:44 +00:00
Jorge Pinna Puissant 221412630d [FIX] web: extend the timeout when using QUnit.debug
This commit will also ensure that the document is ready before adding
the debug class.

Part-of: odoo/odoo#84314
2022-02-25 12:35:43 +00:00
Jorge Pinna PuissantandGéry Debongnie 09b4668c6b [REF] *: adapt code to owl2 with fine-grained reactivity
On most of the cases, the fine-grained reactivity is bypassed by:
- Setting the optional `deep` argument as `true` on the renderer
    function. This will force a render to update all child components.
- Changing some objects from reactive to non-reactive using `toRaw`
    function.

Part-of: odoo/odoo#84314
Co-authored-by: Géry Debongnie <ged@odoo.com>
2022-02-25 12:35:43 +00:00
Géry Debongnie d90f481448 [REF] web, project: remove the component NotUpdatable
With the new fine-grained reactivity in owl 2, this component is not
necessary any more.

Part-of: odoo/odoo#84314
2022-02-25 12:35:43 +00:00
Géry Debongnie f96c88ee1a [IMP] web: update owl to version 2.0.0 with fine grained reactivity
Changelog : https://github.com/odoo/owl/blob/7845304b7e9cca465ec94af6b1b5272dadc70891/CHANGELOG.md

Part-of: odoo/odoo#84314
2022-02-25 12:35:43 +00:00
Odoo's Mergebot 702d23ac5c [MERGE][IMP] sale_*: split files by models & cleanups
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#85001

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-25 12:40:22 +01:00
Victor Feyens 0ee6456ef6 [FIX] sale_project: ci-style
Part-of: odoo/odoo#85001
2022-02-25 11:40:21 +00:00
Victor Feyens d523925d08 [MOV] sale_stock: split sale_order.py
Part-of: odoo/odoo#85001
2022-02-25 11:40:21 +00:00
Victor Feyens aaa87311bd [MOV] sale_purchase: split sale_order.py
Part-of: odoo/odoo#85001
2022-02-25 11:40:21 +00:00
Victor Feyens bb5cc7d8e2 [IMP] sale_project: remove unused imports
Part-of: odoo/odoo#85001
2022-02-25 11:40:20 +00:00
Victor Feyens 330cf19c52 [MOV] sale_project: split sale_order.py
Part-of: odoo/odoo#85001
2022-02-25 11:40:20 +00:00
Victor Feyens 267e5d694c [IMP] sale_product_matrix: correct name for views file
Part-of: odoo/odoo#85001
2022-02-25 11:40:20 +00:00
Victor Feyens d6131fb4d5 [MOV] sale_product_configurator: split sale_views.xml (2)
In two commits to keep code ownership and blames

Part-of: odoo/odoo#85001
2022-02-25 11:40:19 +00:00
Victor Feyens fe1efab805 [MOV] sale_product_configurator: split sale_views (1)
Part-of: odoo/odoo#85001
2022-02-25 11:40:19 +00:00
Victor Feyens c82681f1ab [IMP] sale_product_configurator: module cleanup
* correct python file name
* alphabetical ordering of imports
* demo data indentation

Part-of: odoo/odoo#85001
2022-02-25 11:40:19 +00:00
Victor Feyens 58ac6db1fe [MOV] sale_mrp: split sale.py (2)
Done in 2 commits to keep code ownership and git blames

Part-of: odoo/odoo#85001
2022-02-25 11:40:19 +00:00
Victor Feyens 3b7389a405 [MOV] sale_mrp: split sale.py (1)
Part-of: odoo/odoo#85001
2022-02-25 11:40:18 +00:00
Victor Feyens becf288435 [IMP] sale_margin: clean module
* Split python file by classes
* Remove empty ir.model.access.csv file
* Correct name for views file
* Use setUpClass instead of setUp to avoid multiple setups during tests

Part-of: odoo/odoo#85001
2022-02-25 11:40:18 +00:00
Adrien Widart d9b9f94d18 [FIX] mrp: unbuild MO with several lines for same component
When unbuilding a MO, if the latter has several lines (in its
components) for the same tracked product, it won't work.

To reproduce the issue:
1. Create two storable products P_compo and P_finished
    - P_compo is tracked by USN
2. Update P_compo's quantity to 2
3. Create a MO:
    - Product: Finished
    - Quantity: 1
    - Components:
        - 1 x P_compo
        - 1 x P_compo
4. Process the MO
5. Unbuild the MO

Error: a validation error is displayed while it should not "The serial
number has already been assigned: Product: P_Compo, Serial Number: C01"

The for-loop in `action_unbuild` do not handle the case where there are
several SMs for the same product. In the above case, there are two
component lines for P_compo, so there are two SM in `MO.move_raw_ids`.
When unbuilding the MO, the module creates and processes two SMs (SM01,
SM02) that "produce" two P_compo (stored in `produce_moves`).
When processing the first one in the for-loop, it takes the original
moves (so the `MO.move_raw_ids` with the same product) and uses them one
by one. Since SM01 needs one P_compo, it uses the first SM of
`MO.move_raw_ids` (and reuse the lot of that SM). Later on, when
processing SM02 in the for-loop, it does exactly the same thing: it
takes the original moves and uses the first one. Here is the issue: this
first SM has already been used and so does its lot, so this SM should
actually not be used again.

OPW-2715155

closes odoo/odoo#85354

X-original-commit: 8d2597965202a76ddeea8d8fed60b7ac014e2df8
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-02-25 10:25:43 +00:00
Habib (ayh) 9170895684 [FIX] account: with the owl update, t-key is required
this prevents a Client Error on journal items 'Automatic Entries'

task-2766719

closes odoo/odoo#85045

Signed-off-by: William André (wan) <wan@odoo.com>
2022-02-25 10:25:40 +00:00
Umesh Gupta 3af3abfe4d [IMP] note: display long title properly on kanban view
Currently in kanban view of the notes, if there is long content without space
(for example a very long URL), the content goes out of the kanban card.

This commit improves the behavior by breaking such content into multiple
lines and thus displaying full title on the kanban card.

taskID-2754915

closes odoo/odoo#84607

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-02-25 10:25:36 +00:00
Florian Charlier 6d33510beb [IMP] website_slides: enable cover customization
PURPOSE

Before this commit, the headers for the eLearning module were fixed
(Odoo purple gradient or images), and did not always fit with the color theme
chosen by the users. This commit enables the customization of these
website_slides headers for homepages as well as courses and lessons
(on a per-course basis).

SPECIFICATIONS

This commit replaces the channel and lesson headers with `Cover` snippet, so
that they are customizable (by channel) with the website editor. The
customization includes background, additional filter, text alignment, and text
alignment.
The banners for categories of channels ("All courses", "Certifications", and
"My courses") are now also customizable, and other website blocks can be added
above and below them.

Before this commit, the static header background for courses was updated to a
different color palette for certification tracks (`website_slides_survey`).
With this commit, the aspect of the header will no longer be different when
a survey is added but keep the customization (or default value for courses).

The `o_wslides_gradient` class is now obsolete and is renamed to different
labels depending on its remaining local purpose.
The default aspect of courses and lesson without images is therefore switched
from the Odoo purple to the theme background color.

LINKS

Task-2516830

closes odoo/odoo#78257

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-25 10:25:28 +00:00
Josse Colpaert 8e6595857c [FIX] account_edi_proxy_client, l10n_it_edi_sdicoop: timeouts and concurrency
- Sometimes the refresh_token is not saved in the db because the code
after it fails (timeout).  We also want to avoid 2 processes
trying to renew the token at the same time (=> avoid desynchronization
of the refresh_token)

So, we added a locking mechanism and do a commit after we refresh the
token.

- If we have very big invoices to receive, they do not get imported into
the database.  At the moment we risk timeouts.

Our solution is to do a lot of intermediary commits and we link it
to a temporary account_move before doing the import logic and maybe
putting it into the definitive one.

closes odoo/odoo#85372

X-original-commit: ce47d09c05e4bcc91ee4de68db3a7a471bcb4df8
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-02-25 09:22:56 +00:00
Arnold Moyaux 05ae07c1a7 [FIX] (purchase_)mrp: Correct links with MO and PO
Fine tuning of commit 6acfb2e
It correctly merge the purchase.order in case of direct link and
avoid to relaunch the procurement.

It also correctly set the created_production_id if the demand come
from a SO

closes odoo/odoo#85301

X-original-commit: 9b6fa6c3db55daa3533c0d5cb13da7c98fc3e936
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-25 09:22:52 +00:00
Christophe Simonis c4158bec64 [IMP] project: accelerate the computation of the doc_count field
The query added by 6c207ed1027d9b39eecd19886932b17f1a79dccd is not
optimal. Avoid using `LEFT JOIN` and `OR` by doing 2 queries and adding
their results.

From local tests, a `search_read` on `project.project` is about 4x faster:
2400ms -> 600ms.

closes odoo/odoo#85365

X-original-commit: 0235f2ded8ef6478ed36e2d8ba1c46acef5f1dab
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-02-25 08:26:10 +00:00
Tiffany Chang (tic) ae4610ca00 [FIX] stock: apply missing rename
Previous refactoring: odoo/odoo@3b06565 switched move_line.product_qty
to move_line.reserved_qty. This line was missed during the refactoring
so we fix it now.

closes odoo/odoo#85355

X-original-commit: 624c155e77ae1d3fa964a949f17b4d8c73e9b35d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-02-25 08:26:07 +00:00
Antoine Guenet e13b4fdb9f [FIX] web_editor: ensure powerbox gets selection from owner document
When checking if the powerbox should open, we check the selection but
that was done on the global document, which returns a wrong selection
for the editable if it's in an iframe. As a result, the powerbox never
opened in mass_mailing.

task-2778414

closes odoo/odoo#85352

X-original-commit: d5b8c26c46b1daf795a6b286af80bb4dad8072ff
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2022-02-25 08:26:03 +00:00
Samuel Degueldre 3620de052a [REF] web, *: remove/deprecate useless code in main web controller
*: website_sale_coupon, test_apikeys

The do_search_read method was only used in a single place: the
search_read controller, whose entire function body was just a function
call. The content of the do_search_read method has been moved to the
search_read controller.

The search_read controller is still pretty useless: it's basically
equivalent to making an RPC on a model and calling the method
web_search_read. As such, this controller should be removed, but lots of
code depends on it and adapting all the code that uses it is out of
scope for this PR. It will hopefully be removed alongside the legacy
views in the webclient (which are its main users).

The call_common method and /web/dataset/load route are completely
unused.

The /web/dataset/call controller is used in only two places and can
trivially be replaced with a call to /web/dataset/call_kw

The non-route methods were removed and the route methods now emit a
deprecation warning telling the user what to use instead.

closes odoo/odoo#84811

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-02-25 07:35:40 +00:00
Achraf (abz) 2c39189e53 [FIX] web: Add support for () in domain editor for studio
If a report contains a t-if with something like `field in ('a', 'b')`
as a condition, a crash occurs if you try to modify the 'Visible if'
field in the report editor because the domain editor doesn't support parenthesis.

This commit adds this compatibility based on the case of `[]` which is essentially the same thing

opw-2738343

closes odoo/odoo#85331

X-original-commit: bd76793397cb88e12fce4ffc886eefbce0b54975
Related: odoo/enterprise#24722
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
2022-02-25 06:25:04 +00:00
John Laterre (jol) b0eed54cd0 [FIX] account: fix account type constraint on bank journals
The issue here is to be able to change the type of bank account
on the bank journal, e.g. changing from type "Current Assets" to "Bank and Cash".

Previously, a ValidationError would be raised :
"This account is configured in %(journal_names)s journal(s) (ids %(journal_ids)s)
as payment debit or credit account.
This means that this account's type should be reconcilable."

But in some cases, the client might decided not to reconcile.
And the error did not take into account the case when the bank account
and the outstanding accounts are the same.

opw-2738777

closes odoo/odoo#85370

X-original-commit: fe379bc22e649c623dfb6ed8aefb106b4846d02e
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
2022-02-24 20:29:38 +00:00
Younn Olivier 2eccc43669 [FIX] website: add scss variables to the disable snippets assets cron
Commit [1] introduced a cron that disables outdated js and scss snippets
assets. For example, if a new version of the masonry snippet is defined
with new assets: data-vcss="001" and data-vjs="001", the previous assets
have to be disabled (000.scss and 000.js).

That cron was not handling the scss variables files at all, so when
an outdated snippet was still used in the db and the cron was run, the
000.scss file was activated, but not the 000_variables.scss and it was
crashing the assets.

Now, the XXX_variables.scss assets files are handled alongside the
XXX.scss files.

Also, the regex used in the _is_snippet_used method was only returning
the first match of a snippet in an html field. So if a view had a
snippet up to date and then an outdated snippet of the same type, the
old assets were not activated. The 'g' flag was added to return all the
occurences of the snippet in an html field.

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

task-2775188

closes odoo/odoo#85360

X-original-commit: 644067e80d4ca3f41707cddd15ed8f2807a1e410
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-02-24 19:41:45 +00:00
Sébastien Theys 8ce96ac850 [IMP] mail: rename js Model to Record
Removes confusion in technical code. An instance of Thread is a thread, by
analogy a record should be an instance of Record.

closes odoo/odoo#85359

Related: odoo/enterprise#24731
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-02-24 18:42:13 +00:00
Romain Derie dad8dca0da [IMP] website, website_blog, *: also test perf of real use cases
* test_website

The `nocache` URL param was introduced with [1] which allows to bypass
the cache when serving a page.
Bypassing that cache, despite not being the most common flow, was done
in the perf tests since that commit. Ultimately, it was not testing
real use cases anymore (despite still being useful as it would still
prevent perf killer feature to be merged).

This commit ensures the perf tests are also tested with cache.

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

task-2774979

closes odoo/odoo#85261

X-original-commit: 5d44d890021cfc7767daa1f366e636288e84f1f6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-02-24 17:49:56 +00:00
clesgow 3ea3b6a9a1 [FIX] stock_picking_batch: Fix batched pickings validation
If a picking is in a batch, the point is to process it as a whole. Yet,
it is possible to validate a single picking (putting it in a 'done'
state), inside of an 'in_progress' batch. This raises inconsistencies
between the state of the batch as a whole and the state of some of it
pickings.

Therefore, when a single batched picking is validated in a batch that
still contains other non-done pickings, the picking is removed from the
batch.

closes odoo/odoo#85324

X-original-commit: e9602d6b28331f68a83b5ce8a06a2ffc8ac3453d
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2022-02-24 16:42:00 +00:00
Arnold Moyaux 23451b645a [FIX] mrp: mass produce should fill qty_done
Usecase:
- Create a BoM with a product tracked by SN
- Create a MO with qty 5
- Mass produce
- Generate

-> All the `stock.move.line` in the move_raw_ids don't have
the qty done prefilled. The purpose of the feature is to create
and validate a lot of MO at once. Which is impossible if you have
to fill all the quantity manualy.

The choice of a new kwargs that directly set the qty_done is justified
by the performance.

-> For On a BoM with 10 components for a final product. For 1000 finished
product with SN
- If we do a loop on each `stock.move.line` to set
qty_done as the reserved quantity. It goes from 40s to 135s
- With the kwargs. It remaines 40s

closes odoo/odoo#83123

X-original-commit: 8ce5926b5a337dc97237f39492e094288b453743
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-24 16:41:48 +00:00
Antoine Guenet f1b26335a2 [FIX] web: properly bind colorpicker to its owner document
In mass_mailing, the colorpicker is in an iframe. There was code to make
sure it was bound to its owner document but that code was faulty since
it was executed before the colorpicker was appended to the DOM. As a
result, all features of the colorpicker that relied on the position of
the mouse (eg, selecting a color in an xy selector by dragging a cursor)
were broken.
This fixes it by using the owner document of the parent class' editable
if defined, rather than that of the parent class' element.

task-2778415

closes odoo/odoo#85329

X-original-commit: a19d81bcab978150cf01f1ae85543adc5cb92e5e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-02-24 15:38:58 +00:00
Antoine Guenet 9499f9d304 [FIX] mass_mailing: prevent selection change into zone outside snippets
When starting with an empty mailing, it was possible to click in the
document and start typing, while this should not be allowed since that
zone is not really editable. We want to only allow writing into
snippets.

task-2778412

closes odoo/odoo#85328

X-original-commit: c9ebe6996f61c24c2a67212beba5dcc95e9a7ed9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-02-24 15:38:54 +00:00
Umesh Gupta 79f7e60096 [FIX] website_event: display event menu items
Currently, when event manager clicks on 'Configure Event Tickets'
link on the event registration front-end page, it redirects
manager to the form view of that event. However, the top menu items
are missing.

This commit adds the 'menu_id' in link of the button so that when
being redirected to back-end (form view), the menu items are loaded
correctly.

taskID-2727609

closes odoo/odoo#85302

X-original-commit: 851a149f69e67f2fc7cf7a14f5eb4c087897b002
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-02-24 15:38:48 +00:00
Antoine Guenet c797a41d19 [FIX] web_editor: hide inactive modal behind fullscreen editor
`.modal.o_inactive_modal` (in modal.scss) had a z-index that was
superior to that of a fullscreen editor. As a result we could end up
with the editor being partially hidden by a modal.

task-2741872

closes odoo/odoo#85315

X-original-commit: 6ef3c1cf59ac66f00462468079500c449f189fae
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-02-24 14:37:35 +00:00