Thursday, July 11, 2024
24 changes · saas-17.2
Resolved issues and error corrections
The point of sale preparation display now ignores product categories that are not configured for that display. This prevents errors during order preparation and helps kitchen or service teams keep using the screen reliably.
Original PR description
Before this commit, if one of the product's categories was not included in the preparation display, it would lead to an error. opw-4012616
Leaving a picking screen in the Barcode app without making changes no longer creates an extra empty backorder line. This keeps warehouse documents accurate and avoids confusion from zero-demand stock moves.
Original PR description
**Current behavior:** If you create a picking with some move and confirm it, then open it in the barcod app, then *without doing anything inside barcode* simply exit the picking view, there will be an additional move created on the picking with 0 demand. **Expected behavior:** There should be no additoinal move added in this scenario. **Steps to reproduce:** 1. Create a picking with a move, confirm it 2. Open the picking inside barcode, then click the back button 3. Go look at the picking in the backend to see the new move **Cause of the issue:** We are creating backorder moves for all *incomplete* moves. **Fix:** Create backorder moves only for *partially complete* moves. opw-3995523
Fixes a broken guided tour in Website Slides so users can complete the walkthrough as expected. The update corrects timing and button-targeting issues caused by earlier library and design changes.
Original PR description
**Issue** From v17.2, the website_slides tour is not working because of some changes in the tour library. Commit from where I think the bug is coming https://github.com/odoo/odoo/commit/b334055c82c4350b4122e620ae76179a9fc4eaa2 and later due to the website design change another step was also failing and that should be coming this commit https://github.com/odoo/odoo/commit/80e3f53550b7ed74ac18bb09ea542c9e77c9a61d **Technical** The "Add to content" is loading before our frame is ready due to this the position of the pointer was wrong. Due to the design change tour was not able to point the publish btn **After this PR** Now the tour is working properly. Task-3960962
Miscellaneous changes
Tag updates were causing reload of the domain, while updating tag counts, With this commit all contextual values are preserved during tag updates [Reproduce] - Install documents,contacts- Open a contact - Open its documents - Go to "internal" - Upload a document - Add a tag to it (or remove it) - BUG: all documents visible (instead of documents for that particular client) opw-3967799 Forward-Port-Of: odoo/enterprise#65299
Original PR description
Tag updates were causing reload of the domain, while updating tag counts, With this commit all contextual values are preserved during tag updates [Reproduce] - Install documents,contacts- Open a contact - Open its documents - Go to "internal" - Upload a document - Add a tag to it (or remove it) - BUG: all documents visible (instead of documents for that particular client) opw-3967799 Forward-Port-Of: odoo/enterprise#65299
Introduces e-invoicing and stock reporting via the new eTIMS service. Community PR: https://github.com/odoo/odoo/pull/162196 taskid: 3603762 Forward-Port-Of: odoo/enterprise#61967
Original PR description
Introduces e-invoicing and stock reporting via the new eTIMS service. Community PR: https://github.com/odoo/odoo/pull/162196 taskid: 3603762 Forward-Port-Of: odoo/enterprise#61967
## [FIX] account_disallowed_expenses_fleet: query is mixing apple and pear The aim of this commit is to make the report behaves correctly when facing a DB with a lot of vehicles and a lot of accounts by making the query `group by` and `order by` more robust. Context: - 1 account and 1 vehicle share the same number for the id - the account is tagged with disallowed expense tag - 1 `account.move.line` without vehicle in that account - 1 `account.move.line` with a vehicle (with a dna ra
Original PR description
## [FIX] account_disallowed_expenses_fleet: query is mixing apple and pear The aim of this commit is to make the report behaves correctly when facing a DB with a lot of vehicles and a lot of accounts…
## [FIX] account_disallowed_expenses_fleet: query is mixing apple and pear The aim of this commit is to make the report behaves correctly when facing a DB with a lot of vehicles and a lot of accounts by making the query `group by` and `order by` more robust. Context: - 1 account and 1 vehicle share the same number for the id - the account is tagged with disallowed expense tag - 1 `account.move.line` without vehicle in that account - 1 `account.move.line` with a vehicle (with a dna rate) in the same account Before the commit: - The computation is giving wrong result in the report: 2 `account.move.line` were aggregated together under the hierarchy of the account without vehicle and the vehicle doesn't appear in the report at all. cause: the `CASE WHEN` could return, for example `92` as a `vehicle_id` and then `92` as an `account_id` and thus have them regrouped together. - 2 lines of the report were sharing the same "line_id" (the id given by report framework id, see method `_build_line_id`) which are used in a t-key property in an OWL loop resulting in a crash for the front-end. After the commit: - The 2 lines are aggregated seperatly: The line without `vehicle_id` is under the hierarchy of the account and the line with `vehicle_id` is under the hierachy of the concerned vehicle. - The line doesn't share any line_id anymore task-id: None (issue discovered in our own prod) ## [IMP] account_reports: ensure line_id is uniq in tests Moved to https://github.com/odoo/enterprise/pull/66216 Forward-Port-Of: odoo/enterprise#64166
Add shortcut keys to the recon model buttons in the reco widget. The keys are SHIFT+Number (1 to 5 for the 5 visible buttons) Task-4024471 Forward-Port-Of: odoo/enterprise#66066
Original PR description
Add shortcut keys to the recon model buttons in the reco widget. The keys are SHIFT+Number (1 to 5 for the 5 visible buttons) Task-4024471 Forward-Port-Of: odoo/enterprise#66066
Steps to reproduce: - create a spreadsheet document - insert an image in the spreadsheet - hit the Share button - open the link in an incognito window => the image is not displayed Task: 4037385 opw-4035835 Forward-Port-Of: odoo/enterprise#66152
Original PR description
Steps to reproduce: - create a spreadsheet document - insert an image in the spreadsheet - hit the Share button - open the link in an incognito window => the image is not displayed Task: 4037385 opw-4035835 Forward-Port-Of: odoo/enterprise#66152
To reproduce: - Create a new db with demo data and install `sale_timesheet` module - Then as a second step, install `documents_project` The installation will crash with: ``` psycopg2.errors.NotNullViolation: null value in column "folder_id" of relation "documents_document" violates not-null constraint ``` When using `search` with no corresponding field, `convert_xml()` will only consider the first value, and in our case because of the ordering of project model, we're not going to set
Original PR description
To reproduce: - Create a new db with demo data and install `sale_timesheet` module - Then as a second step, install `documents_project` The installation will crash with: ``` psycopg2.errors.NotNullViolation: null value in column "folder_id" of relation "documents_document" violates not-null constraint ``` When using `search` with no corresponding field, `convert_xml()` will only consider the first value, and in our case because of the ordering of project model, we're not going to setup the document folder on project which is not `project.project_project_1`. This commit force creating documents folders for all projects with `use_documents` option set. Forward-Port-Of: odoo/enterprise#65964
Steps to reproduce: 1. Create an event with an appointment-type set. 2. In the Calendar module, open the event you created for the appointment. 3. Navigate to the 'Appointment Details' page. Before This Commit: The 'Appointment Details' page is displayed even if no resources have been set. After This Commit: Appointment resource records will only be shown if resources are set. Task:3918574 Forward-Port-Of: odoo/enterprise#63885
Original PR description
Steps to reproduce: 1. Create an event with an appointment-type set. 2. In the Calendar module, open the event you created for the appointment. 3. Navigate to the 'Appointment Details' page. Before This Commit: The 'Appointment Details' page is displayed even if no resources have been set. After This Commit: Appointment resource records will only be shown if resources are set. Task:3918574 Forward-Port-Of: odoo/enterprise#63885
Before this commit, Czech language translations of the Czech tax report were wrong. The appropriate Czech translations were added from this sheet: https://docs.google.com/spreadsheets/d/1xqDqpLwY5nCyNA5WuzLSPdR52Jq6f8IPxU4S3Bh1Nw4/edit?pli=1&gid=1709389226#gid=1709389226 task-3127683 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172559
Original PR description
Before this commit, Czech language translations of the Czech tax report were wrong. The appropriate Czech translations were added from this sheet: https://docs.google.com/spreadsheets/d/1xqDqpLwY5nCyNA5WuzLSPdR52Jq6f8IPxU4S3Bh1Nw4/edit?pli=1&gid=1709389226#gid=1709389226 task-3127683 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172559
In auto-complete field of a vendor bill, the domain before the current commit would only get purchase orders from the current company. The domain was amended to get POs from current company and all its descendant branches. The POs of children companies should be visible on vendor bills of current company. If the user selects a PO that belongs to a child company, the company_id field should be = the child company. task-3987695 --- I confirm I have signed the CLA and read the PR guidel
Original PR description
In auto-complete field of a vendor bill, the domain before the current commit would only get purchase orders from the current company. The domain was amended to get POs from current company and all its descendant branches. The POs of children companies should be visible on vendor bills of current company. If the user selects a PO that belongs to a child company, the company_id field should be = the child company. task-3987695 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171480
Add myself for CLA --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171169
Original PR description
Add myself for CLA --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171169
To reproduce the bug follow the instructions: - Have pos and sales app installed - Go to pos app setting and enable is a Restorant setting - Back to the dashboard you should have a new shop called Restorant - Go to the products from and create a product ('pencil' for instance), make it available in pos and in self-order and assign to it a category - Add another product ('paper') with the same options in pos side and assign to it the same category, then add the first product ('pencil') to it
Original PR description
To reproduce the bug follow the instructions: - Have pos and sales app installed - Go to pos app setting and enable is a Restorant setting - Back to the dashboard you should have a new shop called…
To reproduce the bug follow the instructions:
- Have pos and sales app installed
- Go to pos app setting and enable is a Restorant setting
- Back to the dashboard you should have a new shop called Restorant
- Go to the products from and create a product ('pencil' for instance), make it available in pos and in self-order and assign to it a category
- Add another product ('paper') with the same options in pos side and assign to it the same category, then add the first product ('pencil') to its optional product in sales section
- Back to pos dashboard open a sessing in Restorant shop then go back again to the dashboard
- Click on the tree dots on the top right of the Restorant shop block and click on the mobile view
- Create a new order adding 'paper' to the command then go to checkout
Now the optional product 'pencil' should be shown but it's unavailable.
A feature was added in Odoo 17.1 and newer for the availibility of the product on the point of sale app. It filter the product based on the availability hours of its categories. This brought changes to ProductCard component witch (you can check product_list_page) in pos_self_order modul for that. The thing is that these change wasn't made is pos_self_order_sale modul witch made the product always shown as unavailable.
opw-3977238
Forward-Port-Of: odoo/odoo#170119The step to check the reward line added was sometimes happening before it had time to render. Changed the order of the step to allow the reward line to be rendered before checking it. runbot error: 69954 Forward-Port-Of: odoo/odoo#171882
Original PR description
The step to check the reward line added was sometimes happening before it had time to render. Changed the order of the step to allow the reward line to be rendered before checking it. runbot error: 69954 Forward-Port-Of: odoo/odoo#171882
Previously, when switching from an email template that overrides the email_from field to one that does not, the original email_from value was mistakenly passed as an argument. Consequently, emails were sent with the wrong sender, using the address from the template instead. Whereas, it is expected behavior that when a template does not specify any user, the current user's email address should be used as the sender. [Changes introduced by this commit] This commit addresses the issue by updati
Original PR description
Previously, when switching from an email template that overrides the email_from field to one that does not, the original email_from value was mistakenly passed as an argument. Consequently, emails…
Previously, when switching from an email template that overrides the email_from field to one that does not, the original email_from value was mistakenly passed as an argument. Consequently, emails were sent with the wrong sender, using the address from the template instead. Whereas, it is expected behavior that when a template does not specify any user, the current user's email address should be used as the sender. [Changes introduced by this commit] This commit addresses the issue by updating the sender email to the current user's email address when the template being updated to does not override the sender email field. [Reproduce] - Install -i contacts - Log in as user U - Create 2 Email templates that "Applies to" Contact (Settings/Technical/Email/Email Templates): - T1: set "From" field in "Email Configuration" tab (different than U's email) - T2: without set "From" field - Go to a contact app, select any user - Click "Send message" -> Expand "Full Composer" - Select template T1 (with set email) - Select template T2 (without set email) and Send - BUG: email gets send with email from T1 (even tho we selected T2, without any email) opw-3769188 # Encouraging discussion I would like to encourage discussion on the fix, as I can imagine different approaches to this problem. (Like maybe instead we could not sent the `sent_from` argument from the fronted side and relay on the mechanism of default values). Any comments highly welcomed Forward-Port-Of: odoo/odoo#170299 Forward-Port-Of: odoo/odoo#158000
There is currently an issue with the `report_stock_quantity` SQL view. When there is only 1 `stock_warehouse` in a given database and `pg_stats` for `stock_warehouse` is up-to-date, the query plan for scanning the `all_sm` cte (the `existing_sm` cte is always inlined) becomes extremely bad. That's because postgres somehow expects only 1 row returned by the `all_sm` cte whereas in real databases it can be closer to 500 000. This makes postgres plan a Nested Loop Join that has very bad performance
Original PR description
There is currently an issue with the `report_stock_quantity` SQL view. When there is only 1 `stock_warehouse` in a given database and `pg_stats` for `stock_warehouse` is up-to-date, the query plan…
There is currently an issue with the `report_stock_quantity` SQL view. When there is only 1 `stock_warehouse` in a given database and `pg_stats` for `stock_warehouse` is up-to-date, the query plan for scanning the `all_sm` cte (the `existing_sm` cte is always inlined) becomes extremely bad. That's because postgres somehow expects only 1 row returned by the `all_sm` cte whereas in real databases it can be closer to 500 000. This makes postgres plan a Nested Loop Join that has very bad performances in large databases. Another weird side-effect of this is the production vs staging (duplicate) on Odoo.sh. Because stagings and duplicates don't necessarily have up-to-date statistics, you can have the same query being very slow on the production database and very fast on a staging. That's because in the absence of statistics for the stock_warehouse table, postgres does not make any particular assumption on the number of rows returned by the `all_sm` cte and therefore produces a more efficient plan. This commit tries to change that by introducing a new small CTE that simply does a LEFT JOIN between `stock_location` and `stock_warehouse`. Because this CTE is referenced twice in the `existing_sm` CTE, it will be materialized by postgres, i.e. evaluated first before being saved in memory for further usage. Thanks to that, postgres knows the expected number of rows of the CTE and can better plan the outer query's execution. #### speedup Customer database with 17 000 products, 700 000 stock.moves, 97 locations and 1 stock_warehouse. Doing a simple GROUP BY query on `report_stock_quantity`: 5min -> 1s ##### dalibo To understand the dalibo, currently there is a workaround for this issue. If we add (and archive) a new `stock_warehouse` and then analyze the table, postgres plans an efficient plan. My guess here is that with only 1 record postgres skews the plan, probably because it tries to shortcut parts of the query execution. When there are 2 or more warehouses it cannot do that anymore and simply relies on correct statistics to plan the execution. Another possibility would be that statistics for tables with only 1 row are badly used by postgres. In any case, the point of the new CTE is to match the 2 or more warehouses case when postgres plans the scanning of the `all_sm` CTE. - [1 warehouse, base case](https://explain.dalibo.com/plan/a8fagdgd2d20ae48) - [2 warehouses, base case](https://explain.dalibo.com/plan/2d38fb9ef6df495g) - [1 warehouse, new CTE case](https://explain.dalibo.com/plan/92e41053c9g0ce8d) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169401
## Analysis In case it's a simplified invoice, the 'to_invoice' is automatically set to True if a corresponding journal is set. Simplified invoices then generates a PDF which takes a few seconds to generate (using wkhtmltopdf) and slow downs the user experience. ## Fix This commit avoids generating the PDF in case no orders explicitly require an invoice. It mostly works the same as this commit for the Chilean localization: https://github.com/odoo/enterprise/pull/53655 which introduced a ne
Original PR description
## Analysis In case it's a simplified invoice, the 'to_invoice' is automatically set to True if a corresponding journal is set. Simplified invoices then generates a PDF which takes a few seconds to generate (using wkhtmltopdf) and slow downs the user experience. ## Fix This commit avoids generating the PDF in case no orders explicitly require an invoice. It mostly works the same as this commit for the Chilean localization: https://github.com/odoo/enterprise/pull/53655 which introduced a new context parameter (in the related commit: https://github.com/odoo/odoo/pull/148159). ### References opw-3875944 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171523 Forward-Port-Of: odoo/odoo#164783
Customers are unable to submit their invoice if the LegalReference is more than 250 letters. This commit fixes this. task-4043343 Forward-Port-Of: odoo/odoo#172461
Original PR description
Customers are unable to submit their invoice if the LegalReference is more than 250 letters. This commit fixes this. task-4043343 Forward-Port-Of: odoo/odoo#172461
# :whale: Enterprise PR: https://github.com/odoo/enterprise/pull/61967 taskid: 3603762 Forward-Port-Of: odoo/odoo#162196
Original PR description
# :whale: Enterprise PR: https://github.com/odoo/enterprise/pull/61967 taskid: 3603762 Forward-Port-Of: odoo/odoo#162196
A few translation issues are fixed with this: - The title of the report was not translating the type of leave - The title was not correctly formatting the dates accroding to the locale of the user. - The months were not translated - The days were not translated Cleaning of the title's English will be done in master --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172594 Forward-Port-Of: odoo/odoo#171976
Original PR description
A few translation issues are fixed with this: - The title of the report was not translating the type of leave - The title was not correctly formatting the dates accroding to the locale of the user. - The months were not translated - The days were not translated Cleaning of the title's English will be done in master --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172594 Forward-Port-Of: odoo/odoo#171976
A recent fix forbade the usage of partners from other companies on a SO (see 7be39d0b2157ec53e84c730a210868e4a4a1f8d9, and the comment on the original PR). On the ecommerce, in some advanced multi-company & multi-website configuration, this led some customers to be unable to create a cart (add products to it), because their partner was restricted to another company. It was previously possible, but led to other issues later on, e.g. during the post-processing of payment transactions linked
Original PR description
A recent fix forbade the usage of partners from other companies on a SO (see 7be39d0b2157ec53e84c730a210868e4a4a1f8d9, and the comment on the original PR). On the ecommerce, in some advanced…
A recent fix forbade the usage of partners from other companies on a SO (see 7be39d0b2157ec53e84c730a210868e4a4a1f8d9, and the comment on the original PR). On the ecommerce, in some advanced multi-company & multi-website configuration, this led some customers to be unable to create a cart (add products to it), because their partner was restricted to another company. It was previously possible, but led to other issues later on, e.g. during the post-processing of payment transactions linked to the cart. Therefore, we consider it's still better to show a warning early on, but we prefer to replace the standard multi-company warning by a dedicated error message recommending the customer to have another account, or to contact the website administrator. To solve the issue for a given customer, either he should have a separate account for the given company, or no company (ID) should be set on its partner record, so that it's shared between companies. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172433 Forward-Port-Of: odoo/odoo#172101
If a 17.2 database use a windows IoT (in version 17). Then it will cause issue as the send_to_controller function is called from the printer drivers in 17.2 which would be missing the mac parameter as such, the 17 code have to adapt to 17.2 drivers syntax. This would cause errors such as: ``` websocket: error from callback <function on_message at 0x0000016400FE0540>: send_to_controller() missing 1 required positional argument: 'iot_mac' odoo.addons.hw_drivers.websocket_client: websocket recei
Original PR description
If a 17.2 database use a windows IoT (in version 17). Then it will cause issue as the send_to_controller function is called from the printer drivers in 17.2 which would be missing the mac parameter as such, the 17 code have to adapt to 17.2 drivers syntax. This would cause errors such as: ``` websocket: error from callback <function on_message at 0x0000016400FE0540>: send_to_controller() missing 1 required positional argument: 'iot_mac' odoo.addons.hw_drivers.websocket_client: websocket received an error: send_to_controller() missing 1 required positional argument: 'iot_mac' ``` (and the idea of putting the mac address as a parameter was pretty bad to start with) Related PR: https://github.com/odoo/odoo/pull/172000 Forward-Port-Of: odoo/odoo#172736
[FIX] stock.landed.cost: Use invoice date currency exchange rate for landed cost computation Fixes an issue where the landed cost computation was based on the exchange rate of the accounting date instead of the invoice date, causing discrepancies in valuation and vendor bill. Now, the exchange rate of the invoice date is correctly utilized for accurate landed cost calculation. To reproduce the issue: 1. Create a purchase order 2. Receive the product 3. Create a vendor bill
Original PR description
[FIX] stock.landed.cost: Use invoice date currency exchange rate for landed cost computation Fixes an issue where the landed cost computation was based on the exchange rate of the accounting date…
[FIX] stock.landed.cost: Use invoice date currency exchange rate for landed cost computation
Fixes an issue where the landed cost computation was based on the exchange rate of the accounting date instead of the invoice date, causing discrepancies in valuation and vendor bill. Now, the exchange rate of the invoice date is correctly utilized for accurate landed cost calculation.
To reproduce the issue:
1. Create a purchase order
2. Receive the product
3. Create a vendor bill for landed cost product in a different currency
4. Click on the "Create Landed Cost" button in the vendor bill
Error: The landed cost is computed using the exchange rate of the accounting date, while the total on the invoice is calculated using the invoice date's exchange rate. This results in a discrepancy between the bill price and the valuation.
The fix ensures that the exchange rate of the invoice date is used for computing the total for the landed cost.
opw-3862915
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#171039
Forward-Port-Of: odoo/odoo#165155