Thursday, January 26, 2023
21 changes · master
Enhancements to existing features
The tax unit form now shows a helpful placeholder in the name field, making it clearer what users should enter. This small usability improvement reduces confusion when creating or editing tax units.
Original PR description
before this commit, no label or placeholder was provided for the name field in account.tax.unit model. after this commit, the placeholder will be added for the name field in account.tax.unit model Before:  After: 
This update adds tools to quickly create sample subscription sales orders, recurring products, recurrence plans, and pricing data. It helps teams test and demonstrate subscription workflows with more realistic data, without affecting day-to-day customer-facing features.
Original PR description
Add populate method for subscription SO, recurrent product, recurrence and pricing.
This update adds internal annotations so automated checks can better distinguish safe database queries from risky ones. It supports stronger security review processes without changing how users work in accounting, documents, or local reporting features.
Original PR description
This commit is the enterprise side of the commit It simply adds comments to disable the new sql-injection check on query that are impossible to infer. https://github.com/odoo/odoo/pull/101237/files
Payroll test and calendar data were updated to align with the automatic calculation of average daily working hours. This reduces manual setup in Belgian payroll flows and helps keep leave, vouchers, and payslip-related calculations consistent with the latest platform behavior.
Original PR description
In odoo/odoo#109768 the average working hours per day was changed to a compute method, hence calling the onchange manually is no longer required. task-3102517
The partner ledger now hides values in the currency column when they match the company currency. This reduces duplicate information and makes accounting reports easier to read and compare.
Original PR description
In the partner ledger report, we should not show the amount in the currency column if it's in the currency of the company. The goal is the harmonisation and visual simplification of accounting reports. task: 3135715
Resolved issues and error corrections
To reproduce the issue: 1. Install [Contacts], [l10n_mx_edi_extended] on Apps 2. On [Settings] - [Users & Companies]>[Companies]: add a company with country Mexico - activate the developer mode - add Spanish, change the language to it 3. Go to [Contacts], create anew. Fields are not fully translated Desired behavior: Show translated guide on the partner address form Impacted versions: saas-15.2 up to master opw-3133510
Original PR description
To reproduce the issue: 1. Install [Contacts], [l10n_mx_edi_extended] on Apps 2. On [Settings] - [Users & Companies]>[Companies]: add a company with country Mexico - activate the developer mode - add Spanish, change the language to it 3. Go to [Contacts], create anew. Fields are not fully translated Desired behavior: Show translated guide on the partner address form Impacted versions: saas-15.2 up to master opw-3133510
Features or functions removed from Odoo
An obsolete reference in Web Studio to an editor toolbar element was removed because that element no longer exists. This keeps Web Studio aligned with the updated editor and helps avoid future compatibility issues.
Original PR description
This PR removes a mention to `#table` div of `web_editor.toolbar`, as it is being removed by the commit in community version. task-3074598 Community PR: https://github.com/odoo/odoo/pull/111131
Miscellaneous changes
This logs the incomplete records when raising in the `_check_address` constraint. This is useful when issues occur in scheduled actions (e.g. the subscription renewal cron) or confirming SOs/invoices in batch. opw-3118872 Forward-Port-Of: odoo/enterprise#36299 Forward-Port-Of: odoo/enterprise#35404
Original PR description
This logs the incomplete records when raising in the `_check_address` constraint. This is useful when issues occur in scheduled actions (e.g. the subscription renewal cron) or confirming SOs/invoices in batch. opw-3118872 Forward-Port-Of: odoo/enterprise#36299 Forward-Port-Of: odoo/enterprise#35404
This change updates an internal subscription test to use a fixed reference instead of a broader search. It helps prevent occasional unpredictable test failures, making future updates to the subscription area safer and more reliable.
Original PR description
Use ref instead of search to to avoir possible undeterministic failure related to #35201
related odoo PR: odoo/odoo#107288 Steps to reproduce: - install Marketing automation - Comercial prospection campaign > Templates button > Either template - edit > drag a block from the editor onto the email Issue: `Traceback: Uncaught Promise > Cannot read properties of undefined (reading 'droppable')` This happens because the email templates are not editable, which means no dropzones can be attached to them. Solution: Add classes 'oe_structure' and 'o_editable' to one div in
Original PR description
related odoo PR: odoo/odoo#107288 Steps to reproduce: - install Marketing automation - Comercial prospection campaign > Templates button > Either template - edit > drag a block from the editor onto the email Issue: `Traceback: Uncaught Promise > Cannot read properties of undefined (reading 'droppable')` This happens because the email templates are not editable, which means no dropzones can be attached to them. Solution: Add classes 'oe_structure' and 'o_editable' to one div in the templates so that at least one dropzone can be created. opw-3024691 Forward-Port-Of: odoo/enterprise#36157
The bank recon widget needs to display move lines that match the bank transaction value first. This will help the user find corresponding items easier. It was decided that a custom 'order by' would have had a significant performance impact, therefore, to achieve the goal, A search for matching residual amounts is executed and the account.move.line ids are placed in the context. This context key is then used to activate a custom search read on account.move.line when the embedded tree view load
Original PR description
The bank recon widget needs to display move lines that match the bank transaction value first. This will help the user find corresponding items easier. It was decided that a custom 'order by' would have had a significant performance impact, therefore, to achieve the goal, A search for matching residual amounts is executed and the account.move.line ids are placed in the context. This context key is then used to activate a custom search read on account.move.line when the embedded tree view loads. Task-3042547 Forward-Port-Of: odoo/enterprise#35290
The field product_stock_quant_ids is used specifically for 1 view as a readonly field:  As so, it does not need to be recomputed each time the product quants are updated. Removing the @api.depends result in a big performance gain for products tracked by SN with a number of quants and a number of sml > to 100 000+. In the scenario above, validating a transfer with 1000 units of a
Original PR description
The field product_stock_quant_ids is used specifically for 1 view as a readonly field: …
The field product_stock_quant_ids is used specifically for 1 view as a readonly field:  As so, it does not need to be recomputed each time the product quants are updated. Removing the @api.depends result in a big performance gain for products tracked by SN with a number of quants and a number of sml > to 100 000+. In the scenario above, validating a transfer with 1000 units of a product tracked by SN would result in 1000 sql queries equivalent to "SELECT id FROM stock_move_line WHERE product_id = XXXX"; the computation time is ~ 0.5 second when this query returns 100 000+ smls; multiply this by 1000, and you reach a few minutes to validate the transfer. The query above is generated by a search on the _modified_trigger function. --- Validation of a Transfer of **30 units** of a product tracked by SN with almost 1 000 000 product moves and more than 320 000 stock quants BEFORE the PR (1.5 min):  --- Validation of a Transfer of **1000 units** of a product tracked by SN with almost 1 000 000 product moves and more than 320 000 stock quants AFTER the PR (0.5 min):  OPW-2893131 Forward-Port-Of: odoo/enterprise#30034
### Steps to reproduce * install Studio and any other module that has a form view * go to a form view and open studio * select a field * in the sidebar, add a group to the `Limit visibility to groups` field You should see that the group you selected is not displayed (and therefore cannot be removed). Note: the problem is only visual, the group is actually applied in the backend opw-3097456 Forward-Port-Of: odoo/enterprise#35908
Original PR description
### Steps to reproduce * install Studio and any other module that has a form view * go to a form view and open studio * select a field * in the sidebar, add a group to the `Limit visibility to groups` field You should see that the group you selected is not displayed (and therefore cannot be removed). Note: the problem is only visual, the group is actually applied in the backend opw-3097456 Forward-Port-Of: odoo/enterprise#35908
In the commit odoo/enterprise@477ef590318261c334c1797263192824d8156954 I mistakenly used the `url_for()` provided by `http_routing` but `web_enterprise` doesn't depend on it, thus braking the dependency tree. This commit fixes it by simply removing this call as not being mandatory to define the WebManifest and ServiceWorker's scope. Forward-Port-Of: odoo/enterprise#36282
Original PR description
In the commit odoo/enterprise@477ef590318261c334c1797263192824d8156954 I mistakenly used the `url_for()` provided by `http_routing` but `web_enterprise` doesn't depend on it, thus braking the dependency tree. This commit fixes it by simply removing this call as not being mandatory to define the WebManifest and ServiceWorker's scope. Forward-Port-Of: odoo/enterprise#36282
A weird behavior happens with the specific values set on the test contained in this commit. In that case, amount_currency is set to "-1.1368683772161603e-13" that is evaluated as < 0.0 instead of == 0.0. Forward-Port-Of: odoo/enterprise#36258
Original PR description
A weird behavior happens with the specific values set on the test contained in this commit. In that case, amount_currency is set to "-1.1368683772161603e-13" that is evaluated as < 0.0 instead of == 0.0. Forward-Port-Of: odoo/enterprise#36258
Once the user completes the reconciliation, it's not ideal to display a blank screen. A tutorial component is displayed instead Co-authored-by: poma-odoo <poma@odoo.com> Co-authored-by: h4818 <ayh@odoo.com> Forward-Port-Of: odoo/enterprise#35699
Original PR description
Once the user completes the reconciliation, it's not ideal to display a blank screen. A tutorial component is displayed instead Co-authored-by: poma-odoo <poma@odoo.com> Co-authored-by: h4818 <ayh@odoo.com> Forward-Port-Of: odoo/enterprise#35699
During the computation of the aggregation formula, a possible result of a line was an exponential negative value. This resulted in an error since the following regex didn't allow for the 'e-' notation: 'Could not expand term 9.094947017729282e while evaluating formula L.balance + EQ.balance' Changed regex usage and rounded the result to zero depending on the currency settings. Tickets where this bug occured : https://www.odoo.com/web#id=3123918&menu_id=4720&cids=1&action=333&acti
Original PR description
During the computation of the aggregation formula, a possible result of a line was an exponential negative value. This resulted in an error since the following regex didn't allow for the 'e-' notation: 'Could not expand term 9.094947017729282e while evaluating formula L.balance + EQ.balance' Changed regex usage and rounded the result to zero depending on the currency settings. Tickets where this bug occured : https://www.odoo.com/web#id=3123918&menu_id=4720&cids=1&action=333&active_id=49&model=project.task&view_type=form https://www.odoo.com/web#id=3116674&menu_id=4720&cids=1&action=333&active_id=49&model=project.task&view_type=form Forward-Port-Of: odoo/enterprise#35917
To reproduce the issue: 1. Install [Contacts], [l10n_mx_edi_extended] on Apps 2. On [Settings], - [Users & Companies]>[Companies]: add a company with country Mexico - activate the developer mode - add Spanish, change the language to it 3. Go to [Contacts], create anew Desired behavior: Show translated guide on the partner address form Impacted versions: saas-15.2 up to master opw-3133510 Forward-Port-Of: odoo/enterprise#36227
Original PR description
To reproduce the issue: 1. Install [Contacts], [l10n_mx_edi_extended] on Apps 2. On [Settings], - [Users & Companies]>[Companies]: add a company with country Mexico - activate the developer mode - add Spanish, change the language to it 3. Go to [Contacts], create anew Desired behavior: Show translated guide on the partner address form Impacted versions: saas-15.2 up to master opw-3133510 Forward-Port-Of: odoo/enterprise#36227
Currently, changing the expected date in aged reports is not possible. `_build_line_id` now uses `~` instead of `-`, so we need to split by this character instead when fetching `move_line_id`. This commit updates the `_onChangeExpectedDate` accordingly. Forward-Port-Of: odoo/enterprise#36289 Forward-Port-Of: odoo/enterprise#36198
Original PR description
Currently, changing the expected date in aged reports is not possible. `_build_line_id` now uses `~` instead of `-`, so we need to split by this character instead when fetching `move_line_id`. This commit updates the `_onChangeExpectedDate` accordingly. Forward-Port-Of: odoo/enterprise#36289 Forward-Port-Of: odoo/enterprise#36198
Fix various bugs: 1) add 'form' in view_mode of that actions so clicking on list or kanban card will open corresponding record form view. 2) ticket will be considered failed if it contains at least one failed SLA and it'll not be show in SLA Success filter. 3) correct the computation success rate field value by excluding closed tickets that has no SLA set on them and hide success rate button from kanban card when there is no SLA set on all the closed tickets of the team and displa
Original PR description
Fix various bugs: 1) add 'form' in view_mode of that actions so clicking on list or kanban card will open corresponding record form view. 2) ticket will be considered failed if it contains at least one failed SLA and it'll not be show in SLA Success filter. 3) correct the computation success rate field value by excluding closed tickets that has no SLA set on them and hide success rate button from kanban card when there is no SLA set on all the closed tickets of the team and display '/' when there no SLA on today and last week closed tickets on the dashboard. task-3000817 Forward-Port-Of: odoo/enterprise#36222 Forward-Port-Of: odoo/enterprise#33555
Before this commit, if there was a rounding error in the values of sale order lines, the value would be send with many extra decimal places, causing the error in DHL API: `Value : 208.95000000000002 with fractionDigits = 14 has exceeded the fractionDigits Facet 3.` Steps to reproduce: 1. set up DHL credentials, use `U - Express Worldwide` product 2. make a quotation for a product with unit price of 69.65 and qty = 3 3. set the customer to be from another country 4. add shipment, get rates
Original PR description
Before this commit, if there was a rounding error in the values of sale order lines, the value would be send with many extra decimal places, causing the error in DHL API: `Value : 208.95000000000002 with fractionDigits = 14 has exceeded the fractionDigits Facet 3.` Steps to reproduce: 1. set up DHL credentials, use `U - Express Worldwide` product 2. make a quotation for a product with unit price of 69.65 and qty = 3 3. set the customer to be from another country 4. add shipment, get rates from DHL 5. confirm the sale order, go to delivery tab 6. validate the delivery and get the error message To fix the issue, the number of decimal places in value should be limited. opw-3141219 Forward-Port-Of: odoo/enterprise#36256