Daily updates from Odoo
Friday, August 23, 2024
13 changes · 17.0
Enhancements to existing features
Users connecting IoT devices to the database now receive clear notifications about the connection status—whether it succeeded, failed, or is still processing. This eliminates confusion and improves the user experience by providing real-time feedback instead of requiring users to manually check the connected devices list.
Original PR description
When the user was connecting an IoT to the database there was no notification or any information to tell him that he succeded / failed / had to wait to see it in the "connected" list. We now display those notifications. Task: 4104811
This update improves the performance of the Australian payroll system by optimizing how payment method information is processed. The change adjusts database query counts to ensure the system runs more efficiently when handling payroll data, which helps reduce processing time and system load.
Original PR description
This commit will increase the queryCount due to the compute on payment method added in this commit: https://github.com/odoo/odoo/pull/171795/commits/76875a28422ae5267b718b5d51bc186e9884a0e8 task: 3770458
Resolved issues and error corrections
This fix resolves a blocking issue where users couldn't generate quotes for repair orders accessed through helpdesk tickets. The problem occurred because helpdesk team information was incorrectly passed to the sales order creation process, causing validation errors. The fix prevents this context from being passed, allowing users to create quotes and manually assign sales teams as needed.
Original PR description
Accessing a linked repair record through Helpdesk can lead to a blocking bug where the user is unable to generate a quote through the repair record. ### Description of the issue : 1) When generating…
Accessing a linked repair record through Helpdesk can lead to a blocking bug where the user is unable to generate a quote through the repair record. ### Description of the issue : 1) When generating a `repair.order` record through a Helpdesk ticket or accessing an existing linked repair order through the smart button, the context key for `default_team_id` will be inherited. In this case referencing the id of the current `helpdesk.team` record. 2) When trying to generate a quote through the repair order, an edge case can happen where a ValidationError is triggered at sale order creation. ``` The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead. Model: Sales Order (sale.order) Constraint: sale_order_team_id_fkey ``` This is due to the fact that the `sales.order` also uses a `default_team_id` context key to designate the default sales team. If by happen stance, the referenced `id` values does not match an existing `crm.team` record, you will hit the above foreign key constraint blocking the user from generating the quote. ### Proposed fix : Functionally it makes no sense to pass the `default_team_id` context value from helpdesk to sales order, as both implicitly reference different models and functional entities. Since the `_prepare_repairs_default_value` was already introduced in https://github.com/odoo/enterprise/commit/edd88ebdcc60b7c4d261bfb8755e910356684a3f to handle the context value preparation when using the repair smart button, the simplest solution is to set the `default_team_id` context key to `False`, thus not passing it later on to the sales order (i.e. the quote will not have a default sales team, but the user can still manually define one) ### How to reproduce: 1) Set up a DB with sales, helpdesk and repairs installed 2) If using demo data, just create a handful of new helpdesk teams (`helpdesk.team`). The important part is that you have at least one record with an id that will not be present in the `crm.team` table 3) For the helpdesk team matching the above criteria, activate the Repairs option (`use_product_repairs`) in the team configuration 4) Create a helpdesk ticket for that helpdesk team, create a repair order using the action button, then try using the Create Quotation action button (`action_create_sale_order`) → Validation Error is triggered OPW-4123410
This fix resolves a test failure in the partner commission module where salespeople lacked the necessary permissions to view sale order templates. The change ensures that the sale order template field is properly visible during testing, allowing the commission plan rules test to run successfully without demo data.
Original PR description
Before this commit, the salesmen did not had the right group and the test crashed with the following error when the test was run without demo data:
```
FAIL: TestCommissions.test_commission_plan_rules_with_template
Traceback (most recent call last):
File "/data/build/enterprise/partner_commission/tests/test_commissions.py", line 221, in test_commission_plan_rules_with_template
form.sale_order_template_id = so_template
File "/data/build/odoo/odoo/tests/form.py", line 326, in __setattr__
self[field_name] = value
File "/data/build/odoo/odoo/tests/form.py", line 331, in __setitem__
assert field_info is not None, f"{field_name!r} was not found in the view"
AssertionError: 'sale_order_template_id' was not found in the view
```
runbot task: 70916 and 73195
https://runbot.odoo.com/web/#id=70916&view_type=form&model=runbot.build.error&menu_id=405&cids=1 https://runbot.odoo.com/web/#id=73195&view_type=form&model=runbot.build.error&menu_id=405&cids=1This update adds the missing French language translations for Canadian accounting financial reports that were accidentally left out in a previous update. French-speaking users in Canada will now see properly translated accounting reports instead of English text.
Original PR description
In 8f74d9d the french translation for the accounting financial reports where forgotten. This add the missing translated terms opw-4124296
This fix prevents the barcode scanner from creating unnecessary empty inventory lines when processing transfers. Previously, when a line quantity was reduced to zero, the system would still create a duplicate record with zero units. Now, zero-quantity lines are properly reset instead of being split, eliminating these superfluous records and keeping inventory transfers cleaner.
Original PR description
**Current behavior:** In Barcode, it is possible for a split of incomplete moves to be triggered which leaves the original move with a quantity and demand of zero- effectively generating a…
**Current behavior:**
In Barcode, it is possible for a split of incomplete moves to be
triggered which leaves the original move with a quantity and
demand of zero- effectively generating a superfluous record
value.
**Expected behavior:**
A split should not occur when the original line has
`quantity == 0`.
**Steps to reproduce:**
1. Create a transfer for 2 units of some product, assign it
2. Open the transfer in Barcode and use the form to add 1 unit
3. Use the back button within the Barcode app to return to the
previous action
4. Reopen the transfer, set the quantity on the move to 0 from 1
5. Use the back button to exit the transfer again
6. Open the transfer in the backend to see there is a move with
a line for 0 / 0 units.
**Cause of the issue:**
We split moves if their quantity is less than demand without
considering it may be zero.
**Fix:**
Reset the move in the case of `quantity == 0`- thus it will no
longer become a split candidate.
opw-4056241Fixed a bug that prevented users from converting helpdesk tickets to sales leads when they had more helpdesk teams than sales teams. The system was incorrectly trying to assign a helpdesk team ID to a sales lead, causing the conversion feature to fail. This fix ensures the system only assigns valid team information during the conversion process.
Original PR description
Steps to reproduce: - Helpdesk > Configuration > Helpdesk teams - Create teams until you have more help teams than sales teams - Create a ticket for the last team - Gear icon > Convert to lead - MissingError on team_id This happens because the context has default_team_id = self.id, despite these ids not being related in any way. Since this error completely blocks access to the feature we need to ensure that either the default exists or we don't pass one at all. opw-4119383
Fixed an issue where custom location settings were lost when kit bill-of-materials products were automatically broken down into their component parts during barcode scanning. Now the system properly preserves the destination location you specify, ensuring your inventory transfers go to the correct location even after the kit is decomposed.
Original PR description
**Current behavior:** When a kit bom product move line is broken down into move lines for its component products, changes written to the move line (not on the move) will not carry over to the new…
**Current behavior:**
When a kit bom product move line is broken down into move lines
for its component products, changes written to the move line
(not on the move) will not carry over to the new move nor move
lines.
**Expected behavior:**
The change should be observed beyond the decomposition.
**Steps to reproduce:**
1. Create a new internal transfer in barcode
2. Add a product with some bom via form, also edit the
destination location in the form to be something
non-default.
3. Save the form, validate the transfer
4. See that the broken down move lines don't keep the changed
destination location
**Cause of the issue:**
When the kit bom moves are exploded, the location information of
its move lines is not taken into account at any point- and thus
it's lost.
**Fix:**
For kit bom products, use a move line's location information
during creation of a move as opposed to the picking. Only link a
new move line for a kit bom product to an existing move if (in
addition to the product) the location source and destination
values match.
opw-4016702Fixed an issue where quality checks were not appearing in the order defined by the product's quality points. Quality checks are now properly sorted according to the sequence specified in the quality point configuration (per operation, per product, per quantity), ensuring users see them in the intended order during receipt inspections.
Original PR description
Steps to reproduce the bug:
- Create a storable product “P1”
- Create a 3 quality.point:
- 1st per operation:
- 2nd per product
- 3rd per quantity
- Create a receipt picking with 2 unit of P1
- Mark as to do
- Try to do the “quality.check”
Problem:
The 'quality.check' is not ordered by the 'quality.point' defined in the product because the 'quality.check' measured by 'move_line' is created when the 'stock.move.line' is created before the other type, so it is proposed first.
https://github.com/odoo/enterprise/blob/fbc3ce9d690ab8c5ccf5b0f46748aec8901575a1/quality_control/models/stock_move_line.py#L31
https://github.com/odoo/enterprise/blob/fbc3ce9d690ab8c5ccf5b0f46748aec8901575a1/quality_control/models/stock_move_line.py#L54-L55
opw-3870095
Forward-Port-Of: odoo/enterprise#62047
Forward-Port-Of: odoo/enterprise#61132This fix corrects the "Certificado de Retención en IVA" (Colombian Tax Withholding Certificate) report to only include invoices that actually have withholding taxes applied. Previously, the report was incorrectly including all invoices with VAT taxes, even those without withholding taxes, resulting in inaccurate payment amounts. The fix uses a mathematical formula to accurately calculate the withholding amount based on the actual withholding tax collected.
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_co - Switch to a Colombian company (e.g. CO Company) - Create a bill with a line having an IVA tax and a withholding tax: * IVA Compra 19% *…
**Steps to reproduce:** - Install Accounting and l10n_co - Switch to a Colombian company (e.g. CO Company) - Create a bill with a line having an IVA tax and a withholding tax: * IVA Compra 19% * RteIVA 15% sobre el 19% IVA - Post the bill - Create another bill with a line having only an IVA tax - Post the bill - Go to "Accounting / Reporting / Colombian Statements / Certificado de Retención en IVA" **Issue:** "Monto del Pago Sujeto Retención" column is incorrect. It takes into account the tax amount from the IVA tax of both bills. As there is no withholding tax on the second bill, it should be excluded from the report. **Cause:** The report is checking the tax lines where the account is "2408%%" to compute the amount of this column. So every tax lines with from an IVA tax will be taken into account, even if there is no wihholding tax. **Solution:** Computing the correct amount by checking the account and the presence of a withholding tax is pretty complex. It would require to rely on the invoice lines instead of the tax lines to recompute the tax amounts because the amount of a specific tax is aggregated into a unique tax line (even if there are several invoice lines with different taxes combination) and there is no information about the tax repartition in the tax line. Recomputing all from the invoice lines would bad for the performance. As the withholding taxes are always 15% over VAT in Colombian localization, we can simply apply this formula to retrieve the amount subjected to withholding: [Monto del Pago Sujeto Retención = Retenido Consignado / 15%] opw-3989661 Forward-Port-Of: odoo/enterprise#68724 Forward-Port-Of: odoo/enterprise#68016
This fix resolves a problem where payment reminders were being processed repeatedly every day without actually sending messages, causing unnecessary system load. The update ensures that reminder dates are properly updated even when no message is sent, limits the number of partners processed per cycle to 1000, and adds notification messages when reminder actions fail.
Original PR description
Accounting > Configuration > Followup Levels Open the first level, enable 'Auto Execute' Delete the remaining follow up levels Create an invoice for a partner dated in the past with payment terms 'Immediate Payment' Run manually the cron 'Account Report Followup; Execute followup' Issue: partner will be processed by the cron, a warning will be logged but the partner next remainder date has not changed, so the next day the partner will be processed again. It is an issue when partner starts to accumulate as all the partner with missing info will be processed daily without further notice This commit introduce the following mitigations for the issue: - Update the next remainder date even if no message has been sent - Limit the number of partner we process per run to 1000 - Add a message to the partner record in case the followup action failed opw-3935084 Forward-Port-Of: odoo/enterprise#68615 Forward-Port-Of: odoo/enterprise#66770
This fix prevents internal errors when displaying rental sales orders on websites with multiple companies and pricing configurations. The system now safely handles cases where sales order data may be incomplete or inconsistent, logging issues instead of crashing the website display.
Original PR description
Steps to reproduce: - Install `website_sale`, `sale_purchase_inter_company_rules` - Set the second website for "My Company (Chicago)" and as the domain put "http://2.localhost:8069/" - Create an SO on San Francisco company and save it without confirming - Execute the following SQL command: ```sql update sale_order set website_id=2, company_id=2, pricelist_id=null where id=41; -- here put the id of the SO ``` - Now open the website app and select Website 2. Issues: Internal error, this is due to the fact that we're raising a UserError here. https://github.com/odoo/odoo/blob/79ad7396b15a9e26e812f2f2151241fa5bf76e18/addons/website_sale/models/website.py#L365-L373 Since we're rendering the template we can't raise any error as such a new safe function for `sale_get_order` was made in order to just catch and log the error. opw-4054699
Code cleanup and technical improvements
The budget calculation system has been reorganized to make it easier for developers to customize and extend. Specific calculation methods were separated out from the main computation process and given clearer names, improving the overall code structure without changing how the system works for end users.
Original PR description
The methods 'get_accounts' and 'get_query' were extracted from the _compute_practical_amount method for inheritance purposes. Consequently, their names were changed to more descriptive ones.