Thursday, July 13, 2023
20 changes · master
Enhancements to existing features
The website sale UPS demo data now keeps the cash on delivery payment option disabled by default. This helps demo environments better reflect the intended checkout setup and avoids showing an unsuitable payment option during demonstrations or testing.
Original PR description
task-3235154 See also: - https://github.com/odoo/odoo/pull/121138
The view editor setup now includes a required naming service so related view features can work correctly after recent platform changes. This helps keep Studio editing tools compatible and reliable without changing the user workflow.
Project-related settings now use the available screen width more effectively, making labels, descriptions, and dropdowns easier to read and interact with. This improves clarity when configuring project, field service, helpdesk, and document settings without changing business workflows.
Original PR description
In this PR - By this space is fixed between the project label and the field. - Fix the content does not appear in full row due to bootstrap classes written in the setting component. so now with this commit the column size will be increases task-3183771
Resolved issues and error corrections
Vendor bills in Ecuador localization are adjusted so they are not automatically assigned the company's default sales team or salesperson. This prevents hidden sales-related values from being set on supplier bills, reducing confusion and keeping vendor bill data cleaner.
Original PR description
When creating a Vendor Bill, the default Sales Team & Person of the company is assigned to the Vendor Bill. The field isn't even displayed, it's hidden, you can only display it with Studio and can't even change it. In the community PR (https://github.com/odoo/odoo/pull/120628), we add a condition on the filling of this field but by doing so we need to modify this test. task-id: 3279233
Miscellaneous changes
Before this commit, the chatter was barely useable in documents. - in desktop, when chatter content was bigger than screen height, it made whole page scrollable - in mobile and with white theme, the background and text color were both gray This commit fixes both issues as follow: - in desktop, the chatter is scrollable by itself if it has more content that it can fit, thanks to container imposing `h-100`. - the chatter of documents always use background of webclient, so that in mobile it'
Original PR description
Before this commit, the chatter was barely useable in documents. - in desktop, when chatter content was bigger than screen height, it made whole page scrollable - in mobile and with white theme, the…
Before this commit, the chatter was barely useable in documents. - in desktop, when chatter content was bigger than screen height, it made whole page scrollable - in mobile and with white theme, the background and text color were both gray This commit fixes both issues as follow: - in desktop, the chatter is scrollable by itself if it has more content that it can fit, thanks to container imposing `h-100`. - the chatter of documents always use background of webclient, so that in mobile it's readable in white theme. Before / After (mobile): <img width="372" alt="before-mobile" src="https://github.com/odoo/enterprise/assets/6569390/f726150c-66b2-4962-977d-80b9f1d9e32e"> <img width="371" alt="after-mobile" src="https://github.com/odoo/enterprise/assets/6569390/01be9e5f-0bd1-4b0a-9db7-16425dcf4ec3"> Before / After (desktop): <img width="2305" alt="before-desktop" src="https://github.com/odoo/enterprise/assets/6569390/5b4dced5-bbe4-43d7-8a5b-123306d4b5eb"> <img width="2304" alt="after-desktop" src="https://github.com/odoo/enterprise/assets/6569390/1ce44390-bffe-4501-8ecf-4226dc61f5db"> Forward-Port-Of: odoo/enterprise#44053
Users can now close the onboarding panel shown on appointment pages without seeing an error. The panel also stays closed after the page is refreshed, reducing confusion and interruptions.
Original PR description
When the user opens an appointment, there is an onboarding panel at the top that users can close. But currently, it gives a traceback instead of closing it, and on the page refresh it will come back. This issue was introduced at https://github.com/odoo/enterprise/commit/6ee68e93dc4c06df079a51a9a2c679cc86d16117. Now, users can close the onboarding panel without traceback. **Task**-3418687
Issue: ------ Since the commit: a4c8befe98d0bde7a68568a0e9599accfe7b67b6 The calculation of the following lines doesn't work. Cause: ------ Only the component of the `sequence` field to link the new `update` method to the record. Solution: --------- Authorize to make an orm call with an unmounted component using the environment. opw-3419064 Forward-Port-Of: odoo/enterprise#44033
Original PR description
Issue: ------ Since the commit: a4c8befe98d0bde7a68568a0e9599accfe7b67b6 The calculation of the following lines doesn't work. Cause: ------ Only the component of the `sequence` field to link the new `update` method to the record. Solution: --------- Authorize to make an orm call with an unmounted component using the environment. opw-3419064 Forward-Port-Of: odoo/enterprise#44033
This commit sets copy=False on res.users fields to prevent a permission error when someone in the Administration / Access Rights group attempts to duplicate a user. task-3299908 Forward-Port-Of: odoo/enterprise#43991 Forward-Port-Of: odoo/enterprise#41046
Original PR description
This commit sets copy=False on res.users fields to prevent a permission error when someone in the Administration / Access Rights group attempts to duplicate a user. task-3299908 Forward-Port-Of: odoo/enterprise#43991 Forward-Port-Of: odoo/enterprise#41046
Description of the issue/feature this PR addresses: In the planning view, to create a recurring shift, please ensure to select the repeat field and choose repeat_type to the "Number of Repetitions" option. Next, input the repeat_number field. Please note that this field can accommodate more than 6 digits, Current behavior before PR: After clicking on the save button, a traceback error is being displayed. Desired behavior after PR is merged: it should not be showing traceback fix: A
Original PR description
Description of the issue/feature this PR addresses: In the planning view, to create a recurring shift, please ensure to select the repeat field and choose repeat_type to the "Number of Repetitions" option. Next, input the repeat_number field. Please note that this field can accommodate more than 6 digits, Current behavior before PR: After clicking on the save button, a traceback error is being displayed. Desired behavior after PR is merged: it should not be showing traceback fix: Add a validation message that alerts the user when the input value exceeds a certain digits, helping prevent erroneous data from being processed. task-3280609 Forward-Port-Of: odoo/enterprise#43941 Forward-Port-Of: odoo/enterprise#39976
## Description `component_qty_to_do` is computed based on `qty_done` & `component_remaining_qty`, which both use the same decimal accuracy 'Product Unit of Measure'. Without this decimal accuracy set on `component_qty_to_do`, the view `quality_check_view_form_tablet` can misinterpret the actual value, and will show an incorrect action to do ('continue production' instead of 'validate'). ## To Reproduce: https://watch.screencastify.com/v/S3pT4bV1u29a2EbLxX8R - Create a product FNS & a compo
Original PR description
## Description `component_qty_to_do` is computed based on `qty_done` & `component_remaining_qty`, which both use the same decimal accuracy 'Product Unit of Measure'. Without this decimal accuracy set…
## Description
`component_qty_to_do` is computed based on `qty_done` & `component_remaining_qty`, which both use the same decimal accuracy 'Product Unit of Measure'. Without this decimal accuracy set on `component_qty_to_do`, the view `quality_check_view_form_tablet` can misinterpret the actual value, and will show an incorrect action to do ('continue production' instead of 'validate').
## To Reproduce:
https://watch.screencastify.com/v/S3pT4bV1u29a2EbLxX8R
- Create a product FNS & a component CMP.
- Create a BOM for FNS:
- Using 13.2 units of CMP
- Flexible Consumption to 'Blocked' (under Miscellaneous)
- 1 operation
- Add a step to the operation with:
- Type: 'Register Consumed Materials'
- Product to register: CMP
- Create a Manufacturing order for 1 unit of FNS -> Confirm -> Plan
- Go to the workorder tablet view:
==> The qty_done should be set to 13.2, but the button shown is still 'Continue Production' instead of 'Validate'.
If the component quantity is different (ex: 13), here is how it looks like when you open the workorder tablet view:

---
OPW-3322942
Forward-Port-Of: odoo/enterprise#41710This commit fixes the green_savings_report template by removing a web.html_container call and moving modal code inside the web.basic_layout container. task-3380976 Forward-Port-Of: odoo/enterprise#42994
Original PR description
This commit fixes the green_savings_report template by removing a web.html_container call and moving modal code inside the web.basic_layout container. task-3380976 Forward-Port-Of: odoo/enterprise#42994
When user create new employee payslip, select employee and remove date of ```date_to``` field, a traceback will appear. Steps to reproduce the issue: - Go to Payroll > Payslips > All Payslips - Create New Employee Payslip - Select any Employee - Remove date of ```date_to``` field. Traceback: ``` KeyError: <NewId 0x7f3063ad3eb0> File "odoo/api.py", line 959, in get cache_value = field_cache[record._ids[0]] CacheMiss: 'hr.payslip(<NewId 0x7f3063ad3eb0>,).is_wrong_duration'
Original PR description
When user create new employee payslip, select employee and remove date of ```date_to``` field, a traceback will appear. Steps to reproduce the issue: - Go to Payroll > Payslips > All Payslips -…
When user create new employee payslip, select employee and remove date of ```date_to``` field,
a traceback will appear.
Steps to reproduce the issue:
- Go to Payroll > Payslips > All Payslips
- Create New Employee Payslip
- Select any Employee
- Remove date of ```date_to``` field.
Traceback:
```
KeyError: <NewId 0x7f3063ad3eb0>
File "odoo/api.py", line 959, in get
cache_value = field_cache[record._ids[0]]
CacheMiss: 'hr.payslip(<NewId 0x7f3063ad3eb0>,).is_wrong_duration'
File "odoo/fields.py", line 1158, in __get__
value = env.cache.get(record, self)
File "odoo/api.py", line 966, in get
raise CacheMiss(record, field)
KeyError: <NewId 0x7f3063ad3eb0>
File "odoo/api.py", line 959, in get
cache_value = field_cache[record._ids[0]]
CacheMiss: 'hr.payslip(<NewId 0x7f3063ad3eb0>,).is_wrong_duration'
File "odoo/fields.py", line 1213, in __get__
value = env.cache.get(record, self)
File "odoo/api.py", line 966, in get
raise CacheMiss(record, field)
ValueError: Compute method failed to assign hr.payslip(<NewId 0x7f3063ad3eb0>,).is_wrong_duration
File "odoo/http.py", line 2123, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1927, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 30, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "odoo/models.py", line 6704, in onchange
todo = [
File "odoo/models.py", line 6707, in <listcomp>
if name not in done and snapshot0.has_changed(name)
File "odoo/models.py", line 6504, in has_changed
return self[name] != record[name]
File "odoo/models.py", line 6131, in __getitem__
return self._fields[key].__get__(self, type(self))
File "odoo/fields.py", line 1155, in __get__
self.recompute(record)
File "odoo/fields.py", line 1365, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1338, in apply_except_missing
func(records)
File "odoo/fields.py", line 1387, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 396, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4491, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 99, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-16.3/hr_payroll/models/hr_payslip.py", line 892, in _compute_name
'dates': slip._get_period_name()
File "home/odoo/src/enterprise/saas-16.3/hr_payroll/models/hr_payslip.py", line 841, in _get_period_name
if self.is_wrong_duration:
File "odoo/fields.py", line 1216, in __get__
raise ValueError("Compute method failed to assign %s.%s" % (record, self.name))
```
https://github.com/odoo/enterprise/blob/cd42b0de992cc2acc8a403c828c06cf9501a3c6c/hr_payroll/models/hr_payslip.py#L840 Here, when user remove date of date_to field in employee slip,
It will not get any value for date_to field, when it will return period_name.
So it will lead to above traceback.
sentry-4306109394
Forward-Port-Of: odoo/enterprise#43914### Reason for the problem When dealing with a large number of journal items (3 million+ AML), there is a significant slowdown in displaying the cash flow report, resulting in poor performance. The execution time for processing these moves was measured at 80s locally and 7 minutes on a hosted database, which is causing delays and impacting user experience. ### Current behavior A slowdown in loading the cash flow report with 3 million+ AML. ### Expected behavior Efficient processin
Original PR description
### Reason for the problem When dealing with a large number of journal items (3 million+ AML), there is a significant slowdown in displaying the cash flow report, resulting in poor performance. The execution time for processing these moves was measured at 80s locally and 7 minutes on a hosted database, which is causing delays and impacting user experience. ### Current behavior A slowdown in loading the cash flow report with 3 million+ AML. ### Expected behavior Efficient processing of account move lines without noticeable delays. ### Fix To address this performance issue, a subquery was implemented to optimize the processing of account move lines. This subquery approach has successfully reduced the execution time from 80s to ~15s in both local/hosted db. opw-3220665 Forward-Port-Of: odoo/enterprise#43971
taskid: 3420292 Forward-Port-Of: odoo/enterprise#43911
Original PR description
taskid: 3420292 Forward-Port-Of: odoo/enterprise#43911
Prior to this commit, the sidebar header had an unnecessary scroll bar. This header was also partially hidden when resizing the page height. In addition, when the header buttons were too long, there was a lack of horizontal padding and the buttons were too squashed. task-3415730 Part of task-3326263 The issue : https://aju.nimbusweb.me/share/8945963/ue5ak29hqvy64374b1wq Forward-Port-Of: odoo/enterprise#43807
Original PR description
Prior to this commit, the sidebar header had an unnecessary scroll bar. This header was also partially hidden when resizing the page height. In addition, when the header buttons were too long, there was a lack of horizontal padding and the buttons were too squashed. task-3415730 Part of task-3326263 The issue : https://aju.nimbusweb.me/share/8945963/ue5ak29hqvy64374b1wq Forward-Port-Of: odoo/enterprise#43807
Steps to reproduce: ------------------- - go to the form view of a Payslip; - click on the action menu "Edit Payslip Lines"; - add a line and fill with values; Issue: ------ A traceback appears saying the component is destroyed. Cause: ------ When we click on "Add a line", we create a `PayslipLineField` component for each field in the list view. The purpose of the `fieldComponentProps` getter is to render the component props with the record, which has a new update method. We wil
Original PR description
Steps to reproduce: ------------------- - go to the form view of a Payslip; - click on the action menu "Edit Payslip Lines"; - add a line and fill with values; Issue: ------ A traceback appears…
Steps to reproduce: ------------------- - go to the form view of a Payslip; - click on the action menu "Edit Payslip Lines"; - add a line and fill with values; Issue: ------ A traceback appears saying the component is destroyed. Cause: ------ When we click on "Add a line", we create a `PayslipLineField` component for each field in the list view. The purpose of the `fieldComponentProps` getter is to render the component props with the record, which has a new update method. We will redefine an update function for this record. It will be redefined only once, via the `isPayslipLineField` flag. We will use the first component to be created for the record, i.e. a component for the `sequence` field. The new update method uses `this` to make an orm call. As a result, this will refer to the component for the `sequence` field necessarily, as we are defining this new update method only once. Unfortunately, the record is in edit mode and the `sequence` field component is not yet mounted. The component will therefore be destroyed during the "switchMode" method. Without the `isPayslipLineField` flag, it was "lucky" that the component existed (the `this` was a component referring to the `total` field). Solution: --------- Use a component that does not refer to the `sequence` field, so that the call can be made with a mounted component. Note: ----- The problem does not append for records in the `WorkedDaysField` component, because the first field is `WorkedDaysField` and not a `sequence`. opw-3419064 Forward-Port-Of: odoo/enterprise#43979
The base model (`dynamic_placeholder_model_reference_field`) used by the dynamic placeholder hook to open the dynamic placeholder popover was not provided in the view overridden in this module. task-3381924 task-3378259 Forward-Port-Of: odoo/enterprise#43053
Original PR description
The base model (`dynamic_placeholder_model_reference_field`) used by the dynamic placeholder hook to open the dynamic placeholder popover was not provided in the view overridden in this module. task-3381924 task-3378259 Forward-Port-Of: odoo/enterprise#43053
Steps to reproduce ================== - Open a crm.lead form - Open studio - Switch to the "Extra Information" page - Drag the "Company name" field somewhere else -> The original field stays at the same place Cause of the issue ================== The simplified view is the following: ```xml <form> <sheet> <group> <group name="lead_partner" attrs="{'invisible': [('type', '=', 'opportunity')]}"> <field name="partner_name"/> </group> </group>
Original PR description
Steps to reproduce ================== - Open a crm.lead form - Open studio - Switch to the "Extra Information" page - Drag the "Company name" field somewhere else -> The original field stays at the…
Steps to reproduce
==================
- Open a crm.lead form
- Open studio
- Switch to the "Extra Information" page
- Drag the "Company name" field somewhere else
-> The original field stays at the same place
Cause of the issue
==================
The simplified view is the following:
```xml
<form>
<sheet>
<group>
<group name="lead_partner" attrs="{'invisible': [('type', '=', 'opportunity')]}">
<field name="partner_name"/>
</group>
</group>
<notebook>
<page string="Extra Information" attrs="{'invisible': [('type', '=', 'lead')]}">
<field name="partner_name"/>
</page>
</notebook>
</sheet>
</form>
```
The following operation was send to the server
```py
{
"type": "move",
"target": {...},
"position": "after",
"node": {"tag": "field", "attrs": {"name": "partner_name"}},
}
```
Only the following attributes are use to differentiate fields: ['name', 'widget', 'options', 'display', 'optional']. This is not enough. In this case, we wanted to move the second occurence of the partner_name field, but the first one was actually moved.
Solution
========
Pass the xpath of the source field for the move operation.
opw-3270165
Forward-Port-Of: odoo/enterprise#43825
Forward-Port-Of: odoo/enterprise#43308'account.generic.tax.report.handler' shouldn't be used anymore on custom reports' handlers: the new 'account.tax.report.handler' model should be used instead. This way, we avoid calling mistakenly logic that was defined for the generic tax report (for example, the get_dynamic_lines), and only keep inherit the things that are needed by all tax reports. Forward-Port-Of: odoo/enterprise#43818
Original PR description
'account.generic.tax.report.handler' shouldn't be used anymore on custom reports' handlers: the new 'account.tax.report.handler' model should be used instead. This way, we avoid calling mistakenly logic that was defined for the generic tax report (for example, the get_dynamic_lines), and only keep inherit the things that are needed by all tax reports. Forward-Port-Of: odoo/enterprise#43818
'EU Sales List' did not make sense. Forward-Port-Of: odoo/enterprise#43927 Forward-Port-Of: odoo/enterprise#43809
Original PR description
'EU Sales List' did not make sense. Forward-Port-Of: odoo/enterprise#43927 Forward-Port-Of: odoo/enterprise#43809