Commit Graph
167618 Commits
Author SHA1 Message Date
Lucas Perais 0bc8d169f5 [FIX] web: popover validation target props
Using the OdooEditor, the following use case arises often:
- create an Element with document.createElement.
- append that node into the DOM tree of an iframe.
- spawn a popover with that node as target.

The spec (https://developer.mozilla.org/en-US/docs/Web/API/Document/importNode) considers this a malpractice:
`Before they can be inserted into the current document, nodes from external documents should either be:
cloned using document.importNode(); or
adopted using document.adoptNode().

Note: Although Firefox doesn't currently enforce this rule, we encourage you to follow this rule for improved future compatibility.`

Before this commit, in debug mode, there was a crash because the class of the new Element
did not match the class of the element's ownerDocument defaultView.

After this commit, we keep the check that says that the target should be an instance of
the iframe's document's Element class, but we fallback onto the main Window Element class as well.

closes odoo/odoo#142464

X-original-commit: 0cdd8cf9354e494c3e56d9eefe81c3fb6a59ac09
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-11-20 11:13:25 +00:00
Saiyed Irmi addfbb5a39 [FIX] web: button assign appear on mouse hover in Activity View
Steps:
 - Open Projects
 - Go to Tasks
 - Open Activity view
 - There is a button to assign a new user

 Issue:
 - The button to assign a new user should only be visible on hover

 Cause:
 - There was no css class added for button in activity record.

 Fix:
 - By making button visibility hidden by default and should be visible only on
   hover.

closes odoo/odoo#142381

Task: 3522113
X-original-commit: d60519ae4cb3c9c7d83e8143c3015c28b2a929ad
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-11-20 11:13:24 +00:00
alsh-odoo c05fe1e26d [FIX] stock: give correct field name to prepare stock return picking
This traceback arises when the user click on return button.

To reproduce this issue:

1) Install 'stock'
2) Activate 'Multi-Step Routes' from 'Inventory/configuration/settings'
3) Create a new product with quantity 100
4) Create a new record in 'Operations/Deliveries'
5) Select the created product in 'operations' with 'Demand' as 10
6) Click on 'Validate' button and then 'Return' button
7) Again click on 'Return' button

Error: 'KeyError: 'reserved_qty''

See: https://github.com/odoo/odoo/blob/c2b160fe50c24e9f01d0d5b350f2422cfdbc72d4/addons/stock/wizard/stock_picking_return.py#L86

Because the 'reserved_qty' field is removed from this pr:- https://github.com/odoo/odoo/pull/137864

sentry-4621794958

closes odoo/odoo#142312

Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-11-20 11:13:23 +00:00
kdeb@odoo.com 881e9c42ff [FIX] sale: translate product description
Issue:
In a multi-language environment, the product description in sales
orders defaults to English, regardless of the user's language
preference. This issue occurs when the language of the partner
is not set, leading to a mismatch between the user's expected language
and the displayed language for product descriptions.

Steps to Reproduce:
1. Ensure the database supports multiple languages.
2. Set the user's preferred language to a non-English language.
3. Create a new sale order for a partner whose language is not set.
4. Add a product and observe that its description is displayed in
    English instead of the user's preferred language.

Solution:
Modified the logic to default the product description to the user's
language preference when the partner's language is not specified.

opw-3586451

closes odoo/odoo#142227

X-original-commit: 29ace2569b24cbcf2ae15ca2f25e33fd1f1cd289
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Kawtar Drissi El Bouzaidi (kdeb) <kdeb@odoo.com>
2023-11-20 11:13:22 +00:00
william-andre 430f51fbd2 [IMP] account: unify reconciliation of import
Purpose
-------

Allow to reconcile entries during import easily.
* Have one uniform way of doing it
  - fix bugs only once
  - reduce number of fields
  - make it generic and not only for some imports
* avoid the need to post during imports
  - faster to import, can import bigger batches, because we do neither
    post or reconcile, both are among the most time consuming steps.
  - still allows to check the data before posting if needed
* make splitting import into smaller batches easier because the
  reconciliation is not cut/dependent on the batches anymore
* allow to reconcile entries in the future by using the same mechanism
  (i.e. cut-off)

Implementation
--------------

Allow setting the matching number to `I*` manually, where `*` can be
anything. When posting the last item with the same manually set number,
we will reconcile all the lines with the same number.

task-3593885

closes odoo/odoo#142017

Related: odoo/enterprise#50627
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-11-20 11:13:19 +00:00
william-andre afb33cb56e [FIX] account: max recursion while creating taxes
How to reproduce:
* create a lot of taxes in batch

The SQL query builder will throw a max recursion depth when building the
`OR(domains)`.

The solution is simply to reduce the size of the batches to avoid that
error.

Part-of: odoo/odoo#142017
2023-11-20 11:13:19 +00:00
Deependra Solanki 11242d8886 [FIX] web_editor: close powerbox when keyup outside its block node
Before this commit:

The Patience diff algorithm uses the text added in the `closestBlock` node to
the node where the powerbox is opened. If the user switched to a different block
using `ArrowLeft` or `ArrowRight` keys, it would result in the algorithm not
searching for the typed text in the other block.

After this commit:

The powerbox will be closed if the keyup event occurs in a different block than
the one in which the powerbox was initially opened.

task-3212128

closes odoo/odoo#141785

X-original-commit: 272614a7b668d361d6ea4177602b249608af34bb
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-11-20 11:13:17 +00:00
Deependra Solanki 1f4bb22d8e [FIX] web_editor: power box disappears in collaborative fix
Before this commit:

Power box uses Patience diff algorithm to check the text added by the user for
search, it previously used the entire editable for differences, which caused
the issue in collaborative. When one user type something on a different node,
the change would affect the editable and be considered in diff, causing updates
in other users powerbox.

After this commit:

Instead of checking the entire editable for the diff, we now check the current
block node where the power box was opened. This prevents scenarios where other
users powerbox would update when one user would type on same block node.

task-3212128

X-original-commit: 976c10b749e59963c8a27ac4764f1746d46d5e09
Part-of: odoo/odoo#141785
2023-11-20 11:13:17 +00:00
Morgane (morm) 01ad9b9213 [IMP] web: kanban header priority star alignment
Prior to this commit, the alignment of the `priority` field star inside
the header of the `kanban card` was not perfect.
Adding `margin: auto` fixes this issue.

task-3586924

closes odoo/odoo#141506

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-11-20 11:13:15 +00:00
Ahmed Khalaf 5a69ef6e04 [IMP] stock: move detailed operation view to smart button
After this commit, detailed operations is no longer a tab in the picking
but under a smart button in the form.

The field `show_operations` on picking type is no longer useful and will
be removed in a later PR targeting master

closes odoo/odoo#140898

Taskid: 3486636
Related: odoo/enterprise#50805
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-11-20 11:13:13 +00:00
nda 083cd011a1 [FIX] portal,website_sale: smaller pager
pager does not need to be language dependant

steps to reproduce:
- have a lot of products on your e-commerce (more than 7 pages)
- open mobile e-commerce

before this commit:
- pager is wider than the allowed space and width depends on the
language (ex: "Siguiente" is longer than "Next")

after this commit:
- pager is always smaller and is language independent

opw-3522688

closes odoo/odoo#142623

X-original-commit: bd3c2cec314c3710c2294319a8e7605749d7fa83
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
2023-11-20 09:40:02 +00:00
gera-odoo 86ff641284 [FIX] account_edi: Correction of KMT uom
closes odoo/odoo#140027

X-original-commit: ab3c5cb7f5ff4a4484675fa501a432d643bd4f10
Signed-off-by: Gerardo Rafael Soto Maldonado (gera) <gera@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-11-20 06:45:48 +00:00
Maruan Aguerdouh (magm) 4a7d93d089 [FIX] web: incomplete record reload in x2many form view context
Steps to reproduce:

- Install eLearning
- Create or go to an existing course.
- Add Content
- Fill the name and use Save & Close
- Click again in the same content we have just created.
- Click on website preview.

Issue:

Saving a record from a form view that is part of an x2many field would
only reload the fields present in the list view. This led to incomplete
data being loaded into the model.

Solution:

- Pass the `viewType` option to `_fetchRecord` to ensure that the record
is reloaded in the context of the form view, thereby including all
fields.
- Add `viewType` to the `saveOptions` in the `basic_relational_model.js`
to ensure the correct view context is used during the save operation.

This ensures that all fields are reloaded into the model, providing a
complete view of the data.

opw-3330010

closes odoo/odoo#139968

X-original-commit: 3cec34e659222073b0fba36983eaec9f7bf5514f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-20 06:45:47 +00:00
Martin Trigaux c838944646 [CLA] remove duplicated file
Was already signed in pallavisrivastavaa.md

closes odoo/odoo#142426

X-original-commit: d586acc0d08e8fc2f2221c4e8b6ff6fc2577e81b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-11-20 04:58:31 +00:00
hupo-odoo 10cf39e139 [FIX] account: Dashboard kanban style on groupby
When using a 'Group by' on the Accounting Dashboard, the Kanban cards representing the Journals are placed in columns. However, the columns were too narrow, causing text overflow.

task-3530756

closes odoo/odoo#142371

X-original-commit: 5463a4d34e2d6aea59e96786fe6451a39b319162
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
2023-11-20 04:58:30 +00:00
Robin Lejeune (role) c7b4035e26 [FIX] website: fix dropping form snippet
Since [1], dropping a form snippet generates a `TypeError: Cannot read
properties of undefined (reading 'disconnect')`.
Note that it only happens if this is the 1st snippet dropped, and if it
is dropped as a section, not as inner content of another snippet.

This is due to the SnippetEditor being destroyed before being started,
as `destroy()` is synchronous but `start()` is async. A field from
`s_website_form` (specifically the field `.s_website_form_dnone`) is
removed through `_addHiddenField()` when dropping a new form. The result
is that it gets destroyed immediately and tries to disconnect an
observer that doesn't exist yet, but the async start() ends a little
later - and creates + connects the observer that will never be
disconnected.

To solve the issue, this commit makes sure (1) in `destroy()` that the
observer was initiated and (2) in `start()` that if the SnippetEditor
was destroyed, it should not create an observer.

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

task-3598997

closes odoo/odoo#142291

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-20 04:58:29 +00:00
Arthur Detroux (ard) 458c26d307 [FIX] website: fix traceback when saving anchor with unchanged name
Since commit [1], anchor dialog is now in OWL. During adaptation, a line
of code was forgotten which lead to a traceback when an anchor is saved
with an unchanged name.

Steps to reproduce:

- Drop a Text-Image snippet and set an anchor on it.
- On the anchor notification, click on "Edit"
- In the dialog, do not modify the anchor name (or change it but then
  set the original one again)
- Click on "Save & Copy"
=> Traceback

[1]: https://github.com/odoo/odoo/commit/57ed8bc0bf9d1ae2b7542d677a4d7e8fd1899ea2

task-3576975

closes odoo/odoo#141936

Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
2023-11-20 04:58:28 +00:00
Arthur Detroux (ard) e820187381 [FIX] website: prevent creation of duplicate anchors
Before commit [1], anchors would not have a duplicate name as checks
were in place to prevent it from happening. However, after [1], those
checks were no longer valid. They would check in the global variable
document, which was no longer the editable document.

This commit fixes that by using the ownerDocument of the target, which
should always return the correct document.

Steps to reproduce:

- Drop a text snippet.
- Click on create anchor (link icon)
    -> notification shows "/#Text".
- Drop another text snippet.
- Click on create anchor (link icon)
    -> notification shows "/#Text".
=> It should instead show "/#Text2".

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-3576975

X-original-commit: fa75fe60b32537d3c564ddba8117207f468c1004
Part-of: odoo/odoo#141936
2023-11-20 04:58:28 +00:00
nda ed8de929b6 [FIX] fleet: write on plan_to_change_car on a user
Similar issue have been fixed for the create in 28a9e90 .
This commits fixes the same issue for the write.

steps to reproduce:
- create a fleet.vehicule with a res.users as driver_id
- change value of plan_to_change_car

before this commit:
access error on res.users

after this commit:
field value is changed

opw-3576960

closes odoo/odoo#142591

X-original-commit: 5f7cca4a22625f1290fc612d8addad8f6312fc5c
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
2023-11-20 03:46:50 +00:00
Benjamin Vray 35ff9a3d1c [FIX] web_editor: fix saving base64 image
Some Odoo employees reported a traceback that appeared when saving a
task in the Project app. It turned out that this was caused by an image
having the class 'o_b64_image_to_save' even though the image was not in
Base64 format. Although we couldn't reproduce the bug, we are addressing
the result (the traceback) by preventing the saving of an image having
the 'o_b64_image_to_save' class if the image is not in Base64.

See https://github.com/odoo/odoo/commit/3bbce756c69a206d07abd31059f0392c26b36096

task-3576889

closes odoo/odoo#142571

X-original-commit: 7934aefb7d52ee20941b4583cbf0a50e28c345f6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-11-20 03:46:49 +00:00
Laurent Smet 6045061f81 [FIX] account: Fix rounding price_unit in _get_tax_included_unit_price
Suppose a price_unit of 90.0034 and a fiscal position mapping a 10% price included tax to a 15% tax.
Since the taxes computation was making a rounding, the computed price_unit was round(90.0034 / 1.10).
This commit aims to remove such rounding for the price_unit computation in case of fiscal position.

closes odoo/odoo#142565

Ticket: 3589921
X-original-commit: 11704a57349c04e579096489b346c5fa72c93f73
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-11-20 03:46:48 +00:00
Paolo Gatti (pgi) d4c70ae1e3 [FIX] l10n_it_edi_withholding: Fix Natura field on Pension Fund
Reproduce:

    Install l10n_it_edi_withholding
    Have an invoice with lines with two taxes:
    . 4% INPS
    . 0% with exoneration and exoneration kind
    Post
    Send to Tax Agency
    Tax Agency rejects it

The Exoneration Kind tag is related to the VAT tax it is applied to, not
to the Pension Fund tax itself, so we have to modify the template.
A test has been added for the case.

Task link: https://www.odoo.com/web#model=project.task&id=3495670
opw-3495670

closes odoo/odoo#142543

X-original-commit: cbbdd974da4ce55a7b10fba39db4f9278f161808
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2023-11-20 03:46:47 +00:00
Guillaume (gdi) 8a0c5df159 [FIX] web_editor: remove the use of website color in backend
Since [this commit], the color of the links in the backend is set to the
value of the variable `o-cc3-link`. This causes problems... Firstly,
this variable is defined in the website module, but it is used in the
web_editor module, which does not depend of website. Secondly, this
variable declared in website is made to be modified by the website
administrator via the edit panel (the theme tab). This commit corrects
this by replacing the use of this variable with a hardcoded color.

Steps to reproduce the bug fixed by this commit:
- Have website and project installed
- In the description of a project task, create a link
- Edit a website page
- Go to the theme tab
- Click on Colors Preset
- Open the 3rd preset
- Change the color for "Links" (to red for example)

=> Go back to the project task where you put a link. The link is now red
(this may require a page refresh). But the website option should not
change the links in the backend.

This commit removes the website builder related color o-cc-3-link
usage for editor links.

[this commit]: https://github.com/odoo/odoo/commit/5d598e4269431222ae28ac2196ff6f1f45466734

task-3275134

closes odoo/odoo#142542

X-original-commit: 6f10705e043115369ec581a83f65482ea83d25c8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-11-20 03:46:46 +00:00
Valentin Chevalier 96439698a9 [FIX] payment_stripe: handle tokenization for Boleto
Before this commit, an internal server error was shown when customers
tried to tokenize Boleto.

opw-3572673

closes odoo/odoo#142514

X-original-commit: fe9f937ce4f9bde327a7ea4f53346e2014908287
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-11-20 03:46:45 +00:00
Martin Trigaux 3caf279c04 [FIX] base_setup: correct domain
Comparing integer and string does not have the expected result

closes odoo/odoo#142462

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-11-20 03:46:44 +00:00
william-andre 7c1256a302 [FIX] tests: do not assertQueries before warmup
Just like for `assertQueryCount`, we should not take into account
queries that are not run after a warmup, for consistency.
This allows to easily interchange both context managers for debugging
purpose for instance.

closes odoo/odoo#142450

X-original-commit: aaa1d287085c8b2fe20b6591ca9f1b5bbe65d3db
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-11-20 03:46:43 +00:00
Anh Thao Pham (pta) dc3539bef6 [FIX] l10n_fr: adding missing groups
Add the following account groups:

 Code Prefix Start | Code Prefix End |            Name
------------------------------------------------------------------
         11        |        11       | Report à nouveau
         12        |        12       | Résultat de l'exercice
        416        |       416       | Clients douteux
         74        |        74       | Subventions d'exploitation

opw-3545765

closes odoo/odoo#142613

X-original-commit: 4bb0d0745ff076b56fb3e226fff281f94a848e73
Related: odoo/enterprise#50957
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-11-20 01:14:03 +00:00
Laurent Smet cab6648650 [IMP] account: Add attachment in file_data when importing an edi document
closes odoo/odoo#142570

X-original-commit: d180dcb381cb2794e419f2cf06fd9563f1c589e8
Related: odoo/enterprise#50936
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-11-20 01:13:58 +00:00
Lucas Lefèvre (lul)andAdrien Minne 037e5b823b [FIX] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/8bd0fb2b4 [REL] 17.0.3
https://github.com/odoo/o-spreadsheet/commit/fe3ba2a88 [FIX] text_helper: strikethrough wrong positioning
https://github.com/odoo/o-spreadsheet/commit/742581e80 [IMP] demo: add demo data for data validation
https://github.com/odoo/o-spreadsheet/commit/0323dd37a [FIX] FiltersPlugin: removing row with data filter header Task: 3546012
https://github.com/odoo/o-spreadsheet/commit/fc2a17482 [FIX] FilterEvaluationPlugin: insert/remove rows on data filter header Task: 3546012
https://github.com/odoo/o-spreadsheet/commit/3c3bbe9a2 [MOV] tests: fix typo in test file name of context menu
https://github.com/odoo/o-spreadsheet/commit/c53528f7c [FIX] F&R: Fix css rule
https://github.com/odoo/o-spreadsheet/commit/b6fa9634f [FIX] Menus: Show Insert col/row menu when full sheet selected Task: 3450188
https://github.com/odoo/o-spreadsheet/commit/80bd3b30f [REV] Charts: Do not rely on history for the chartRuntimes Task: 3578417
https://github.com/odoo/o-spreadsheet/commit/3d6f4f954 [IMP] evaluation: improve perfs of `getCorrespondingFormulaCell` Task: 3584306
https://github.com/odoo/o-spreadsheet/commit/17ba12211 [FIX] cell: update cell tokens and dependencies Task: 3584306
https://github.com/odoo/o-spreadsheet/commit/c0cb4cf86 [FIX] find_and_replace: take array formula result into account Task: 3413999

[IMP] spreadsheet: remove useless tokenize calls

The pivot/list helpers were tokenizing the cell's content when trying
to find list/pivot formulas. But we can skip the tokenize call as we
already have the tokens in the cell's compiledFormula.

closes odoo/odoo#142323

Task: 3584306
Related: odoo/enterprise#50888
Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
Co-authored-by: Adrien Minne <adrm@odoo.com>
2023-11-19 23:55:11 +00:00
Sven Fuehr 22eb8e7b6a [IMP] account_edi_ubl_cii: improve import of XML invoice with errors
Sometimes the user needs to import XML invoices (e.g. factur-x)
containing lines with the following problem:
The billed quantity of the line is set to 0 but the total of the line
(plus/minus allowances) is not 0.

The imported version (in odoo) of this line will have quantity 0 and thus a
total of 0 (since the total will be computed in odoo and not stored
directly in the database).

After this commit the quantity of these line will be calculated
such that the total computation yields the correct total.

To do this an already existing similar "exception" in the parsing
logic was extended to deal with this problem.

closes odoo/odoo#137833

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-11-19 23:55:06 +00:00
Odoo Translation Bot f6fe982853 [I18N] Update translation terms from Transifex 2023-11-19 00:28:08 +01:00
Thibault Delavallée 795091c69d [FIX] base: fix 'extract_rfc2822_addresses' in case of email-like name
Remove quotes when name of a formatted email is also an email, as indicated
in tests. We still get two emails being sent for a given outgoing email
when the name part is an email but that would be difficult to avoid.

Task-3566542

closes odoo/odoo#141856

X-original-commit: odoo/odoo@d3cdaa6c18
Related: odoo/enterprise#50892
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-11-17 16:11:51 +00:00
Thibault Delavallée cd5727c488 [IMP] base: add test cases for 'extract_rfc2822_addresses'
Add test cases related to an issue found during mail gateway testing. When
an email_to is formatted like '"robert@notgmail.com" <robert@notgmail.com>'
the tool finds two emails. As it is used in IrMailServer it sends two emails
insted of one. This may happen notably when partners are automatically created
based on an email only in which case it is put in both name and email.

Task-3566542

X-original-commit: odoo/odoo@312323e0d9
Part-of: odoo/odoo#141856
2023-11-17 16:11:51 +00:00
Thibault Delavallée a03ae3765e [IMP] base: fallback on 'email_re' when getadresses fails
When 'getadresses' fails at parsing some input and give us a result like
'gmail.com' (see previous commit adding test cases) we fallback on using
'email_re' which is better at finding email addresses in a global string.
We use it only in this specific case as fallback mechanism to rely on
'getadresses' when possible.

Task-3572208

X-original-commit: odoo/odoo@8e61a3b690
Part-of: odoo/odoo#141856
2023-11-17 16:11:51 +00:00
Thibault Delavallée d5b39338ff [IMP] base: add test cases for 'email_split'
Add test cases related to issues found in various leads management. All those
email inputs lead to an email found being '@gmail.com' (or equivalent) which
is not a valid email.

A consequence of that behavior is that 'email_normalized' for several leads
is the same ('@gmail.com') and they are considered as being the same email
identity. They could be included in a pack of leads to merge (see 'crm').

Task-3572208

X-original-commit: odoo/odoo@7498b9a0a1
Part-of: odoo/odoo#141856
2023-11-17 16:11:51 +00:00
Lucas Perais e08ddc21a6 [FIX] web: reload on usable view when switch company does AccessError
Be logged in multiple companies (A and B).
Be on a form view of some record which is visible only on company B via ir.rules.

With the company switcher, unlog from company B.

Before this commit, the user received an AccessError and arrived on a blank webclient.
To say the least, it was rather inelegant.

After this commit, the user ends up on the multi-record view of that model, provided that it is available for use.

Task-3029616

closes odoo/odoo#141796

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-17 16:11:50 +00:00
Walid 374aa015d6 [FIX] stock: picking apply default procurement group
Steps to reproduce:
- Enable show detailed operation in delivery setting on Invetory overview
- Create an SO and validate the delivery order
- Create a return -> Click on the smart button on the SO for transfers
- Click "New" from the list to create a new delivery order
- Add a product on the detailed operation and return to the SO
- The new picking isn't linked to the SO

Bug:
when adding a Product on the operation tab the move is created first
with the correct procurement group and then sets the correct group on the
picking however when adding to the detailed operation (SML) the picking
is created first (no group_id) and sets its group_id(False) the move

Fix:
apply the default group_id to the picking in both cases

opw-3470090

closes odoo/odoo#142424

X-original-commit: 2add5b4020b63a1018ddbf10a55854beffadf532
Related: odoo/enterprise#50871
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-17 12:36:08 +00:00
Bruno Zanotti 7b6072ca7b [FIX] product: make get price public method
The purpose of this change is to be able to get the price of the
products from external APIs.

closes odoo/odoo#142402

X-original-commit: 420406d392dd3764f08ac698b67440a86abb2ca5
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-17 12:36:06 +00:00
Walid 1229c13c12 [FIX] mrp: delivery slip with kit and non kit component
Steps to reproduce:
- Enable multi steps route for manufacturing (in Inventory settings)
- Crete and confirm an MO with a kit and a non kit manufactured components
(eg: table kit and desk combination)
- Validate the created transfer
- Print the delivery slip

Bug:
the manufactured product is absent from the delivery slip

Fix:
apply the correct filter on the move lines

opw-3502881

closes odoo/odoo#142380

X-original-commit: 8c57a4f039549f4bb02a6794eda90de66c74ad28
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-11-17 09:02:08 +00:00
Martin Trigaux 9429986b63 [FIX] base: join correctly the path
os.path.join(..., <absolute>) returns <absolute> path

closes odoo/odoo#142307

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-11-17 04:35:40 +00:00
Ali Alfie (alal) b01cd6ff48 [IMP] hr_expense: usability improvements
This commit contains a few small improvements to the Expense app.

- "View Report" button moved to the left if an attachment has been uploaded.
- Reports are auto saved when created from an expense.
- "Attach Receipt" button now sets the uploaded attachment as the main attachment.
- Expense lines in a report are no longer editable. When a line is clicked, the main attachment for that expense (if any) is shown in the attachment previewer.

task-3539382

closes odoo/odoo#138387

Related: odoo/enterprise#50136
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-11-17 02:45:45 +00:00
Joren Van Onder e4155471bf [FIX] l10n_br_sales: hide subsection totals
5921343c2a removed values that didn't
include taxes but section subtotals were forgotten.

task-3562904

closes odoo/odoo#142303

X-original-commit: 3198c74409fa9778d493a0802dc57f7f7062c800
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Joren Van Onder (jov) <jov@odoo.com>
2023-11-17 00:54:07 +00:00
Soukéina Bojabza 36517d8b7b [FIX] web_editor: remove the spaces around full width grid mode snippets
Steps to reproduce:
- In edit mode, drop the "Masonry" snippet.
=> There are spaces on the left and the right of the snippet. It should
not be the case as it is supposed to take the whole space, since its
container width is full (`container-fluid` class).

This happens because since commit [1], the rule setting the `--gutter-x`
CSS variable (which manages the row margins) to 30px when the container
is full width is now overridden by the general `.o_grid_mode` rule that
sets it to 0px, making the negative margins disappear.

Indeed, in commit [1], in order to disable the grid mode when used in a
mega menu that is in an extra menu (because the layout was broken), the
CSS selector managing the `.o_grid_mode` class has been modified. This
change caused the specificity of the rule to increase (x3), which made
it override the container rule.

This commit reverts this change and disables the grid mode in the extra
menu in a better way, by adding a proper rule for this specific case.

[1]: https://github.com/odoo/odoo/commit/709bffcb6de8883b679c0fc942f45cb293621c30

task-3593697

closes odoo/odoo#142189

X-original-commit: 8381af7d9898d7502c82a6b5622b0e91734267d8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-17 00:54:06 +00:00
nda 4612f6a7ee [FIX] auth_signup, website: make reset password multi website friendly
The "reset password" feature does not take into account
multi-website.

steps to reproduce:
- create a website A
- uncheck 'Shared Customer Accounts' on website A
- create a portal user user@example.com on website A
- create a website B
- uncheck 'Shared Customer Accounts' on website B
- create a portal user user@example.com on website B
- reset password for user@example.com on any website

before this commit:
An error is raised "No account found for this login"
(which is false, actually 2 accounts are found)

after this commit:
Only the user linked to the current website is properly
selected

opw-3551540

closes odoo/odoo#142110

X-original-commit: a2196253d6cf90dca3042a777703e0679f74f542
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-11-16 23:35:57 +00:00
JuanMa Núñez f9568b50d9 [CLA] signature for juanmanuelnunez
closes odoo/odoo#141741

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-11-16 23:35:55 +00:00
Soukéina Bojabza ed5794cc05 [FIX] web_editor, web_unsplash: simplify the new UX of the media dialog
In commit [1], the media dialog has been improved in order to have a
better UX when using it. However, its code is quite complex and could be
simplified.

This commit modifies again the UX of the media dialog to only consider
the addition of the "scroll button" and leaves the "Load more" button
after the attachments without making it fixed. The scroll button still
disappears once the load more button appears in the modal.

This commit also addresses the remaining review comments that were not
resolved, as it was merged in a rush.

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

task-3580707

closes odoo/odoo#141356

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-11-16 23:35:55 +00:00
Tiffany Chang (tic) b164f3feba [FIX] mrp: exclude not-picked mls at validation
Fixes same issue as odoo/odoo#141210 except for the MO flow in barcode.

closes odoo/odoo#141797

Related: odoo/enterprise#50526
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-16 16:30:54 +00:00
Victor Piryns (pivi) 980d3486f5 [PERF] hr_expense: add missing index
Since 81fe11fabb, the field
`expense_sheet_id` was converted from a One2many to a Many2one,
making it a stored field.
Since then opening the form view of an expense report can be quite
slow (around +-1.6s) in a database with a lot of `account.move`, as
the whole table needs to be scanned to match the `id` of the
`expense_sheet_id`.
We add a partial not null index on the field (since not a lot of
`account.move` are linked to an expense) and it speeds up the read
to 60ms.

Reference:
task-3572440

closes odoo/odoo#142260

X-original-commit: edefee03110c63b152148b7599aed250dc9978df
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-11-16 14:56:26 +00:00
Raphael Collet f1b1a2b44d [FIX] tests: make server-side Form use web_save() like the web client
closes odoo/odoo#142275

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-11-16 11:44:57 +00:00
roen-odoo c862d3f19e [FIX] pos_mrp: fix COGS with kit made of kit
Current behavior:
When you sell a kit made of kit, the COGS are not registered correctly
in the invoice.

Steps to reproduce:
- Create Kit A with product A
- Create Kit B with product B
- Create Kit Final with kit A and kit B
- Make sure the Category of the products is in FIFO automated
- Open PoS, and sell Kit Final and invoice it.
- Go in the backend, and check the invoice lines of the order.
- The COGS of the products are not registered correctly.

Note:
This was happening because the price unit of the kit was not calculated
correctly. Because when the product was a kit made of kit, the bom was
not exploded to consider all the components of the kit.

opw-3548604

closes odoo/odoo#142246

X-original-commit: b8b3945ee0e4a82e18f85d8bbeb1a32654088308
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-16 11:44:56 +00:00