Daily updates from Odoo
Navigate
Branch
Thursday, September 21, 2023
18 changes
Enhancements to existing features
The disallowed expenses report now opens with last year's data by default and better separates vehicle-related expenses when fleet management is installed. It also warns users when vehicle expenses are posted on accounts that are missing the required disallowed expense category, helping teams spot configuration issues more easily.
Original PR description
There are three parts to this commit: 1. Date filter We set it to 'last_year' by default. 2. New warning A warning is added to the report if the following conditions are satisfied: - Posted move lines on an expense account within the report dates. - A vehicle is set on those lines. - No disallowed expense category has been defined on the account. This warning contains an action redirecting the user to a list view of these accounts. 3. 'vehicle_split' filter The filter will now be activated by default when `account_disallowed_expenses` and `fleet` are installed. This helps the user better understand the report. Indeed, there could be posted move lines on accounts with a disallowed expense category with AND without a vehicle. And those lines would otherwise be aggregated and no rate would be displayed. task-3508394
This update adjusts how view information is prepared so it no longer depends on temporary context settings. This should make screen loading more predictable across accounting, documents, helpdesk, payroll, field service, localization, web studio, and related areas without changing day-to-day workflows.
Original PR description
Companion of https://github.com/odoo/odoo/pull/135145 following community task task-3414108 task-3414068
Logged-in customers now see their own saved payment methods across subscription portal payment flows. Guests continue to see the payment methods tied to the customer record, making portal payments more consistent and easier to understand.
Original PR description
Before this commit, each module had its own logic regarding payment flows in the portal. With this commit, we enforce that if the user is logged in, they see their tokens, while logged out users see the tokens of the customer (the contextual partner). task-2836870
The Sign sending wizard now uses a dedicated signer selection component, making the interface more stable and easier to maintain when the wider web interface changes. Document refusal is also enabled more consistently, reducing hidden setup steps for users who need recipients to decline signing when appropriate.
Original PR description
In sign, we were using a one2many to render all the signers and roles in the wizard. However, this approach was prone to breaking every time the list renderer was changed in web. We also had issues with autofocus and styles breaking. This commit introduces a one2many field specific for sign that removes the list rendered dependency, therefore giving more control to what we can do and preventing the layout from breaking. task-3457176
Manufacturing teams can now see work order dependencies directly in the planning view, making production sequencing clearer. Quality teams also get quicker access to quality alerts from lot and serial number records, helping them investigate issues faster.
Original PR description
task 3395161 community: odoo/odoo#129933
Resolved issues and error corrections
The Knowledge topbar now includes the “Add to favorites” and “Remove from favorites” labels in the translation process. This helps users working in other languages see consistent, localized wording for favorite actions.
Original PR description
This commit ensures that the "Add to favorites" and "Remove from favorites" labels in the topbar component are properly added to the translations.
This update fixes how manufacturing work order documents are displayed in the document viewer. It avoids an unnecessary data reload and helps ensure images and embedded documents continue to open reliably for users.
This update fixes an internal payroll accounting test related to Belgian leave allocations. It helps keep payroll validation reliable after changes to how allocation names are automatically handled.
Original PR description
Previously, allocation name was not computed on create. Now, it's not a case anylonger. With this change, create_allocation test was failing as first the name field was assigned, then holiday_status_id; Which caused for the name field to be recomputed and assigned to False. As the field is required, leave_form.save() was raising an error. task-3389144
This fix aligns several localized point of sale modules with the updated order date handling used elsewhere. It helps ensure receipts, certifications, and local compliance records use the correct order date instead of the creation date.
Original PR description
In this previous commit: [0735ec422cdb0f3af3fb573ff78f06f0f75cfd38 ](https://github.com/odoo/odoo/pull/133293/commits/0735ec422cdb0f3af3fb573ff78f06f0f75cfd38) We changed the flow of validation_date and creation_date to date_order. But this wasn't checked in the l10n pos modules.
Fixed an issue where subscription sales log reports could appear empty when currency exchange rate data was missing. This helps users keep visibility into subscription activity even when some currency rate information is unavailable.
Original PR description
task-id: 3452269
Features or functions removed from Odoo
This update removes an older payroll rule calculation mechanism and adapts payroll configurations across multiple countries to the newer approach. It helps keep payroll processing more consistent and easier to maintain, with changes mainly affecting payroll setup and localization rules rather than daily employee workflows.
Miscellaneous changes
fixup of https://github.com/odoo/enterprise/commit/b2dd854c62508ca23cf7d03ee58b970bbe37ebcd **Before this PR:** In the `marketing.campaign` form view, the 'target' label targeted the `unique_field_id` field instead of the `model_id` field. **After this PR:** It will target the `model_id` field. **Task**-3430510 Forward-Port-Of: odoo/enterprise#47453
Original PR description
fixup of https://github.com/odoo/enterprise/commit/b2dd854c62508ca23cf7d03ee58b970bbe37ebcd **Before this PR:** In the `marketing.campaign` form view, the 'target' label targeted the `unique_field_id` field instead of the `model_id` field. **After this PR:** It will target the `model_id` field. **Task**-3430510 Forward-Port-Of: odoo/enterprise#47453
Accounts 71020100 Tax Expenses and 71020200 Income tax expense are Expense accounts, so have a positive when they are debits. Therefore, they should be used with a positive sign in the P&L. This also ensures that the Balance Sheet is balanced. Forward-Port-Of: odoo/enterprise#47612
Original PR description
Accounts 71020100 Tax Expenses and 71020200 Income tax expense are Expense accounts, so have a positive when they are debits. Therefore, they should be used with a positive sign in the P&L. This also ensures that the Balance Sheet is balanced. Forward-Port-Of: odoo/enterprise#47612
When a user switches from one template to another in the template gallery of Knowledge, the scroll view of the template preview does not reset, causing inconvenience as the user has to manually scroll back to the top to start read the new selected template. This PR aims to resolve this issue by automatically resetting the scroll offset when selecting a new template, providing a smoother user experience. Steps to reproduce the issue: 1. Open the template gallery of Knowledge 2. Select a temp
Original PR description
When a user switches from one template to another in the template gallery of Knowledge, the scroll view of the template preview does not reset, causing inconvenience as the user has to manually scroll back to the top to start read the new selected template. This PR aims to resolve this issue by automatically resetting the scroll offset when selecting a new template, providing a smoother user experience. Steps to reproduce the issue: 1. Open the template gallery of Knowledge 2. Select a template to preview it 3. Scroll in the template preview a bit 4. Select another template to preview it => The scroll offset of the scroll view is not reset. TO BE: When the user selects another article, the scroll offset should be set to 0 (back to the top). task-3508381 Forward-Port-Of: odoo/enterprise#47451
This traceback arises when user selects a `control point` in which there is no `product` while creating a quality check record. To reproduce this issue: 1) Install `quality_control` 2) Quality/ Quality Control/ Control Points 3) Create a new record 4) Select `product` in `control per` and click `Partial Transfer Test` 5) Give the values for required fields. 6) Save the record and Click on `Quality Checks` stat button 7) Create a new `Quality Checks` record. Error:- ``` KeyEr
Original PR description
This traceback arises when user selects a `control point` in which there is no `product` while creating a quality check record. To reproduce this issue: 1) Install `quality_control` 2) Quality/…
This traceback arises when user selects a `control point` in which there is no `product`
while creating a quality check record.
To reproduce this issue:
1) Install `quality_control`
2) Quality/ Quality Control/ Control Points
3) Create a new record
4) Select `product` in `control per` and click `Partial Transfer Test`
5) Give the values for required fields.
6) Save the record and Click on `Quality Checks` stat button
7) Create a new `Quality Checks` record.
Error:-
```
KeyError: 11
File "odoo/api.py", line 960, in get
cache_value = field_cache[record._ids[0]]
CacheMiss: 'quality.check(11,).qty_to_test'
File "odoo/fields.py", line 1160, in __get__
value = env.cache.get(record, self)
File "odoo/api.py", line 967, in get
raise CacheMiss(record, field)
AssertionError: precision_rounding must be positive, got 0.0
File "odoo/http.py", line 2134, in __call__
response = request._serve_db()
File "odoo/http.py", line 1710, 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 1737, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1938, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 233, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 191, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 717, 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 3208, in read
return self._read_format(fnames=fields, load=load)
File "odoo/models.py", line 3400, in _read_format
vals[name] = convert(record[name], record, use_display_name)
File "odoo/models.py", line 6187, in __getitem__
return self._fields[key].__get__(self, type(self))
File "odoo/fields.py", line 1211, in __get__
self.compute_value(recs)
File "odoo/fields.py", line 1389, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 395, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4529, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 101, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-16.4/quality_control/models/quality.py", line 202, in _compute_qty_to_test
qc.qty_to_test = float_round(qc.qty_line * qc.testing_percentage_within_lot / 100, precision_rounding=self.product_id.uom_id.rounding, rounding_method="UP")
File "odoo/tools/float_utils.py", line 54, in float_round
rounding_factor = _float_check_precision(precision_digits=precision_digits,
File "odoo/tools/float_utils.py", line 29, in _float_check_precision
assert precision_rounding is None or precision_rounding > 0,\
```
On `_compute_qty_to_test` method, `qty_to_test` variable is getting from `float_round` method.
In which `precision_rounding` is getting value from `product_id`.
See:- https://github.com/odoo/enterprise/blob/d2a07f90672f66baf4a854281f5b35b8297f5219/quality_control/models/quality.py#L187-L193
When the user does not select `product_id`, `precision_rounding` equals 0.0,
Which leads to the above traceback.
sentry-4441116989
Forward-Port-Of: odoo/enterprise#46811Sending a domain like `A & A` is useless, and can cause PostgreSQL to take longer than usual. Forward-Port-Of: odoo/enterprise#47393
Original PR description
Sending a domain like `A & A` is useless, and can cause PostgreSQL to take longer than usual. Forward-Port-Of: odoo/enterprise#47393
Steps to reproduce: - Install `documents` module - Go to documents and create a folder `A` - Create 2 sub-folders under folder `A` (`B` and `C`) - Create a document in folder `B` - Create a document in folder `C` - Select parent folder `A` (so that both documents are visible) - Select both documents and click on `Share` button - Open share link in a private window Issue: No document displayed. Cause: When sharing multiple documents from different folder,
Original PR description
Steps to reproduce: - Install `documents` module - Go to documents and create a folder `A` - Create 2 sub-folders under folder `A` (`B` and `C`) - Create a document in folder `B` - Create a document…
Steps to reproduce: - Install `documents` module - Go to documents and create a folder `A` - Create 2 sub-folders under folder `A` (`B` and `C`) - Create a document in folder `B` - Create a document in folder `C` - Select parent folder `A` (so that both documents are visible) - Select both documents and click on `Share` button - Open share link in a private window Issue: No document displayed. Cause: When sharing multiple documents from different folder, it is necessary to select a parent folder to display all sub document to select them. By doing so, the selected parent folder will be set as folder_id on the documents.share record. Since we selected one or multiple documents, the `type` field on the `documents.share` record will be set to `ids` and therefore not display the `include_sub_folders` field who will be set by default to `False` When accessing the shared link, `_get_documents_domain` method will check if `include_sub_folders` is True and use `child_of`, otherwise it will use `=` for the domain. Since `include_sub_folders` is False and using `=` on the folder_id, who is the parent folder, it will not find the documents. Solution: If `type` is `ids`, don't restrict the domain with the `folder_id` since documents can come from different folders and might be moved to another folder in the future but still need to be available in the share link. opw-3274981 Forward-Port-Of: odoo/enterprise#43135
Allow a user with read access on a parent and write access on its children to reorder the children in the Knowledge sidebar. The `write` method of the knowledge article model is adjusted to not throw an access error if it receives a `parent_id` val which is the same as the current `parent_id` as the current article, even if the current user does not have write access on the parent. task-3456741 Forward-Port-Of: odoo/enterprise#46989
Original PR description
Allow a user with read access on a parent and write access on its children to reorder the children in the Knowledge sidebar. The `write` method of the knowledge article model is adjusted to not throw an access error if it receives a `parent_id` val which is the same as the current `parent_id` as the current article, even if the current user does not have write access on the parent. task-3456741 Forward-Port-Of: odoo/enterprise#46989