Saturday, June 22, 2024
5 changes · saas-17.1
Miscellaneous changes
Adapt [werkzeug version for Ubuntu Noble](https://packages.ubuntu.com/noble/python3-werkzeug) mainly to avoid deprecation warnings in python 3.12. While at it, adapt for Bookworm as it provides [python 3.11](https://packages.debian.org/bookworm/python3). Forward-Port-Of: odoo/odoo#170311
Original PR description
Adapt [werkzeug version for Ubuntu Noble](https://packages.ubuntu.com/noble/python3-werkzeug) mainly to avoid deprecation warnings in python 3.12. While at it, adapt for Bookworm as it provides [python 3.11](https://packages.debian.org/bookworm/python3). Forward-Port-Of: odoo/odoo#170311
Steps to reproduce: - Create a serial number tracked product. - Activate "Packages" setting from the "Inventory" app configuration. - Create a receipt order with a stock move of that product. - Mark it as to-do and generate serial numbers. - Click on "Detailed Operations" smart button. - Select some of the move lines and click on "Put in Pack". Expected behavior: - Only the selected move lines are put in a package. Current behavior: - All of the move lines are put in a package.
Original PR description
Steps to reproduce: - Create a serial number tracked product. - Activate "Packages" setting from the "Inventory" app configuration. - Create a receipt order with a stock move of that product. - Mark it as to-do and generate serial numbers. - Click on "Detailed Operations" smart button. - Select some of the move lines and click on "Put in Pack". Expected behavior: - Only the selected move lines are put in a package. Current behavior: - All of the move lines are put in a package. Task-3857396 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168668
On some DB, it is not possible to update some modules that depend on `account` To reproduce the issue: 1. Checkout before [1] and install `account_accountant` 2. Checkout after [1] 3. Update `account_accountant` Error: a server error is displayed > Field 'code' used in domain of field 'payment_acquirer_id' ([ > ('provider', '=', code)]) must be present in view but is missing."") Commit [1] contains unstable changes: it adds a domain on the field `payment_acquirer_id` of `accoun
Original PR description
On some DB, it is not possible to update some modules that depend on `account` To reproduce the issue: 1. Checkout before [1] and install `account_accountant` 2. Checkout after [1] 3. Update…
On some DB, it is not possible to update some modules that depend on
`account`
To reproduce the issue:
1. Checkout before [1] and install `account_accountant`
2. Checkout after [1]
3. Update `account_accountant`
Error: a server error is displayed
> Field 'code' used in domain of field 'payment_acquirer_id' ([
> ('provider', '=', code)]) must be present in view but is missing."")
Commit [1] contains unstable changes: it adds a domain on the field
`payment_acquirer_id` of `account.payment.method.line` and, to make
it work, it also adds the needed field `code` on the view
`view_account_journal_form`. But, if the view is not updated on an
existing database, the domain can not work, hence the client error.
This explains why the above use case does not work:
The module `account_accountant` has a view that also inherits the
view of account `account.view_account_journal_form`. As a result,
when updating the module (and, therefore, the view of
`account_accountant`), we `:View._validate_view` the whole view, which
will lead to:
https://github.com/odoo/odoo/blob/2cbf9d840b79520854731fd6a23431c69e451775/odoo/addons/base/models/ir_ui_view.py#L2282-L2286
[1] https://github.com/odoo-dev/odoo/commit/88782d3a76fb3941b9ed7d998ec0610aa26ff611
opw-3993709
opw-3993707
sentry-5416409171
Forward-Port-Of: odoo/odoo#170308
Forward-Port-Of: odoo/odoo#169978opw-3950052 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#170114
Original PR description
opw-3950052 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#170114
Before this commit, `sale.order.line._compute_qty_at_date` method would compute only some `forecast_expected_date` at a time per loop. After this commit, `forecast_expected_date` is computed for all relevant moves in a single call. Given that `forecast_expected_date` has potential to be a slow computing field, we should minimize the number of times it is called. Log line stats for loading sale order S05312 | | # queries | SQL time | Odo
Original PR description
Before this commit, `sale.order.line._compute_qty_at_date` method would compute only some `forecast_expected_date` at a time per loop. After this commit, `forecast_expected_date` is computed for all…
Before this commit, `sale.order.line._compute_qty_at_date` method would compute only some `forecast_expected_date` at a time per loop. After this commit, `forecast_expected_date` is computed for all relevant moves in a single call. Given that `forecast_expected_date` has potential to be a slow computing field, we should minimize the number of times it is called. Log line stats for loading sale order S05312 | | # queries | SQL time | Odoo time | |------------------------------------------|---------------|---------------|-------------------------------| | before-commit | 31270 | 5.577 s | 187.606 s (timeout) | | after-commit | 31114 | 4.078 s | 10.663 s | | after-commit + PR #166784 | 233 | 0.430 s | 5.905 s | The PR #166784 stats are included just to show that there is not much more to be done in this PR to improve the query count, but that is addressed in the other PR. (Note that the customer's database is 17.0, not 15.0 - but I figured this could be made in 15.0 and fw-ported.) opw-3920584 Forward-Port-Of: odoo/odoo#169213 Forward-Port-Of: odoo/odoo#167085