Saturday, December 23, 2023
10 changes · master
Miscellaneous changes
Versions: --------- - saas-16.2+ Steps to reproduce: ------------------- 1. Have a project with tasks & sub-tasks; 2. invite portal user to project; 3. log in as portal user; 4. go to a sub-task; 5. click the parent task button. Issue: ------ Javascript is trying to get the type attribute of an `undefined` value. Cause: ------ Commit 590beec44768889a7df0ddb166763772bb8722f6 added `task_properties` to `view_task_search_form`, this search view is used by `action_project_sharin
Original PR description
Versions: --------- - saas-16.2+ Steps to reproduce: ------------------- 1. Have a project with tasks & sub-tasks; 2. invite portal user to project; 3. log in as portal user; 4. go to a sub-task; 5. click the parent task button. Issue: ------ Javascript is trying to get the type attribute of an `undefined` value. Cause: ------ Commit 590beec44768889a7df0ddb166763772bb8722f6 added `task_properties` to `view_task_search_form`, this search view is used by `action_project_sharing_view_parent_task`, bringing it into view for portal users who do not have read access to this field. Solution: --------- Add a `search_view_ref` to the context to force using `project_sharing_project_task_view_search` instead. opw-3498012 Forward-Port-Of: odoo/odoo#147107
Related to https://github.com/odoo/enterprise/pull/52648 we add the analytic distributino to the move vals for the exchange diff move. We also remove the precompute on the fields, manual backport of https://github.com/odoo/odoo/commit/b9047febf3c4d67ce409f9f1dba8a9cc7c7165fe opw-3603668 Forward-Port-Of: odoo/odoo#147332 Forward-Port-Of: odoo/odoo#146549
Original PR description
Related to https://github.com/odoo/enterprise/pull/52648 we add the analytic distributino to the move vals for the exchange diff move. We also remove the precompute on the fields, manual backport of https://github.com/odoo/odoo/commit/b9047febf3c4d67ce409f9f1dba8a9cc7c7165fe opw-3603668 Forward-Port-Of: odoo/odoo#147332 Forward-Port-Of: odoo/odoo#146549
Comes from https://github.com/odoo/odoo/pull/116779 Forward-Port-Of: odoo/odoo#147318
Original PR description
Comes from https://github.com/odoo/odoo/pull/116779 Forward-Port-Of: odoo/odoo#147318
When we add a new record N to an one2many tree view from an existing record X form, during the onchange() on the one2many comodel, the cache of the N.one2many contains only the new record X (the siblings aren't in it). Because of this, the result of compute methods may be incorrect and the form won't be updated accordingly. See the test for a concrete example. Technically, this is due to _update_cache() forcing the inverse field value to the single value of the new record (`not cache.contains
Original PR description
When we add a new record N to an one2many tree view from an existing record X form, during the onchange() on the one2many comodel, the cache of the N.one2many contains only the new record X (the siblings aren't in it). Because of this, the result of compute methods may be incorrect and the form won't be updated accordingly. See the test for a concrete example. Technically, this is due to _update_cache() forcing the inverse field value to the single value of the new record (`not cache.contains(inv_rec, invf)` is True), instead of also considering the original values (which is properly done by Field._update()). https://github.com/odoo/enterprise/pull/53298 Forward-Port-Of: odoo/odoo#146778
### [[FIX] mail: mime type alias] Some printers incorrectly specify the content-type of PDFs as "pdf" instead of the correct "application/pdf." To handle this situation, an alias has been introduced, treating content-type "pdf" as "application/pdf." ### [Reproducing original bug] 1. run odoo with documents module 2. prepare email file 2.1 create email with a pdf attached 2.2 export email to .eml 2.3 modify content-type of the pdf from "application/pdf" to "pdf" 3.
Original PR description
### [[FIX] mail: mime type alias] Some printers incorrectly specify the content-type of PDFs as "pdf" instead of the correct "application/pdf." To handle this situation, an alias has been introduced,…
### [[FIX] mail: mime type alias]
Some printers incorrectly specify the content-type of PDFs as "pdf" instead of
the correct "application/pdf." To handle this situation,
an alias has been introduced, treating content-type "pdf" as "application/pdf."
### [Reproducing original bug]
1. run odoo with documents module
2. prepare email file
2.1 create email with a pdf attached
2.2 export email to .eml
2.3 modify content-type of the pdf from "application/pdf" to "pdf"
3. send prepared email to odoo to inbox-financial alias (the default one
creating documents)
4. Go to documents, observe that the created PDF is blank!
### [Motivation for fix]
Since:
1. Odoo uses the Python built-in module for parsing emails*
(the actual issue lies outside Odoo code).
2. "pdf" is not an accepted MIME type according to current norms
(https://datatracker.ietf.org/doc/html/rfc6838#section-4.2).
It's not an actual Odoo bug.
However, redirecting this issue to the appropriate printer manufacturer and
waiting for a fix may be time-consuming, hence the proposed fix.
*function parsing email with the Python built-in module
https://github.com/odoo/odoo/blob/407ea60796a2b18eb02f5569e1cfab9f1163a572/addons/mail/models/mail_thread.py#L1282
opw-3462260
Forward-Port-Of: odoo/odoo#146139The default is 25000 rounds, which is too low nowadays. An off-the-shelf laptop takes ~400ms for a single hash at 600k rounds. Forward-Port-Of: odoo/odoo#146896 Forward-Port-Of: odoo/odoo#146865
Original PR description
The default is 25000 rounds, which is too low nowadays. An off-the-shelf laptop takes ~400ms for a single hash at 600k rounds. Forward-Port-Of: odoo/odoo#146896 Forward-Port-Of: odoo/odoo#146865
Steps to reproduce: - Install Accounting - Activate "Batch Payments" in Accounting settings - Go to "Accounting / Customers / Payments" - Create more than 20 payments - Select all the payments and create a batch payment - Confirm the batch payment and print it => Each page of the generated PDF only contains 20 payments, letting a lot of white space at the bottom of the page between each page. If the customer names are very long and are displayed on several lines, it can happen that the
Original PR description
Steps to reproduce: - Install Accounting - Activate "Batch Payments" in Accounting settings - Go to "Accounting / Customers / Payments" - Create more than 20 payments - Select all the payments and create a batch payment - Confirm the batch payment and print it => Each page of the generated PDF only contains 20 payments, letting a lot of white space at the bottom of the page between each page. If the customer names are very long and are displayed on several lines, it can happen that the 1st page contains the 19 first payments (displayed on the whole page) and the 2nd page only contains the 2Oth payment. Then the next 20 payments are displayed on the 3rd page, leaving the 2nd page almost empty. opw-3597753 Forward-Port-Of: odoo/enterprise#53357 Forward-Port-Of: odoo/enterprise#51604
This reverts commit 31dc1d2e9985f739fed52b3c04459ed9068acda5 because the root cause has been fixed in the ORM, see the community version. https://github.com/odoo/odoo/pull/146778 Forward-Port-Of: odoo/enterprise#53298
Original PR description
This reverts commit 31dc1d2e9985f739fed52b3c04459ed9068acda5 because the root cause has been fixed in the ORM, see the community version. https://github.com/odoo/odoo/pull/146778 Forward-Port-Of: odoo/enterprise#53298
When having an analytic distribution model set with account prefix matching exchenge diff accounts, this model is not taken into account at the creation of the exchange diff line on the reconciliation widget. With this commit, we add a dependency to the analytic compute to enforce the computation at the creation of the exchange diff line. We also keep trace of the analytic distributions selected on the line to avoid them to be erased at the creation of the exchange diff move. Steps: - Have a d
Original PR description
When having an analytic distribution model set with account prefix matching exchenge diff accounts, this model is not taken into account at the creation of the exchange diff line on the…
When having an analytic distribution model set with account
prefix matching exchenge diff accounts, this model is not taken
into account at the creation of the exchange diff line on the
reconciliation widget.
With this commit, we add a dependency to the analytic compute
to enforce the computation at the creation of the exchange diff
line. We also keep trace of the analytic distributions selected
on the line to avoid them to be erased at the creation of the
exchange diff move.
Steps:
- Have a distribution model for exchange diff account prefix
- Have a payment and a statement line in two different currencies
and two different rate date
- In bank reco widget, select the statement line and select
payment as counterpart
- Select the exchange diff line created
--> The analytic distribution set on the model is not set on the form,
- Now select another analytic distribution, different than the one
set on the model
- Validate the reconciliation
- Go to the exchange diff move
--> The selected distribution has been replaced by the one set one the
model
opw-3603668
Forward-Port-Of: odoo/enterprise#53322
Forward-Port-Of: odoo/enterprise#52648Globally reverts odoo/enterprise@74105d3fc1448cbd1b0942fd88759cf87f96bb7c Forward-Port-Of: odoo/enterprise#53305 Forward-Port-Of: odoo/enterprise#53181
Original PR description
Globally reverts odoo/enterprise@74105d3fc1448cbd1b0942fd88759cf87f96bb7c Forward-Port-Of: odoo/enterprise#53305 Forward-Port-Of: odoo/enterprise#53181