Wednesday, January 15, 2025
20 changes · 17.0
Resolved issues and error corrections
Inventory count sheets no longer show placeholder text when report data is missing. This prevents confusing dummy content from appearing on real stock reports and keeps printed counts clearer for users.
Original PR description
Since commit 567b8d676b3b6dc747df4d9bf10e7a91b4cb61bb It used to insert a placeholder when the data is not there but we won't on real report 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
The media dialog now correctly respects settings that hide video options, even when video commands are otherwise allowed. This prevents the video tab from appearing in reports or other contexts where videos were intentionally disabled.
Original PR description
After merging of this PR [1], video tab will not be visible in media dialog in report as `allowCommandVideo` is false. But this will override `noVideos` option from `params` to false if `allowCommandVideo` is true and video tab will be visible even if `noVideos` is `true`. This PR makes sure that `noVideos` property from `params` should be checked if `allowCommandVideo` is true. [1]: 187251 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures the sale subscription test module can be uninstalled cleanly during upgrade processes. It adds proper tracking identifiers to temporary subscription orders and invoices so related test records can be removed without blocking the upgrade.
Original PR description
The uninstallation of this test module, which is a standard step during upgrades, requires the removal of the test product `product_fire_insurance`. This product is referenced by sale orders and invoices and deferred invoices created dynamically and have no xmlids, blocking the removal of the record. This commits adds the xmlids to the dynamically created orders and moves so they can be removed as well during the module uninstallation. The target sale orders are those created via 'copy' and when doing upsell and renew for subscriptions. The target moves are the regular invoices for the sale orders and their deferred moves.
Miscellaneous changes
Interfaces/Drivers inherit from an `Interface`/`Driver` class. These parent classes should not be registered as an actual interface/driver. This is now filterered at instanciation in order to avoid looping over useless elements later. Forward-Port-Of: odoo/odoo#193510
Original PR description
Interfaces/Drivers inherit from an `Interface`/`Driver` class. These parent classes should not be registered as an actual interface/driver. This is now filterered at instanciation in order to avoid looping over useless elements later. Forward-Port-Of: odoo/odoo#193510
Steps to reproduce: Not reproducible in V16. However, in older versions, it was possible to have multiple finished_moves with different quantities (see https://github.com/odoo/odoo/pull/46718). This fix ensures such issues are avoided in the future and also addresses potential problems for clients migrating from older versions. Example: Two finished_moves with different quantities. Before the fix, both moves would be updated based on the unbuild quantity, resulting in incorrect quantit
Original PR description
Steps to reproduce: Not reproducible in V16. However, in older versions, it was possible to have multiple finished_moves with different quantities (see https://github.com/odoo/odoo/pull/46718). This fix ensures such issues are avoided in the future and also addresses potential problems for clients migrating from older versions. Example: Two finished_moves with different quantities. Before the fix, both moves would be updated based on the unbuild quantity, resulting in incorrect quantities. After the fix, the moves for unbuild will use only the move's quantity. opw-4379204 Forward-Port-Of: odoo/odoo#191908
To run tours or unit tests, we instrument Chrome and run it headlessly. One of the arguments passed while doing so is the "window size" it needs to use to emulate desktop-like or mobile-like screen sizes. Newer versions of Chrome sometimes introduce slight variation between the Chrome's window size and its viewport size (due to changes in the interface layout...). While often not a deal-breaker, Chrome 128 forces a min-width for the window greater than the breakpoint we use for smaller/
Original PR description
To run tours or unit tests, we instrument Chrome and run it headlessly. One of the arguments passed while doing so is the "window size" it needs to use to emulate desktop-like or mobile-like screen…
To run tours or unit tests, we instrument Chrome and run it headlessly. One of the arguments passed while doing so is the "window size" it needs to use to emulate desktop-like or mobile-like screen sizes. Newer versions of Chrome sometimes introduce slight variation between the Chrome's window size and its viewport size (due to changes in the interface layout...). While often not a deal-breaker, Chrome 128 forces a min-width for the window greater than the breakpoint we use for smaller/mobile-like testing (e.g. 375px, which matches a small smartphone). This commit changes the way we instrument Chrome to use a specific size by using the DevTools' Emulated Device (aka. "responsive mode"). It allows to apply a very specific viewport's size independently of the actual Chrome's window size, which makes it way more predictable than before. Note: this change is part of the preparation to support the "new" headless mode, which becomes the default starting with Chrome 128. Reference: - https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#method-setDeviceMetricsOverride Forward-Port-Of: odoo/odoo#193696
The docstring of `@route` states that it accepts any iterable for the `methods` argument, but several places in the source code wrongly expected a list, and break if it is a tuple. Forward-Port-Of: odoo/odoo#193621
Original PR description
The docstring of `@route` states that it accepts any iterable for the `methods` argument, but several places in the source code wrongly expected a list, and break if it is a tuple. Forward-Port-Of: odoo/odoo#193621
Steps to reproduce: - Go to the "/blog/astronomy-2/what-if-they-let-you-run-the-hubble-5" page. - Click on the "Mobile Preview" button. - Bug: The breadcrumb is broken. In stable versions, we fixed this in the least intrusive way possible to avoid making significant layout changes to existing databases. **BEFORE:** <kbd></kbd> **AFTER:** <kbd></kbd> **AFTER:** <kbd></kbd> In master version, in mobile view, we replaced the breadcrumb with a "< All Blogs" button to return to the blogs list, similar to what is done in "website_sale" and "website_event". opw-4457408 Forward-Port-Of: odoo/odoo#193508
Update the OWL lib. Release notes: https://github.com/odoo/owl/releases/tag/v2.6.0 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193722
Original PR description
Update the OWL lib. Release notes: https://github.com/odoo/owl/releases/tag/v2.6.0 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193722
When we go to the website preview in the Odoo backend, if the current domain used (to access the backend) is not the same as the one of the previewed website, we redirect the user, and he might have to reconnect. The same is done when using the website switcher. Note: in the first case, the user is warned. We should probably do the same for the second case (?). This is a problem for the Odoo support team. When they connect to a customer database upon user request, the <customer_db_name>.odoo
Original PR description
When we go to the website preview in the Odoo backend, if the current domain used (to access the backend) is not the same as the one of the previewed website, we redirect the user, and he might have…
When we go to the website preview in the Odoo backend, if the current domain used (to access the backend) is not the same as the one of the previewed website, we redirect the user, and he might have to reconnect. The same is done when using the website switcher. Note: in the first case, the user is warned. We should probably do the same for the second case (?). This is a problem for the Odoo support team. When they connect to a customer database upon user request, the <customer_db_name>.odoo.com address is used. But as soon as they are using the website app, they are redirected to the real website domains... where they are disconnected and cannot connect themselves. To fix this issue, we allow setting up a session info parameter to bypass those website redirections. This is not to be done by real users: this will come with bugs (for the support team). Indeed, we are normally redirecting for a reason: many flows rely on using the right domain when visiting a specific website. Depending on what users have in their page, this could also simply make the website preview iframe crash. task-4069779 Forward-Port-Of: odoo/odoo#193122
### Before When creating a new vendor bill through Vendors > 'Example Vendor 1'> Vendor Bills (magic button), if the vendor was changed to 'Example Vendor 2' and the draft saved then it would show up under the 'Example Vendor 1' in the Partner Ledger instead of under the correct 'Example Vendor 2'. This is due to the partner_id being defined in the context when going through the 'Example Vendor 1' view. ### Now During the creation of the account move lines we use a context without the
Original PR description
### Before When creating a new vendor bill through Vendors > 'Example Vendor 1'> Vendor Bills (magic button), if the vendor was changed to 'Example Vendor 2' and the draft saved then it would show up under the 'Example Vendor 1' in the Partner Ledger instead of under the correct 'Example Vendor 2'. This is due to the partner_id being defined in the context when going through the 'Example Vendor 1' view. ### Now During the creation of the account move lines we use a context without the default_partner_id. The Partner Ledger now shows the draft bill entry under the right vendor. opw-4407709 Forward-Port-Of: odoo/odoo#192567
Devices detected through usb don't always have there manufactured and product name which can be retrieved. For example, our foot pedal in the office doesn't which leads to it having a name `"None - None"` in Odoo. After this PR if a device doesn't have a product name / manufacturer name it will be saved as `"Unknown input device"` task-4472585 Forward-Port-Of: odoo/odoo#193277
Original PR description
Devices detected through usb don't always have there manufactured and product name which can be retrieved. For example, our foot pedal in the office doesn't which leads to it having a name `"None - None"` in Odoo. After this PR if a device doesn't have a product name / manufacturer name it will be saved as `"Unknown input device"` task-4472585 Forward-Port-Of: odoo/odoo#193277
Steps to reproduce: [l10n_dk] - create and confirm a sale order - create an expense for a new employee and use a product set with reinvoice at cost and a tax with multiple repartition lines - confirm and process the expense - post journal entries Issue: Missing required fields on accountable sale order line. Cause: We want to reinvoice the tax line that no product on it opw-4378714 Forward-Port-Of: odoo/odoo#191163
Original PR description
Steps to reproduce: [l10n_dk] - create and confirm a sale order - create an expense for a new employee and use a product set with reinvoice at cost and a tax with multiple repartition lines - confirm and process the expense - post journal entries Issue: Missing required fields on accountable sale order line. Cause: We want to reinvoice the tax line that no product on it opw-4378714 Forward-Port-Of: odoo/odoo#191163
When using an auto fifo product as part of the repair, the COGS won't be based on the used product To reproduce the issue: 1. Setup auto fifo product 2. Receive 1@10 and 1@20 3. Process a RO: - Invoice method: After repair - Parts: - Add 1 x fifo product 4. Create and post the invoice 5. Open its journal items Error: Cogs are $20 instead of $10 When posting the invoice, we generate the COGS: https://github.com/odoo/odoo/blob/4df156164cf1d2764ba23682beee588777457fd6/
Original PR description
When using an auto fifo product as part of the repair, the COGS won't be based on the used product To reproduce the issue: 1. Setup auto fifo product 2. Receive 1@10 and 1@20 3. Process a RO: -…
When using an auto fifo product as part of the repair, the COGS
won't be based on the used product
To reproduce the issue:
1. Setup auto fifo product
2. Receive 1@10 and 1@20
3. Process a RO:
- Invoice method: After repair
- Parts:
- Add 1 x fifo product
4. Create and post the invoice
5. Open its journal items
Error: Cogs are $20 instead of $10
When posting the invoice, we generate the COGS:
https://github.com/odoo/odoo/blob/4df156164cf1d2764ba23682beee588777457fd6/addons/stock_account/models/account_move.py#L47-L48
We therefore compute the "anglo saxon unit price":
https://github.com/odoo/odoo/blob/4df156164cf1d2764ba23682beee588777457fd6/addons/stock_account/models/account_move.py#L133
However, there isn't any override to handle the RO case, so it leads
to the default mechanism, i.e. the standard price of the product:
https://github.com/odoo/odoo/blob/4df156164cf1d2764ba23682beee588777457fd6/addons/stock_account/models/account_move.py#L294-L295
https://github.com/odoo/odoo/blob/4df156164cf1d2764ba23682beee588777457fd6/addons/stock_account/models/account_move.py#L294-L295
https://github.com/odoo/odoo/blob/7cd7563f6708331bb6baf0e06d07a9f9ee329e38/addons/stock_account/models/product.py#L753-L757
And, since the first product is out, its standard price is now based
on the next candidate: $20
About the `sudo`: an accountman has not any access to `repair`, so
posting such an invoice would raise an error. Since this diff is
specific to Odoo 16, the idea is not to impact any security rules
and rather minimize the changes.
Note: Indeed, `repair` does not depend on `stock_account`, so this
commit could lead to a traceback if the bridge is removed. I delegate
this issue to the error of dependencies. Anyway, removing the bridge
would lead to other bugs. Hopefully, this has been fixed on master [1].
[1] https://github.com/odoo/odoo/commit/f7dbdec11b74f8c7d969763d8c5cf09542a47f86
OPW-4166570
Forward-Port-Of: odoo/odoo#193076**Description of the issue/feature this PR addresses:** When odoo is deployed with Reverse Proxy , like cloudflare, and cache rule is enabled. The login page is cached by cloudflare, "Cf-Cache-Status" is set to "HIT" in the reponse header  But in the html content, csrf_token is unavailable.  Error when try to
Original PR description
**Description of the issue/feature this PR addresses:** When odoo is deployed with Reverse Proxy , like cloudflare, and cache rule is enabled. The login page is cached by cloudflare, "Cf-Cache-Status" is set to "HIT" in the reponse header  But in the html content, csrf_token is unavailable.  Error when try to login.  **Current behavior before PR:** User can not login. **Desired behavior after PR is merged:** User can login. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191453
The get_text_content is not powerful enough to extract translated attributes. As a result, get_text_content will return empty string '' for terms whose translated contents are only in attributes. When the result is used to build the mapping text2terms, users will get strange result after write. opw-4147913 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 g
Original PR description
The get_text_content is not powerful enough to extract translated attributes. As a result, get_text_content will return empty string '' for terms whose translated contents are only in attributes. When the result is used to build the mapping text2terms, users will get strange result after write. opw-4147913 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#193574
Use fully qualified names as columns in related table can have a same name and this query could raise an error. Like the one below error below was shown in 18.0 ``` psycopg2.errors.AmbiguousColumn: column reference "state" is ambiguous LINE 3: AND state = 'validate' ``` Note: error occured in 18.0 will be fixed in forward port, using fully qualified names was the purpose so made sense to start from 16.0 and fix for all versions after Description of the issue/
Original PR description
Use fully qualified names as columns in related table can have a same name and this query could raise an error. Like the one below error below was shown in 18.0 ``` psycopg2.errors.AmbiguousColumn: column reference "state" is ambiguous LINE 3: AND state = 'validate' ``` Note: error occured in 18.0 will be fixed in forward port, using fully qualified names was the purpose so made sense to start from 16.0 and fix for all versions after 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#193568
* = stock * PROPBLEM: when viewing purchase or vendor dashboard (under logistic section) , viewing the scoreboard for purchased or order it calculate all record from purchase.report but when clicking on it, redirect to view of 'purchase order' only which is wrong compare to the number display on the scoreboard * SOLUTION: This commit fix by edit the domain of related pivot which the scoreboard use to display data to the domain having state in either Purchase or Done Description of the iss
Original PR description
* = stock * PROPBLEM: when viewing purchase or vendor dashboard (under logistic section) , viewing the scoreboard for purchased or order it calculate all record from purchase.report but when clicking on it, redirect to view of 'purchase order' only which is wrong compare to the number display on the scoreboard * SOLUTION: This commit fix by edit the domain of related pivot which the scoreboard use to display data to the domain having state in either Purchase or Done 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#191985
CLA change. Added new resource to corporate CLA file --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193539
Original PR description
CLA change. Added new resource to corporate CLA file --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193539
Due to an error in the condition, `ProprietaryID` was always used, even if IBANID should be used instead. That lead to customers missing information (`ProprietaryID` is not always picked up by other software, while IBANID is). Ticket link: https://odoo.com/odoo/69/tasks/4414985 opw-4414985 Forward-Port-Of: odoo/odoo#192519
Original PR description
Due to an error in the condition, `ProprietaryID` was always used, even if IBANID should be used instead. That lead to customers missing information (`ProprietaryID` is not always picked up by other software, while IBANID is). Ticket link: https://odoo.com/odoo/69/tasks/4414985 opw-4414985 Forward-Port-Of: odoo/odoo#192519