Daily updates from Odoo
Wednesday, January 22, 2025
10 changes · master
Code cleanup and technical improvements
Work schedule fields previously tied to Payroll are now available from the shared resource model, so other apps can use them without requiring Payroll to be installed. This makes staffing and time-related features easier to reuse across modules while keeping behavior consistent.
Original PR description
Different modules could use the fields defined in hr_payroll/resource_calendar. However, these modules shouldn't require the payroll app to be installed in order to be able to use those fields. Hence the fields hours_per_week, full_time_required_hours, is_fulltime, work_time_rate over are moved to the base resource model. task-4448549
Miscellaneous changes
…ique FITID To replicate the issue: 1. Install the brazilian localization (enterprise) 2. In the accounting app dashboard, click Import Statement 3. Upload an .OFX file with duplicate FIDID 4. A validation error appears and the upload is not done Cause: The bank statement import assumes the FIDID is a unique identifier for the transactions in the .OFX file. A sql constraint is set in place to ensure this uniqueness. However, some Brazilian banks may generate files with transactions wi
Original PR description
…ique FITID To replicate the issue: 1. Install the brazilian localization (enterprise) 2. In the accounting app dashboard, click Import Statement 3. Upload an .OFX file with duplicate FIDID 4. A…
…ique FITID To replicate the issue: 1. Install the brazilian localization (enterprise) 2. In the accounting app dashboard, click Import Statement 3. Upload an .OFX file with duplicate FIDID 4. A validation error appears and the upload is not done Cause: The bank statement import assumes the FIDID is a unique identifier for the transactions in the .OFX file. A sql constraint is set in place to ensure this uniqueness. However, some Brazilian banks may generate files with transactions with the same FITID. An example is when PIX transfers have the same FITID as the fee charged for the PIX, which appears as another bank statement line with the same FITID. Fix: The function _parse_bank_statement_file is altered to call a function that fills the vals_line dictionary with the transaction's values. This function is then overwritten in l10n_br_reports to not include the FITID (unique_import_id) for journals of Brazilian companies. opw-4317681 Forward-Port-Of: odoo/enterprise#77381 Forward-Port-Of: odoo/enterprise#76556
Without this change it's impossible to remove the user groups from internal users, because they're being re-added upon the module updates. The reason is because there's a mechanism in place that synchronizes the newly added groups to the default user, so they're automatically added to all internal users ([ref](https://github.com/odoo/odoo/blob/6b5a839428b06e09d90631e9824a9b594ff8f4f5/odoo/addons/base/models/res_users.py#L621-L626)). For this reason and by convention, groups added t
Original PR description
Without this change it's impossible to remove the user groups from internal users, because they're being re-added upon the module updates.
The reason is because there's a mechanism in place that synchronizes the newly added groups to the default user, so they're automatically added to all internal users ([ref](https://github.com/odoo/odoo/blob/6b5a839428b06e09d90631e9824a9b594ff8f4f5/odoo/addons/base/models/res_users.py#L621-L626)).
For this reason and by convention, groups added to the default user should be non-updateable, so system administrators can remove them if they wanted to.
Related to: https://github.com/odoo/enterprise/commit/621824fb3fe1b5b895d1a37a15d45e903bc7dc6f
--
ping @tde-banana-odoo @tivisse
Forward-Port-Of: odoo/enterprise#77361
Forward-Port-Of: odoo/enterprise#55024Before this commit, selecting an order from the order list and attempting to load it would result in an error. opw-4251717 X-original-commit: 2cd72396d9f96cd7770154c56355ec864e0926e9 Forward-Port-Of: odoo/enterprise#77330 Forward-Port-Of: odoo/enterprise#77097
Original PR description
Before this commit, selecting an order from the order list and attempting to load it would result in an error. opw-4251717 X-original-commit: 2cd72396d9f96cd7770154c56355ec864e0926e9 Forward-Port-Of: odoo/enterprise#77330 Forward-Port-Of: odoo/enterprise#77097
* Import orders from multiple accounts and shops * Match products based on their internal reference (`item_id` or `model_id` in Shopee) * Support both Fulfillment by Shopee (FBS) and Fulfillment by Merchant (FBM): * FBS: import the completed orders * FBM: fetch the delivery information from Shopee, track and synchronize the stock level to Shopee task-3623720 Forward-Port-Of: odoo/enterprise#77342 Forward-Port-Of: odoo/enterprise#71610
Original PR description
* Import orders from multiple accounts and shops * Match products based on their internal reference (`item_id` or `model_id` in Shopee) * Support both Fulfillment by Shopee (FBS) and Fulfillment by Merchant (FBM): * FBS: import the completed orders * FBM: fetch the delivery information from Shopee, track and synchronize the stock level to Shopee task-3623720 Forward-Port-Of: odoo/enterprise#77342 Forward-Port-Of: odoo/enterprise#71610
The confirmation page wasn't displayed and the order wasn't sent to the preparation display when confirming an order with a total of 0. Now the confirmation page is displayed and the order is send to the preparation display when the order is confirmed regardless of the total amount. Forward-Port-Of: odoo/enterprise#58348
Original PR description
The confirmation page wasn't displayed and the order wasn't sent to the preparation display when confirming an order with a total of 0. Now the confirmation page is displayed and the order is send to the preparation display when the order is confirmed regardless of the total amount. Forward-Port-Of: odoo/enterprise#58348
pos*: pos_blackbox_be, pos_iot, pos_restaurant_preparation_display In this commit, we adapt the point of sale modules to be compliant with the belgian restaurant certification. A summary of the changes since last version: - QR ordering: QR code ordering is available without online payment. Just a simple ordering configuration. - Price can be changed: The price of a product can be changed in the cart. Forward-Port-Of: odoo/enterprise#72209
Original PR description
pos*: pos_blackbox_be, pos_iot, pos_restaurant_preparation_display In this commit, we adapt the point of sale modules to be compliant with the belgian restaurant certification. A summary of the changes since last version: - QR ordering: QR code ordering is available without online payment. Just a simple ordering configuration. - Price can be changed: The price of a product can be changed in the cart. Forward-Port-Of: odoo/enterprise#72209
Re-exported because: - To take into account PRs that were merged after the freeze - A couple pot files were missing/empty (i.e. empty = deleted) - Just in case there was anything out of date Forward-Port-Of: odoo/enterprise#77431
Original PR description
Re-exported because: - To take into account PRs that were merged after the freeze - A couple pot files were missing/empty (i.e. empty = deleted) - Just in case there was anything out of date Forward-Port-Of: odoo/enterprise#77431
Steps to reproduce: --- 1) Go to a Subscription with a Project 2) Add a section and/or note line 3) Navigate Project smart button -> Dashboards -> Subscription dropdown 4) Notice the order lines Issue: ---- In the subscription the sections and notes are taken into account this is due to the fact that all the line are retrieved and not only the "billable". Fix: --- Adding a condition on the display type of the line. opw-4394767 Forward-Port-Of: odoo/enterprise#77176
Original PR description
Steps to reproduce: --- 1) Go to a Subscription with a Project 2) Add a section and/or note line 3) Navigate Project smart button -> Dashboards -> Subscription dropdown 4) Notice the order lines Issue: ---- In the subscription the sections and notes are taken into account this is due to the fact that all the line are retrieved and not only the "billable". Fix: --- Adding a condition on the display type of the line. opw-4394767 Forward-Port-Of: odoo/enterprise#77176
## Description - when applying sort by for a non-stored field in a list view, it leads to traceback. - when fetching data, when attempting to convert it into an SQL query, now throws error after this [commit](https://github.com/odoo/odoo/commit/fb0569eeba0a8909a067f2ad90b80edbe8d2d915), form this [line](https://github.com/odoo/odoo/blame/de47ec932742ef82b315990cbac8787f82aa91d5/odoo/models.py#L2846) - This pr ensures that only stored fields are available for sorting in the list view editor,
Original PR description
## Description - when applying sort by for a non-stored field in a list view, it leads to traceback. - when fetching data, when attempting to convert it into an SQL query, now throws error after this…
## Description
- when applying sort by for a non-stored field in a list view, it leads to traceback.
- when fetching data, when attempting to convert it into an SQL query, now throws error after this [commit](https://github.com/odoo/odoo/commit/fb0569eeba0a8909a067f2ad90b80edbe8d2d915), form this [line](https://github.com/odoo/odoo/blame/de47ec932742ef82b315990cbac8787f82aa91d5/odoo/models.py#L2846)
- This pr ensures that only stored fields are available for sorting in the list view editor, preventing such issues.
## steps to reproduce
- Start a db ( version 17.2 or greater)
- install studio and contacts app
- open studio editor for contact app's list view.
- Add display_name in list and set `sort by` attribute with `display_name` field.
## Traceback
```py
File "/home/odoo/odoo/codebase/odoo/saas-17.2/addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/addons/web/models/models.py", line 46, in web_search_read
records = self.search_fetch(domain, specification.keys(), offset=offset, limit=limit, order=order)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 1626, in search_fetch
query = self._search(domain, offset=offset, limit=limit, order=order or self._order)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 5454, in _search
query.order = self._order_to_sql(order, query)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 5266, in _order_to_sql
term = self._order_field_to_sql(alias, field_name, sql_direction, sql_nulls, query)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 5324, in _order_field_to_sql
sql_field = self._field_to_sql(alias, field_name, query)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 2846, in _field_to_sql
raise ValueError(f"Cannot convert field {field} to SQL")
ValueError: Cannot convert field res.partner.display_name to SQL
```
Forward-Port-Of: odoo/enterprise#77467
Forward-Port-Of: odoo/enterprise#76351