Tuesday, May 20, 2025
14 changes · saas-17.4
Resolved issues and error corrections
Website settings now correctly block portal users from being selected as salespeople for online orders. This keeps checkout order assignment aligned with the intended salesperson rules and avoids inappropriate user assignments.
Original PR description
Versions -------- - saas-17.4+ Steps ----- 1. Go to Website / Settings; 2. scroll to Shop - Checkout Process; 3. assign portal user as salesperson for online orders. Issue ----- Portal user shouldn't be allowed as a salesperson. Cause ----- The `salesperson_id` field of `res.config.settings` is set to be related to `website_id.salesperson_id`. The `salesperson_id` field for `website` does have a domain configured, but because the domain is a string, it does not get re-used for related fields[^1]. [^1]: https://github.com/odoo/odoo/blob/87381d316/odoo/fields.py#L3009-L3021 Issue was introduced by commit 2f8c20d7d2385, which moved the domain from the `res.config.settings` field to the `website` field it relates to. Solution -------- Provide the domain as a list. opw-4801697
List views now recalculate column widths when their surrounding area changes size, not just when the browser window is resized. This prevents unnecessary horizontal scrollbars in forms when elements like chatter messages or document previews load later and change the available space.
Original PR description
The usecase occurs in x2many lists in form views. The total width of the table's parent div may change, for instance if a scrollbar appears on the sheet at some point. When this happens, the widths…
The usecase occurs in x2many lists in form views. The total width of the table's parent div may change, for instance if a scrollbar appears on the sheet at some point. When this happens, the widths must be recomputed, to properly fit with the new available space. Before this commit, we only listened to window resize, not to the parent div itself. This could lead to an horizontal scrollbar being sometimes displayed, for instance: - with the chatter below the form view, as it is loaded asynchronously, when it contains messages such that there's no (vertical) scrollbar before it is loaded, and there's one after. - with the document previewer, as its width changes when it is loaded. This commit fixes the issue by using a resize observer to listen to the parent div directly, instead of on a window, which is more accurate. Bug reported by our cto 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 invoice report setting now appears when users configure reports for customer invoices. This fixes a mistake that kept the option hidden even in the correct invoice-related setup, helping users complete report configuration as intended.
Original PR description
Currently, the `Invoice report` is hidden when the user tries to select the invoice report for 'account.move'. With PR [1], we added the invisible attribute to the `is_invoice_report` field to hide it when the model is not 'account.move'. However, due to mistake, we used `'model'` instead of `model`, which caused the field to always be hidden. This commit fixes the above issue by using `model` instead of `'model'`, so the is_invoice_report field is visible only when the model is 'account.move'. [1] https://github.com/odoo/odoo/pull/207635 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Adding CLA Forward-Port-Of: odoo/odoo#161944
Original PR description
Adding CLA Forward-Port-Of: odoo/odoo#161944
Steps to reproduce: - create a new journal with foreign currency - create an invoice (amount:100) with this journal and set it "to check" - Go to dashboard Issue: check balance is in company currency amount but the symbol is the one from the currency of the journal Solution: Chkl: <strike>Misc and Sales/Purchase Journals should display all amounts in company currency</strike> Eventually, we decided that it would be better for the stable versions to keep the currency displayed as the
Original PR description
Steps to reproduce: - create a new journal with foreign currency - create an invoice (amount:100) with this journal and set it "to check" - Go to dashboard Issue: check balance is in company currency amount but the symbol is the one from the currency of the journal Solution: Chkl: <strike>Misc and Sales/Purchase Journals should display all amounts in company currency</strike> Eventually, we decided that it would be better for the stable versions to keep the currency displayed as the one from the journals. We therefore use the same logic as for the bill/invoices opw-4349684 Forward-Port-Of: odoo/odoo#203475
**Problem:** when doing a refund from pos of an avco (or fifo) product, with the option "ship later" the cost of the product does not appear on the pos order line **Steps to reproduce:** - Enable Settings "Allow Ship Later", "Automatic Accounting" - Navigate to Sales/Configuration/Product Categories - Create a new category with Inventory Valuation field as "Automated" and the Costing Method field as "Average Cost (AVCO)" - Open Point of Sale/Product - Create a new storable product
Original PR description
**Problem:** when doing a refund from pos of an avco (or fifo) product, with the option "ship later" the cost of the product does not appear on the pos order line **Steps to reproduce:** - Enable…
**Problem:** when doing a refund from pos of an avco (or fifo) product, with the option "ship later" the cost of the product does not appear on the pos order line **Steps to reproduce:** - Enable Settings "Allow Ship Later", "Automatic Accounting" - Navigate to Sales/Configuration/Product Categories - Create a new category with Inventory Valuation field as "Automated" and the Costing Method field as "Average Cost (AVCO)" - Open Point of Sale/Product - Create a new storable product - In the general information tab set a cost and select your new category for the product category field - In the Sales tab, make sure that "Available in POS" is checked and select a category - Set an on Hand quantity - Open a point of sale from the Point of Sale Dashboard - Select your product and click on Payment - On the top right of the screen select a customer with an adress, click on Invoice and on Ship later - Select a payment method and validate - Navigate to Point of Sale/Orders - click on the last order created, and click on the "Pickings" smart button - validate the picking - come back to the store in point of sale - select the three horizontal lines on the top right and click on Orders - filter by paid orders - select the last order created and click on refund and then on payment - check Invoice and Ship Later on the top right, select a payment method and validate - Navigate back to Point of Sale/orders and select the last order created **Current behavior:** The total cost is zero on the pos order line Even if the delivery is validated via the Picking smart button the total cost is still zero **Expected behavior:** It should reflect the cost of the product (depending on the costing method) **Cause of the issue:** When the pos order is created from Point of Sale, the process_saved_order method is called this method calls (1)create_order_picking and then (2)compute_total_cost. https://github.com/odoo/odoo/blob/504ef7cdeb1600b86feefbe8668144da9cd5a70b/addons/point_of_sale/models/pos_order.py#L183-L184 **Scenario A** Inside (1) create_order_picking, if the PosOrder doesn't have a shipping_date the if statement is False https://github.com/odoo/odoo/blob/504ef7cdeb1600b86feefbe8668144da9cd5a70b/addons/point_of_sale/models/pos_order.py#L1017 and the method _create_picking_from_pos_order_lines is called. This method then calls _action_done. https://github.com/odoo/odoo/blob/504ef7cdeb1600b86feefbe8668144da9cd5a70b/addons/point_of_sale/models/stock_picking.py#L70 Inside the stock_account override of _action_done, _create_in_svl is called. https://github.com/odoo/odoo/blob/504ef7cdeb1600b86feefbe8668144da9cd5a70b/addons/stock_account/models/stock_move.py#L289 This method sets the value of the stock_valuation_layer_ids attribute of the stock move to a new stock valuation layer. **Scenario B** Inside (1) create_order_picking, if the PosOrder has a shipping_date (in the case where we selected "Ship Later") the method _launch_stock_rule_from_pos_order_lines is called. https://github.com/odoo/odoo/blob/504ef7cdeb1600b86feefbe8668144da9cd5a70b/addons/point_of_sale/models/pos_order.py#L1017-L1018 and nowhere inside this method is _action_done called. This makes sense because the stock move hasn't been validated. When (2) compute_total_cost is then called by process_saved_oder, if the product category is avco, _compute_average_price will be called. If we are in Scenario B there is no stock valuation layer for this stock move. Consequently there will be no candidates and the price will not be computed. https://github.com/odoo/odoo/blob/504ef7cdeb1600b86feefbe8668144da9cd5a70b/addons/stock_account/models/product.py#L795-L798 opw-4614503 Forward-Port-Of: odoo/odoo#207482
### Steps to reproduce: 1. Create a portal user. 2. Create an automation rule to send an email as a message. Example: https://drive.google.com/file/d/1mIa4R7a2Z2fnkngOMD7zN2t9Z2XHhGY7/view 3. Now, add the portal user as a follower on a task. 4. Change the state of a task to execute an automation rule. 5. Email will be received by a portal user but it will not be visible on the messaging history on the portal. ### Cause: This is happening because when running an automation rule that
Original PR description
### Steps to reproduce: 1. Create a portal user. 2. Create an automation rule to send an email as a message. Example: https://drive.google.com/file/d/1mIa4R7a2Z2fnkngOMD7zN2t9Z2XHhGY7/view 3. Now,…
### Steps to reproduce: 1. Create a portal user. 2. Create an automation rule to send an email as a message. Example: https://drive.google.com/file/d/1mIa4R7a2Z2fnkngOMD7zN2t9Z2XHhGY7/view 3. Now, add the portal user as a follower on a task. 4. Change the state of a task to execute an automation rule. 5. Email will be received by a portal user but it will not be visible on the messaging history on the portal. ### Cause: This is happening because when running an automation rule that will send an email we set the 'mail.message' state as System notification by default which leads that this mail will be sent normally to every follower of the record but will be only shown in the chat history for internal users not portal as we are just showing 'comment', 'incoming_email' and 'outgoing_email' messages. ### Fix: Checking if the server action that is being run is sending an email we will set the state of the 'mail.message' as 'auto_comment' -introduced in https://github.com/odoo/odoo/pull/94018/commits/d1dd307555ac78841384d1158de5a0a7787370db - and add 'auto_comment' to the domain of the field website_message_id which is for the messages shown to the portal user in his view P.S. LNA confirmed that we need to show it to the portal user. opw-4459754 Forward-Port-Of: odoo/odoo#194401
### Steps to reproduce: - Navigate to Recruitment > Job Position > Any job position > Job applications (smart button) - Create an applicant - Set a Recruiter for the applicant - Move the stage to 'Contract Signed' - Click on 'Create Employee' - Notice a validation error that the opertion cannot be completed ### Cause: This is happening as the 'Job applications' smart button has default value for the user_id in context https://github.com/odoo/odoo/blob/889f25f1322f00dff7cacad95
Original PR description
### Steps to reproduce: - Navigate to Recruitment > Job Position > Any job position > Job applications (smart button) - Create an applicant - Set a Recruiter for the applicant - Move the stage to…
### Steps to reproduce: - Navigate to Recruitment > Job Position > Any job position > Job applications (smart button) - Create an applicant - Set a Recruiter for the applicant - Move the stage to 'Contract Signed' - Click on 'Create Employee' - Notice a validation error that the opertion cannot be completed ### Cause: This is happening as the 'Job applications' smart button has default value for the user_id in context https://github.com/odoo/odoo/blob/889f25f1322f00dff7cacad95236d6f045c30d64/addons/hr_recruitment/views/hr_job_views.xml#L207-L211 so when creating an employee it will add the missing fields from defaults and it will get the default value in the context which for an existing user so when creating the employee with this user_id it will trigger the sql constraint https://github.com/odoo/odoo/blob/889f25f1322f00dff7cacad95236d6f045c30d64/addons/hr/models/hr_employee.py#L145-L148 ### Fix: clean the context before creating the partner and the employee corresponding to this applicant opw-4629219 Forward-Port-Of: odoo/odoo#204997
This commit fixes an issue where we had been using the UTC start and end times for a work entry when computing the correct duration for a payslip. Specifically, this is necessary when a work entry exceeds the interval of the payslip, which can happen when a work entry starts before the payslip interval or ends after the payslip interval. Previously, the UTC times were used. Consider an EST work entry that starts at 18:00 one night and ends at 01:00 the next morning. The UTC times would be 22:
Original PR description
This commit fixes an issue where we had been using the UTC start and end times for a work entry when computing the correct duration for a payslip. Specifically, this is necessary when a work entry…
This commit fixes an issue where we had been using the UTC start and end times for a work entry when computing the correct duration for a payslip. Specifically, this is necessary when a work entry exceeds the interval of the payslip, which can happen when a work entry starts before the payslip interval or ends after the payslip interval. Previously, the UTC times were used. Consider an EST work entry that starts at 18:00 one night and ends at 01:00 the next morning. The UTC times would be 22:00 and 05:00 respecively, up to a 1-hour difference for daylight savings time. Now suppose that the paysliip for this work entry only goes up to that following morning. Instead of using the local times of 18:00 and 01:00, the payslip would use the UTC times of 22:00 and 05:00, which would only count 2 of those hours instead of 6. This is resolved by converting the UTC times to local before using them to clamp the work entries to the payslip interval. opw-4790119 Forward-Port-Of: odoo/enterprise#85548
### Steps to reproduce: 1. Create a portal user. 2. Create an automation rule to send an email as a message. Example: https://drive.google.com/file/d/1mIa4R7a2Z2fnkngOMD7zN2t9Z2XHhGY7/view 3. Now, add the portal user as a follower on a task. 4. Change the state of a task to execute an automation rule. 5. Email will be received by a portal user but it will not be visible on the messaging history on the portal. ### Cause: This is happening because when running an automation rule that
Original PR description
### Steps to reproduce: 1. Create a portal user. 2. Create an automation rule to send an email as a message. Example: https://drive.google.com/file/d/1mIa4R7a2Z2fnkngOMD7zN2t9Z2XHhGY7/view 3. Now,…
### Steps to reproduce: 1. Create a portal user. 2. Create an automation rule to send an email as a message. Example: https://drive.google.com/file/d/1mIa4R7a2Z2fnkngOMD7zN2t9Z2XHhGY7/view 3. Now, add the portal user as a follower on a task. 4. Change the state of a task to execute an automation rule. 5. Email will be received by a portal user but it will not be visible on the messaging history on the portal. ### Cause: This is happening because when running an automation rule that will send an email we set the 'mail.message' state as System notification by default which leads that this mail will be sent normally to every follower of the record but will be only shown in the chat history for internal users not portal as we are just showing 'comment', 'incoming_email' and 'outgoing_email' messages. ### Fix: Checking if the server action that is being run is sending an email we will set the state of the 'mail.message' as 'auto_comment' and add 'auto_comment' to the domain of the field website_message_id which is for the messages shown to the portal user in his view opw-4459754 Forward-Port-Of: odoo/enterprise#82352
Fix qty_delivered when a rental order is processed through the PoS. This commit ensure that the PoS qty_delivered computation is done after the other calculation Steps to reproduce: ------------------- * Make a rental for 1 product * Open the sale order in PoS * Pay for the rental > Observation: The qty_delivered is set to 2 instead of 1 on the rental Why the fix: ------------ When the order is a rental processed through the PoS, we recompute the rental qty and add the PoS quantity
Original PR description
Fix qty_delivered when a rental order is processed through the PoS. This commit ensure that the PoS qty_delivered computation is done after the other calculation Steps to reproduce: ------------------- * Make a rental for 1 product * Open the sale order in PoS * Pay for the rental > Observation: The qty_delivered is set to 2 instead of 1 on the rental Why the fix: ------------ When the order is a rental processed through the PoS, we recompute the rental qty and add the PoS quantity to make sure that the value is correct. The computation is actually just the fusion of the PoS and rental _compute_qty_delivered methods. opw-4582505 Forward-Port-Of: odoo/enterprise#84768
The xsd changed. Now the rounding needs to be to 2 decimals everywhere. The official xsd does not mention it, but the field submit_more must appear on the xml. Also, while it's not blocking directly, the declaration will be rejected if the special deduction is filled without specifying the special %age. So we add a banner warning the user of it. opw-4789154 Forward-Port-Of: odoo/enterprise#85593 Forward-Port-Of: odoo/enterprise#85464
Original PR description
The xsd changed. Now the rounding needs to be to 2 decimals everywhere. The official xsd does not mention it, but the field submit_more must appear on the xml. Also, while it's not blocking directly, the declaration will be rejected if the special deduction is filled without specifying the special %age. So we add a banner warning the user of it. opw-4789154 Forward-Port-Of: odoo/enterprise#85593 Forward-Port-Of: odoo/enterprise#85464
- Create a sub company from the main company. - On only the sub-company create a new followup level. - While being in both the main company and the sub-company at the same time, try to access the newly created followup level in the followup report view. The following traceback appears: File "/home/odoo/src/odoo/addons/web/models/models.py", line 128, in web_read vals = many2one_data[values[field_name]] KeyError: 9 This commit hide the statusbar for the child company if there is followu
Original PR description
- Create a sub company from the main company. - On only the sub-company create a new followup level. - While being in both the main company and the sub-company at the same time, try to access the newly created followup level in the followup report view. The following traceback appears: File "/home/odoo/src/odoo/addons/web/models/models.py", line 128, in web_read vals = many2one_data[values[field_name]] KeyError: 9 This commit hide the statusbar for the child company if there is followup level in the parent as per the specification of https://github.com/odoo/enterprise/commit/bbcd54519706539d7e2e313118c956200ea70c91 and the implementation of https://github.com/odoo/enterprise/commit/f82ef250560957046be0590f8c2a08039bcc34ca#diff-c502b098cfa2c57bc70c144ae4f0e1fbe1c0116f392ed1a63743f12a51b82084 opw-4669397 Forward-Port-Of: odoo/enterprise#82324
**Steps to reproduce:** 1. Install `website_sale_renting` 2. Go to the website editor. 3. Drag and drop the `rental search` snippet. 4. Set the rental timing to `hour` **Issue:** - The default date was always set to the next day with the current time, making it impossible for users to select the current date without adjusting the time manually. https://github.com/odoo/enterprise/blob/a6ec35e94bdd4f721982c32716f716948f74c875/website_sale_renting/static/src/js/website_sale_renting_dateran
Original PR description
**Steps to reproduce:** 1. Install `website_sale_renting` 2. Go to the website editor. 3. Drag and drop the `rental search` snippet. 4. Set the rental timing to `hour` **Issue:** - The default date was always set to the next day with the current time, making it impossible for users to select the current date without adjusting the time manually. https://github.com/odoo/enterprise/blob/a6ec35e94bdd4f721982c32716f716948f74c875/website_sale_renting/static/src/js/website_sale_renting_daterangepicker.js#L147-L148 **Solution:** - Updated the logic for hourly rentals to set the default date next day with adding one hour from the current time, to allow customers to select the current date. - For daily rentals, the logic remains unchanged and defaults to the next day. opw-4770823 Forward-Port-Of: odoo/enterprise#85613