Tuesday, May 14, 2024
35 changes · saas-17.1
Miscellaneous changes
To reproduce the issue: 1) Create a company MAIN, and a branch BRANCH 2) Create a payment term in MAIN, with company_id = MAIN 3) Make MAIN your active company 4) Create a new invoice, and try to assign it the payment term created in 2). ==> It's not possible. This is because the company check ran for the payment term assigned to an invoice only check for equality of the company ; it does not consider the fact the payment term could be defined in a parent of the current branch. This f
Original PR description
To reproduce the issue: 1) Create a company MAIN, and a branch BRANCH 2) Create a payment term in MAIN, with company_id = MAIN 3) Make MAIN your active company 4) Create a new invoice, and try to assign it the payment term created in 2). ==> It's not possible. This is because the company check ran for the payment term assigned to an invoice only check for equality of the company ; it does not consider the fact the payment term could be defined in a parent of the current branch. This fix makes it possible to use payment terms defined for the parent companies. Forward-Port-Of: odoo/odoo#164767
Before this PR, on smaller screens the onboarding steps illustration sometimes overlapped the close button, making it difficult to dismiss the onboarding steps. This fix ensures the close button is no longer obscured. task-3749740 <details> <summary>Preview (See changes)</summary> <table> <tr> <td>Before</td> <td>After </td> <tr> <td><img src="https://github.com/odoo/odoo/assets/80678921/01cd9478-1e9d-4736-9599-3df8bda380b1" alt="before"></td> <td><img src="https://github.
Original PR description
Before this PR, on smaller screens the onboarding steps illustration sometimes overlapped the close button, making it difficult to dismiss the onboarding steps. This fix ensures the close button is no longer obscured. task-3749740 <details> <summary>Preview (See changes)</summary> <table> <tr> <td>Before</td> <td>After </td> <tr> <td><img src="https://github.com/odoo/odoo/assets/80678921/01cd9478-1e9d-4736-9599-3df8bda380b1" alt="before"></td> <td><img src="https://github.com/odoo/odoo/assets/80678921/b8d2ec5a-3bea-48d9-8320-b0872ae04be8" alt="after"</td> </table> </details> --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#163966
This commit adds the missing neutralization necessary for the pos_mercado_pago module introduced in [1] The purpose of the standard neutralization framework is to allow us to create database copies that will not interact with external systems in ways that could impact the production database (or if it is not possible to prevent the interactions, make sure that they are benign or wont result in actual changes), or impact the customers of the operator of the production database. This is main
Original PR description
This commit adds the missing neutralization necessary for the pos_mercado_pago module introduced in [1] The purpose of the standard neutralization framework is to allow us to create database copies that will not interact with external systems in ways that could impact the production database (or if it is not possible to prevent the interactions, make sure that they are benign or wont result in actual changes), or impact the customers of the operator of the production database. This is mainly useful to allow safe support investigation on database duplicates. [1] https://github.com/odoo/odoo/pull/154962 Forward-Port-Of: odoo/odoo#165335
Problem: The arabic_english_invoice report displays product name twice since the description includes the product name by default. Solution:The report should only display the description if the description is not the same as the products' name. Otherwise, the report should display the products' name in the same language as the customer. Steps to Reproduce on Runbot: 1. Install `sale`, `l10n_sa`, `l10n_gcc_invoice` 2. Switch to SA Company 3. Create a product with sales description 4. Cr
Original PR description
Problem: The arabic_english_invoice report displays product name twice since the description includes the product name by default. Solution:The report should only display the description if the description is not the same as the products' name. Otherwise, the report should display the products' name in the same language as the customer. Steps to Reproduce on Runbot: 1. Install `sale`, `l10n_sa`, `l10n_gcc_invoice` 2. Switch to SA Company 3. Create a product with sales description 4. Create an invoice with the product from step 3 5. Print the invoice report 6. Observe the product name is displayed twice 7. If Arabic is enabled as a language, the product name will be displayed three times, with the 3rd being in Arabic. [Ticket link](https://www.odoo.com/web#model=project.task&id=3768196) opw-3768196 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157774
Before this commit, if the form view of an x2many (non editable inline) field contained a custom footer (i.e. a <footer> node in its arch, to override the default footer of the FormViewDialog), the custom footer was correctly displayed for the first dialog to open, but as of the second one, the default footer was displayed instead. The issue has been introduced by [1], since which we directly receive the arch as an xmlDoc, shared between all instances of FormViewDialog that can be opened from th
Original PR description
Before this commit, if the form view of an x2many (non editable inline) field contained a custom footer (i.e. a <footer> node in its arch, to override the default footer of the FormViewDialog), the custom footer was correctly displayed for the first dialog to open, but as of the second one, the default footer was displayed instead. The issue has been introduced by [1], since which we directly receive the arch as an xmlDoc, shared between all instances of FormViewDialog that can be opened from that x2many. So manipulating it (e.g. to remove the <footer> from it), impacts the subsequent dialogs that can be opened. This commit ensures that we manipulate a copy. [1] #136376 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 Forward-Port-Of: odoo/odoo#160181
-Remove duplicate dialog_size 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 Forward-Port-Of: odoo/odoo#165353
Original PR description
-Remove duplicate dialog_size 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 Forward-Port-Of: odoo/odoo#165353
Before this commit, the `point_of_sale.OrderReceipt` template would always print taxes followed by a % symbol. This should not be so for fixed taxes, whose amount is not a percentage. This commit removes the % symbol after fixed taxes. As an improvement it also displays the tax name in the first column, since the tax amount is already displayed in the following column. No task. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior afte
Original PR description
Before this commit, the `point_of_sale.OrderReceipt` template would always print taxes followed by a % symbol. This should not be so for fixed taxes, whose amount is not a percentage. This commit removes the % symbol after fixed taxes. As an improvement it also displays the tax name in the first column, since the tax amount is already displayed in the following column. No task. 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 Forward-Port-Of: odoo/odoo#163391
The goal of this PR is to simply disable the "Text Animation" button from the editor's toolbar in translate mode. An adaptation of code in stable `17.0` will be added to allow the use of text options (text animations & text highlights) in the translation mode, mainly by allowing the creation of snippet editors if the target is a text option snippet. opw-3686777 Forward-Port-Of: odoo/odoo#157726 Forward-Port-Of: odoo/odoo#157087
Original PR description
The goal of this PR is to simply disable the "Text Animation" button from the editor's toolbar in translate mode. An adaptation of code in stable `17.0` will be added to allow the use of text options (text animations & text highlights) in the translation mode, mainly by allowing the creation of snippet editors if the target is a text option snippet. opw-3686777 Forward-Port-Of: odoo/odoo#157726 Forward-Port-Of: odoo/odoo#157087
[REM] account: remove validation on bills ref Remove validation on bills ref and allow users to have multiple bills with same ref Reason: improve user experience with the system as it's a pain for them in a real life senario Task-3869240 enterprise-PR#https://github.com/odoo/enterprise/pull/62395 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161995
Original PR description
[REM] account: remove validation on bills ref Remove validation on bills ref and allow users to have multiple bills with same ref Reason: improve user experience with the system as it's a pain for them in a real life senario Task-3869240 enterprise-PR#https://github.com/odoo/enterprise/pull/62395 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161995
Have a numeric field with a given value (e.g. 25.00). Edit it in a way the value is actually the same (e.g. 25). Click out. Before this commit, the value wasn't formatted as it should be, i.e. 25 was still displayed in the input, whereas it should display 25.00. This commit fixes the issue. Similar as https://github.com/odoo/odoo/pull/164953 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I h
Original PR description
Have a numeric field with a given value (e.g. 25.00). Edit it in a way the value is actually the same (e.g. 25). Click out. Before this commit, the value wasn't formatted as it should be, i.e. 25 was still displayed in the input, whereas it should display 25.00. This commit fixes the issue. Similar as https://github.com/odoo/odoo/pull/164953 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 Forward-Port-Of: odoo/odoo#165245
Backport of: https://github.com/odoo/odoo/pull/147902 This commit will add the basic package of the malta localisation. - COA - Taxes - Default settings - Tax report - Fiscal position task: 3627705 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161616
Original PR description
Backport of: https://github.com/odoo/odoo/pull/147902 This commit will add the basic package of the malta localisation. - COA - Taxes - Default settings - Tax report - Fiscal position task: 3627705 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161616
*: website, survey Since commit [1] the calendar icon in input group date is not clickable anymore and does not open the date picker anymore. This commit simply restore that by auto discovering the calendar icon, should the input group follow this common pattern: ```xml <div class="input-group date"> <input type="text" class="form-control datetimepicker-input" /> <div class="input-group-text"><i class="fa fa-calendar"></i></div> </div> ``` This see
Original PR description
*: website, survey Since commit [1] the calendar icon in input group date is not clickable anymore and does not open the date picker anymore. This commit simply restore that by auto discovering the…
*: website, survey
Since commit [1] the calendar icon in input group date is not clickable
anymore and does not open the date picker anymore.
This commit simply restore that by auto discovering the calendar icon,
should the input group follow this common pattern:
```xml
<div class="input-group date">
<input
type="text"
class="form-control datetimepicker-input"
/>
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
```
This seems enough to cover all cases detected in the website apps:
- <details><summary>The two datepicker in /my/opportunity when editing the lead to adapt
the "Expected Closing" and "Next Activity Date" fields</summary>

</details>
- <details><summary>The website form date(time) input</summary>

</details>
- <details><summary>The ecommerce renting product rental period inputs ("from" and "to"
dates) </summary>

</details>
- <details><summary>The `o_website_sale_daterange_picker` snippet</summary>

</details>
- <details><summary>The survey date fields</summary>

</details>
- ..maybe other places..
Should there be cases needing this feature for calendar icons which are
not following the suggested input group layout, they can do it this way:
```diff
- this.call("datetime_picker", "create", {
+ const picker = this.call("datetime_picker", "create", {
// ...
}).enable();
+ this.el.parentNode.querySelector(".input-group-text").addEventListener("click", picker.openPicker(0));
```
[1]: https://github.com/odoo/odoo/commit/910897fc97d87b08f01627094ec8c159f5267628
Forward-Port-Of: odoo/odoo#161466There is an issue with some of the images having `loading="lazy"` attribute. Those are incorrectly marked as edited (dirty). This is because those images do receive a `min-height` style attribute change when the widget is started thanks to [1]: - On page load, the images receive `style.minHeight = '1px';` - Once the images have been load a few moment later, this `min-height` is removed / restored to its initial value. If there were no initial value and if there is no other style att
Original PR description
There is an issue with some of the images having `loading="lazy"` attribute. Those are incorrectly marked as edited (dirty). This is because those images do receive a `min-height` style attribute…
There is an issue with some of the images having `loading="lazy"` attribute. Those are incorrectly marked as edited (dirty). This is because those images do receive a `min-height` style attribute change when the widget is started thanks to [1]: - On page load, the images receive `style.minHeight = '1px';` - Once the images have been load a few moment later, this `min-height` is removed / restored to its initial value. If there were no initial value and if there is no other style attribute on the image, it will leave the image with an empty `style` attribute. But commit [2] made it so those empty attribute (class/style) are removed from the DOM as part of the sanitizing process. This commit does 2 things: - It disable the wysiwyg observer while commit [1] `min-height` operations are being one. - It prevent commit [1] to leave images with an empty `style` attribute. Note: - it was detected on our Odoo.com/app/expenses where a single word change in a section flags 27 unrelated images as o_dirty and ultimately triggers 27 save rpc call instead of only one. - commit [2] was merged in Odoo 16 but only seems to lead to this bug in Odoo 16.4. Something else is probably involved in the o_dirty addition process. It doesn't seems worth it investigating deeper to find exactly what as this commit changes are things that probably should have been done initially anyway. [1]: https://github.com/odoo/odoo/commit/e9ef21b6cd5ae58322fa9102f9f34f06835f0485 [2]: https://github.com/odoo/odoo/commit/5962b9ee2e90cc04ede1c1f9bbb519869db77f71 Forward-Port-Of: odoo/odoo#164742 Forward-Port-Of: odoo/odoo#150535
`test_invoice_is_final` enforces that `_create_invoices` is called with the final argument. The issue is that when overriding the method in l10n_ec_website_sale, we call super() without respecifying the arguments, which makes the test fail. runbot-56914 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164975
Original PR description
`test_invoice_is_final` enforces that `_create_invoices` is called with the final argument. The issue is that when overriding the method in l10n_ec_website_sale, we call super() without respecifying the arguments, which makes the test fail. runbot-56914 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164975
Current behavior: When adding a product with variant in a self order. The extra price was not saved correctly, and so when modifying the quantity from the normal PoS the price was not taking the extra price into account. Steps to reproduce: - Setup PoS to use QR Menu ordering - Create a product with a variant (never create option) - Make sure the variants adds an extra price - Open the self ordering screen an add this product - Add the product to the order and validate it - Go on the n
Original PR description
Current behavior: When adding a product with variant in a self order. The extra price was not saved correctly, and so when modifying the quantity from the normal PoS the price was not taking the extra price into account. Steps to reproduce: - Setup PoS to use QR Menu ordering - Create a product with a variant (never create option) - Make sure the variants adds an extra price - Open the self ordering screen an add this product - Add the product to the order and validate it - Go on the normal PoS and open the order - Change the quantity of the product - The unit price is back to the normal (not considering the extra price) opw-3769465 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#163401
The issue: When many bills that already exist in the system and are in a pending state in the proxy server, Odoo infinitely tries to pull them at each call of the cron, which leads to not fetching the new bill and being stuck only with the existing ones Expected behavior: To fetch new bills and avoid the existing ones in the upcoming calls of the cron opw-3851896 Forward-Port-Of: odoo/odoo#164592
Original PR description
The issue: When many bills that already exist in the system and are in a pending state in the proxy server, Odoo infinitely tries to pull them at each call of the cron, which leads to not fetching the new bill and being stuck only with the existing ones Expected behavior: To fetch new bills and avoid the existing ones in the upcoming calls of the cron opw-3851896 Forward-Port-Of: odoo/odoo#164592
This implements a new approach to solve selection issues around links (allowing the cursor at the inner _and_ outer edges of links). In the sanitization process, every link now receives 4 zero-width non-breaking spaces (unicode FEFF characters, hereafter referred to as ZWNBSP): - one before the link - one as the link's first child - one as the link's last child - one after the link like so: `//ZWNBSP//<a>//ZWNBSP//label//ZWNBSP//</a>//ZWNBSP`. An advantage of ZWNBSP over regular ZWS
Original PR description
This implements a new approach to solve selection issues around links (allowing the cursor at the inner _and_ outer edges of links). In the sanitization process, every link now receives 4 zero-width…
This implements a new approach to solve selection issues around links (allowing the cursor at the inner _and_ outer edges of links). In the sanitization process, every link now receives 4 zero-width non-breaking spaces (unicode FEFF characters, hereafter referred to as ZWNBSP): - one before the link - one as the link's first child - one as the link's last child - one after the link like so: `//ZWNBSP//<a>//ZWNBSP//label//ZWNBSP//</a>//ZWNBSP`. An advantage of ZWNBSP over regular ZWSP (unicode 200B) is they're less likely to be used deliberately by the user, so much so that we can safely assume all of them are technical and can be removed indiscriminately. ZWSP and ZWNBSP are used to mark a separation between words in languages that don't use spaces for that purpose (eg, Lao). ZWNBSP are to ZWSP what NBSP (unicode 00A0) are to regular spaces. Because of that advantage, we don't need to track the ZWNBSP (so there is no need to wrap them in `span` elements), simplifying the code considerably. We therefore now remove all ZWNBSP when saving. There is a possibility to introduce "orphaned" ZWNBSP during the editing process, if for instance the link has a big enough padding or margin that it's possible to click between two of a link's ZWNBSP (one outer, the other inner). Inserting a character or a paragraph break in such a position will move the ZWNBSP to a place where it's not useful anymore. The sanitizer will then reintroduce the useful ZWNBSP in their rightful places. We remove the orphaned ZWNBSP from the sanitizer whenever that is possible without risking to break the selection. To properly deal with this change, we also change the handlers for the delete/backspace/deleteRange, enter and arrow keys. This PR also makes some indirectly related changes: - It fixes a bug with Bootstrap buttons in the "backend" where it's currently impossible to put the selection within them (and the wrong cursor appears) because of a Boostrap CSS. - It introduces a debugging utility function to log the selection. - It slightly modifies the way the `enter` key handler works at the inner edges of links so that a paragraph break will never be inserted at the end of the link (creating an empty link). Co-authored-by: Sébastien Geelen <sge@odoo.com> task-3604728 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164243 Forward-Port-Of: odoo/odoo#157200
o_popover_header was removed on [1], so the bootstrap class popover-header could be used instead. References: - [1] https://github.com/odoo/odoo/commit/777eb767 **16.0:**  **17.0 previous this commit:**  **17.0 after this commit:** ![
Original PR description
o_popover_header was removed on [1], so the bootstrap class popover-header could be used instead. References: - [1] https://github.com/odoo/odoo/commit/777eb767 **16.0:**  **17.0 previous this commit:**  **17.0 after this commit:**  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#163684
Commit that introduced the issue: https://github.com/odoo/odoo/commit/e806328bc5bd8526594e8e2b90685c03504dea79 Issue: ===== when an icon is converted to png it's cropped. Steps to reproduce the issue: ============================= - Go to this url: {host}/web_editor/font_to_img/61802/rgb(0,143,140)/rgb(255,255,255)/190x200 - The icon is cropped. Origin of the issue: ===================== In this case we are using `top` and `left` as they are the top left corner of the icon insid
Original PR description
Commit that introduced the issue:
https://github.com/odoo/odoo/commit/e806328bc5bd8526594e8e2b90685c03504dea79
Issue:
=====
when an icon is converted to png it's cropped.
Steps to reproduce the issue:
=============================
- Go to this url: {host}/web_editor/font_to_img/61802/rgb(0,143,140)/rgb(255,255,255)/190x200
- The icon is cropped.
Origin of the issue:
=====================
In this case we are using `top` and `left` as they are the top left corner of the icon inside the image , but in reality the returned value is 0 , and the top left corner is represented by `box[0]` and `box[1]`.
Solution:
=========
Use of `box` values instead of `top` and `left`
Before:
======

After:
====

opw-3865845
Forward-Port-Of: odoo/odoo#163006This PR add the Mercado Pago "Smart Point" payment terminal dedicated to the LATAM (Latin America) region task-3350386 mool --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#154962
Original PR description
This PR add the Mercado Pago "Smart Point" payment terminal dedicated to the LATAM (Latin America) region
task-3350386
mool
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#154962Currently, when a portal user creates a task in a project, the stage is set to none, which create a new stage in the pipe. Steps to reproduce: ------------------- * Connect to the db as a portal user * Navigate to **Projects** * Select any * Create a new task * Refresh the page > Observation: The task is created in the None stage Why the fix: ------------ The `stage_id` of the task created by the portal user is set to false here: https://github.com/odoo/odoo/blob/e38f711864bd380f
Original PR description
Currently, when a portal user creates a task in a project, the stage is set to none, which create a new stage in the pipe. Steps to reproduce: ------------------- * Connect to the db as a portal user…
Currently, when a portal user creates a task in a project, the stage is set to none, which create a new stage in the pipe.
Steps to reproduce:
-------------------
* Connect to the db as a portal user
* Navigate to **Projects**
* Select any
* Create a new task
* Refresh the page
> Observation: The task is created in the None stage
Why the fix:
------------
The `stage_id` of the task created by the portal user is set to false here:
https://github.com/odoo/odoo/blob/e38f711864bd380f793c1efa16c86c6ba2229646/addons/project/models/project_task.py#L928-L929
Prior to https://github.com/odoo/odoo/commit/fb88a7448c75fdcbe1d9c3664402a1dea2733326, the `project_id` was computed as `project_id = vals.get('project_id') or self.env.context.get('default_project_id')`. Now it is defined as follows:
https://github.com/odoo/odoo/blob/e38f711864bd380f793c1efa16c86c6ba2229646/addons/project/models/project_task.py#L894
If `vals.get('project_id')` is false/none, the task is still created using `self.env.context.get('default_project_id')` for portal users.
https://github.com/odoo/odoo/blob/e38f711864bd380f793c1efa16c86c6ba2229646/addons/project/models/project_task.py#L955-L958
https://github.com/odoo/odoo/blob/e38f711864bd380f793c1efa16c86c6ba2229646/addons/project/models/project_task.py#L813-L820
We recompute `project_id` using the context value. We do that after the following piece of code so that, in the case of subtasks, they are not displayed in the project.
https://github.com/odoo/odoo/blob/8780f8d9799eed7188d6577c6bb2690df598196e/addons/project/models/project_task.py#L916-L929
This aloows to keep the writing cascade on the field `project_id`
https://github.com/odoo/odoo/blob/8780f8d9799eed7188d6577c6bb2690df598196e/addons/project/models/project_task.py#L1007-L1009
opw-3873983
Forward-Port-Of: odoo/odoo#164201Description of the issue/feature this PR addresses: Before this PR the field is_kits is not searchable. It is useful in large database to find all product kit easely. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164766 Forward-Port-Of: odoo/odoo#156019
Original PR description
Description of the issue/feature this PR addresses: Before this PR the field is_kits is not searchable. It is useful in large database to find all product kit easely. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164766 Forward-Port-Of: odoo/odoo#156019
Previously, when a popup was opened and it was possible to open a second popup within that popup, when the second popup was opened it was still possible to interact with the first popup. Now we've added a zIndex to the popup service, which corrects this problem Forward-Port-Of: odoo/odoo#165200
Original PR description
Previously, when a popup was opened and it was possible to open a second popup within that popup, when the second popup was opened it was still possible to interact with the first popup. Now we've added a zIndex to the popup service, which corrects this problem Forward-Port-Of: odoo/odoo#165200
Forward-Port-Of: odoo/odoo#165235
Original PR description
Forward-Port-Of: odoo/odoo#165235
## Description The `onchange` triggered when changing the `allow_billable` setting of a large long living project with a high number of associated timesheets can take a quite a while. After profiling, a significant portion of the bottleneck was coming from *frequent* calls to the `__hash__` function, called when initializing a new `set` in https://github.com/odoo/odoo/blob/cf9aa2a14761a417c641243fc0b2be121c387b46/odoo/models.py#L6838 Left Heavy profile:  ## Improvements - Invariant hoisting: the `set(self._ids)` can be lifted out of the lambda scope capture, passing only a reference to a local variable for all callsite of the lambda. This prevents the re-computation of `set(self._ids)` for each record in `cache_records` due to the linear iteration done by `filtered`. - `not isdisjoint` vs `intersection`: the lambda is checking for the existence of an intersection between 2 sets. But in python the `&` or `intersection` method *construct* a new instance of a `set`. In our case we don't care about the resulting intersection, only about the existence of it. We can improve the situation by inverting the logic using `not isdisjoint`, as `isdisjoint` is simpler internal implementation and doesn't construct any new set, it just checks for disjunction. - CPython `intersection`: https://github.com/python/cpython/blob/333c7dccd87c637d0b15cf81f9bbec28e39664fd/Objects/setobject.c#L1179-L1256 - CPython `isdisjoint`: https://github.com/python/cpython/blob/333c7dccd87c637d0b15cf81f9bbec28e39664fd/Objects/setobject.c#L1338-L1373 A local small `timeit` benchmark showed +- 25% faster performance in favor of `not isdisjoint`. ## Benchmark On a staging database (saas-17.1, blindly backported), the `onchange` triggered by setting a project `allow_billable` from `True` -> `False`, with 70k tasks, and 25k associated timesheets. | | Before | After | Speed Up | |---------|----------------------|---------------------|-------------| | Timings | 246.66 sec (4.1 min) | 66.83 sec (1.1 min) | 3.6x faster | ## Reference task-3872314 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#165138
The aim of this commit is to fix the view returned from the expense split wizard Context: When splitting an expense, the wizard view returns the expense list view with "my expenses" a "to report" filters activated. This makes splitting an expense attributed to someone else return an empty view. After this commit: The view now uses a domain that selects the expenses the wizard modified and/or created task-id: 3911134 --- I confirm I have signed the CLA and read the PR guidelines at
Original PR description
The aim of this commit is to fix the view returned from the expense split wizard Context: When splitting an expense, the wizard view returns the expense list view with "my expenses" a "to report" filters activated. This makes splitting an expense attributed to someone else return an empty view. After this commit: The view now uses a domain that selects the expenses the wizard modified and/or created task-id: 3911134 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164499
Changed the chart_template_ref that wasn't adapted for a fw-port. Also added the tag, so the test's requests are not blocked in 17+ runbot-64732 runbot-62320 Forward-Port-Of: odoo/enterprise#62375
Original PR description
Changed the chart_template_ref that wasn't adapted for a fw-port. Also added the tag, so the test's requests are not blocked in 17+ runbot-64732 runbot-62320 Forward-Port-Of: odoo/enterprise#62375
Check Report Summary line columns were not aligned correctly, fixing it to have partner_name at the beginning, date at the middle, and check sequence number at the end of the line. task id: 3708433 Forward-Port-Of: odoo/enterprise#61149
Original PR description
Check Report Summary line columns were not aligned correctly, fixing it to have partner_name at the beginning, date at the middle, and check sequence number at the end of the line. task id: 3708433 Forward-Port-Of: odoo/enterprise#61149
[REM] account: remove validation on bills ref Remove validation on bills ref and allow users to have multiple bills with same ref Reason: improve user experience with the system as it's a pain for them in a real life senario Task-3869240 odoo-pr: https://github.com/odoo/odoo/pull/161995 Forward-Port-Of: odoo/enterprise#62395
Original PR description
[REM] account: remove validation on bills ref Remove validation on bills ref and allow users to have multiple bills with same ref Reason: improve user experience with the system as it's a pain for them in a real life senario Task-3869240 odoo-pr: https://github.com/odoo/odoo/pull/161995 Forward-Port-Of: odoo/enterprise#62395
When zooming in on the gantt view, the gantt header slots could be badly displayed with an observed decalage with the grid cells. We fix that problem by making the gantt header be a grid and putting grid coordinates to some of its children. opw-3850750 Forward-Port-Of: odoo/enterprise#61939 Forward-Port-Of: odoo/enterprise#61849
Original PR description
When zooming in on the gantt view, the gantt header slots could be badly displayed with an observed decalage with the grid cells. We fix that problem by making the gantt header be a grid and putting grid coordinates to some of its children. opw-3850750 Forward-Port-Of: odoo/enterprise#61939 Forward-Port-Of: odoo/enterprise#61849
Backport of: https://github.com/odoo/enterprise/pull/53580 This commit will add the balance sheet and profit and loss of the malta. task: 3627705 Forward-Port-Of: odoo/enterprise#60595
Original PR description
Backport of: https://github.com/odoo/enterprise/pull/53580 This commit will add the balance sheet and profit and loss of the malta. task: 3627705 Forward-Port-Of: odoo/enterprise#60595
Community PR: https://github.com/odoo/odoo/pull/159995 task-3604728 Forward-Port-Of: odoo/enterprise#61893 Forward-Port-Of: odoo/enterprise#60751
Original PR description
Community PR: https://github.com/odoo/odoo/pull/159995 task-3604728 Forward-Port-Of: odoo/enterprise#61893 Forward-Port-Of: odoo/enterprise#60751
This will add the previous year occupation to the double holiday computation. Task: 3893810 Forward-Port-Of: odoo/enterprise#61862
Original PR description
This will add the previous year occupation to the double holiday computation. Task: 3893810 Forward-Port-Of: odoo/enterprise#61862
As packages amount on customer locations side could be huge, don't retrieve those packages as they are not needed. @svs-odoo @Aurelienvd Forward-Port-Of: odoo/enterprise#59473
Original PR description
As packages amount on customer locations side could be huge, don't retrieve those packages as they are not needed. @svs-odoo @Aurelienvd Forward-Port-Of: odoo/enterprise#59473
Avalara fields should not be shown to countries that are neither US or Canada. This commit handles this. task-3477234 Forward-Port-Of: odoo/enterprise#60554
Original PR description
Avalara fields should not be shown to countries that are neither US or Canada. This commit handles this. task-3477234 Forward-Port-Of: odoo/enterprise#60554