Wednesday, April 17, 2024
23 changes · master
Enhancements to existing features
This update removes style settings that were defined but not actually used across several Odoo Enterprise areas. It helps keep the codebase cleaner and easier to maintain, with no expected change to how users see or use the product.
Original PR description
This commit removes assigned but never used SCSS variables.
Argentine electronic invoicing and VAT reporting now use the shared invoice currency rate stored on accounting entries. This keeps enterprise localization aligned with the main accounting changes and helps ensure consistent currency conversion data across reports and documents.
Original PR description
*: l10n_ar_edi,l10n_ar_reports In the related community PR the field 'l10n_ar_currency_rate' was removed in favor of the new stored 'currency_rate' field on account.move . This commit does the necessary changes in enterprise. task-3634224 see odoo/odoo#147910 see odoo/upgrade#5496
HR teams can now mark specific fleet vehicle stages so vehicles in those stages no longer appear in the salary configurator. This keeps employee salary offers focused on eligible vehicles and reduces confusion during package selection.
Original PR description
When hide_in_offer set to true, all the vehicles in that stage will not appear in the salary configurator anymore task-3649947
Resolved issues and error corrections
This fixes an issue in the Hong Kong payroll module where certain payroll filtering conditions could fail when no criteria were provided. It helps keep payslip processing reliable after related platform changes.
Original PR description
This issue was revealed by https://github.com/odoo/odoo/pull/160979.
Code cleanup and technical improvements
Payment and subscription follow-up actions are now handled after the main payment state change, so one failed action is less likely to block other required business steps. This improves reliability for subscription payments, SEPA direct debit, appointment payments, and related tax flows without changing the customer-facing payment process.
Original PR description
Some modules were overriding \_set\_'state' functions to trigger some business operations. In case of failure of one override function the rest of them would also fail. This overrides are moved to post-processing in order to ensure proper execution of all functions. See also: - https://github.com/odoo/odoo/pull/144710 - https://github.com/odoo/upgrade/pull/5546 task-2309987
Miscellaneous changes
When activating the groupby_prefix parameter for the Partner Ledger, a Traceback can happen if clicking on Unfold All and some of the partners are archived. That's because the search on res.partner in `_custom_unfold_all_batch_data_generator` injects the active ir.rule whereas the search in `_query_partners` does not. To fix that, pass `active_test=False` to the context. To reproduce: - Install `account_reports` and `contacts` with demo data - Archive Azure Interior - Set the paramete
Original PR description
When activating the groupby_prefix parameter for the Partner Ledger, a Traceback can happen if clicking on Unfold All and some of the partners are archived. That's because the search on res.partner in `_custom_unfold_all_batch_data_generator` injects the active ir.rule whereas the search in `_query_partners` does not. To fix that, pass `active_test=False` to the context. To reproduce: - Install `account_reports` and `contacts` with demo data - Archive Azure Interior - Set the parameter `account_reports.partner_ledger. groupby_prefix_groups_threshold` to 2 - Go to Partner Ledger - Click on Unfold All - A Traceback is raised Also changes the search domain operator from `ilike` to `=ilike`. Ticket link: [odoo/task#3703069](https://www.odoo.com/web#model=project.task&id=3703069) opw-3703069 Forward-Port-Of: odoo/enterprise#57727
This change fixes a small styling issue on appointment validation pages by ensuring list elements use the expected layout rules. It helps appointment information display consistently and professionally for users.
Original PR description
Bootstrap's List Group component expects to have the class `list-group` to be properly styled, even when `list-group-flush` is used. This commit adds the missing class.
Custom financial reports now correctly pass warning information instead of ignoring it. This helps ensure report users receive the intended alerts or guidance when custom calculations need to flag issues.
Original PR description
For the custom engine report, _compute_formula_batch_with_engine_custom always uses None for the warnings in the function custom_engine_function, even if a good warnings arguments is sent. Now it correctly use the warnings instead of None
Appointment invitation emails now include the correct Google Meet link when a meeting is booked with Google Calendar synchronization. This helps attendees join meetings easily and ensures the required Google Calendar integration is installed automatically when needed.
Original PR description
Steps to reproduce ==================== 1. Install Appointment and the Gcal sync. 2. Sync your Google Calendar. 3. Create an appointment type and select Google Meet in the videoconference link. 4. Book an appointment. The meeting link is not propagated to invitation mail. After this PR ================== -The meeting link is propagated to mail. -The appointment_google_calendar module is automatically installed based on dependencies. Task-3614890
Some states (e.g. Rio Grande do Sul) require the name attribute to be set, others (e.g. Paraná) do not and will take the businessName. Before this, submitting an e-invoice for Rio Grando do Sul results in "Rejeicao: NF-e sem o nome do destinatario" (code: 724). After this, submitting the invoice succeeds. opw-3793773 Forward-Port-Of: odoo/enterprise#60887
Original PR description
Some states (e.g. Rio Grande do Sul) require the name attribute to be set, others (e.g. Paraná) do not and will take the businessName. Before this, submitting an e-invoice for Rio Grando do Sul results in "Rejeicao: NF-e sem o nome do destinatario" (code: 724). After this, submitting the invoice succeeds. opw-3793773 Forward-Port-Of: odoo/enterprise#60887
- Before: when you start the creation of a connector while going super fast (i.e. with a high DPI pointer device when you drank too much coffee or other energizing drink), you may end up with the connector arrow starting from any place.  - After: the arrow starts where you initially clicked, regardless of how fast you could move your pointer afterwards. , you may end up with the connector arrow starting from any place.  - After: the arrow starts where you initially clicked, regardless of how fast you could move your pointer afterwards.  Forward-Port-Of: odoo/enterprise#60874 Forward-Port-Of: odoo/enterprise#60629
Currently, iot module uses `get_resource_path` to check whether a Worldline libeasyctep.so library is present on the IoT Box. It is currently provoking a deprecation warning in logs: ``` 2024-04-16 09:34:02,574 2873 WARNING ? py.warnings: /home/pi/odoo/odoo/modules/module.py:167: DeprecationWarning: Since 17.0: use tools.misc.file_path instead of get_resource_path(hw_driver> File "/usr/lib/python3.11/threading.py", line 995, in _bootstrap self._bootstrap_inner() File "/usr/lib/
Original PR description
Currently, iot module uses `get_resource_path` to check whether a Worldline libeasyctep.so library is present on the IoT Box. It is currently provoking a deprecation warning in logs: ``` 2024-04-16…
Currently, iot module uses `get_resource_path` to check whether a Worldline libeasyctep.so library is present on the IoT Box.
It is currently provoking a deprecation warning in logs:
```
2024-04-16 09:34:02,574 2873 WARNING ? py.warnings: /home/pi/odoo/odoo/modules/module.py:167: DeprecationWarning: Since 17.0: use tools.misc.file_path instead of get_resource_path(hw_driver>
File "/usr/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/home/pi/odoo/addons/hw_drivers/main.py", line 106, in run
helpers.load_iot_handlers()
File "/home/pi/odoo/addons/hw_drivers/tools/helpers.py", line 400, in load_iot_handlers
spec.loader.exec_module(module)
File "/home/pi/odoo/addons/hw_drivers/iot_handlers/interfaces/CTEPInterface_L.py", line 15, in <module>
if not get_resource_path("hw_drivers", "iot_handlers", "lib", "ctep", "libeasyctep.so"):
File "/home/pi/odoo/odoo/modules/module.py", line 167, in get_resource_path
warnings.warn(
```
Since `get_resource_path` is deprecated as of v17.0, this PR replaces it by `file_path` to remain up to date.
Apart from replacing the deprecated `get_resource_path`, this PR also replaces `subprocess.check_call` by the `subprocess.run` in the corresponding code as suggested by subprocess documentation starting from Python v3.5
Finally, it prettifies the modified lines of code a little by changing a variable name and modifying the logger message in case of an error to make it more specific
task-3872853
Forward-Port-Of: odoo/enterprise#60859When importing a CFDI, we try to retrieve the partner (see `_retrieve_partner`). If more than one partner is retrieved, the partners are not returned. During the `_l10n_mx_edi_import_cfdi_fill_partner` test, there exists two partners with the same VAT (one has a company_id, the other doesn't). Hence, when importing the bill, the `_retrieve_partner` will find 2 and will not return anything, and we end up creating a new partner. To fix that, we remove the VAT of the partner from the demo com
Original PR description
When importing a CFDI, we try to retrieve the partner (see `_retrieve_partner`). If more than one partner is retrieved, the partners are not returned. During the `_l10n_mx_edi_import_cfdi_fill_partner` test, there exists two partners with the same VAT (one has a company_id, the other doesn't). Hence, when importing the bill, the `_retrieve_partner` will find 2 and will not return anything, and we end up creating a new partner. To fix that, we remove the VAT of the partner from the demo company. Thus, only one partner will be retrieved. opw-3829223 Forward-Port-Of: odoo/enterprise#60886 Forward-Port-Of: odoo/enterprise#60506
When users try to import a file into the ``FEC import`` and the file doesn't have the value of ``key``, an error occurs. This happens because the system requires the value of ``JournalCode`` to be present in the imported file for successful processing. Steps to reproduce: - Install ``l10n_fr_fec_import`` module - Change company from YourCompany to FR Company - Now Accounting -> Configuration -> Accounting -> Journals - Select all journals -> export all journals -> download file in CSV for
Original PR description
When users try to import a file into the ``FEC import`` and the file doesn't have the value of ``key``, an error occurs. This happens because the system requires the value of ``JournalCode`` to be…
When users try to import a file into the ``FEC import`` and the file doesn't have the value of ``key``, an error occurs. This happens because the system requires the value of ``JournalCode`` to be present in the imported file for successful processing.
Steps to reproduce:
- Install ``l10n_fr_fec_import`` module
- Change company from YourCompany to FR Company
- Now Accounting -> Configuration -> Accounting -> Journals
- Select all journals -> export all journals -> download file in CSV format.
- Configuration -> Settings -> Accounting Import -> import -> Click on the ``Import FEC button``
- Upload a file that you have downloaded and Import
Traceback:
``` AttributeError: 'NoneType' object has no attribute 'replace'
File "odoo/http.py", line 2252, in __call__
response = request._serve_db()
File "odoo/http.py", line 1828, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1848, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1826, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1833, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2058, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 42, in call_button
action = self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "home/odoo/src/enterprise/saas-17.1/l10n_fr_fec_import/wizard/import_wizard.py", line 683, in action_import
return self._import_files()
File "home/odoo/src/enterprise/saas-17.1/l10n_fr_fec_import/wizard/import_wizard.py", line 729, in _import_files
for xml_id, record in generator(rows, cache):
File "home/odoo/src/enterprise/saas-17.1/l10n_fr_fec_import/wizard/import_wizard.py", line 193, in _generator_fec_account_journal
journal_xml_id = self._make_xml_id('journal', journal_code)
File "home/odoo/src/enterprise/saas-17.1/l10n_fr_fec_import/wizard/import_wizard.py", line 110, in _make_xml_id
key = key.replace(' ', '_')
```
This commit resolves the mentioned issue by verifying if the key is present; otherwise, it will raise a UserError.
sentry - 4929578488
Forward-Port-Of: odoo/enterprise#59997### Steps to reproduce issue: 1. Have Sales installed 2. Enable Analytic Accounting and create two Projects 3. Go into both Project Settings and add distinct Analytic Accounts 4. Create a Vendor Bill 5. Add a Product Line and put both accounts in the Analytic Distribution 6. Add an account in another column to one of the existing Analytic Distribution Lines 7. Go to Projects and open the Project Updates of the Project whose account was alone in the Analytic Distribution Line 8. You get
Original PR description
### Steps to reproduce issue: 1. Have Sales installed 2. Enable Analytic Accounting and create two Projects 3. Go into both Project Settings and add distinct Analytic Accounts 4. Create a Vendor Bill…
### Steps to reproduce issue: 1. Have Sales installed 2. Enable Analytic Accounting and create two Projects 3. Go into both Project Settings and add distinct Analytic Accounts 4. Create a Vendor Bill 5. Add a Product Line and put both accounts in the Analytic Distribution 6. Add an account in another column to one of the existing Analytic Distribution Lines 7. Go to Projects and open the Project Updates of the Project whose account was alone in the Analytic Distribution Line 8. You get the error: > invalid literal for int() with base 10: '[int],[int]' ### Explanation: With commit odoo@dc696c8ed4850a83b6af721002a90f2944891923, the way IDs are stored changed. They are now computed in a csv string. A part of the Analytic Accounting pipeline didn't get updated after that change, making a lot of the features not working properly. ### Suggested fix: - We must take into account the multiple analytic plans in any order possible in the ID search. - Because the amount of `account.move.line` can increase rapidly, the new ID search must be indexable. - We reworked the counting query to avoid `account.move` being counted multiple times. opw-3626619 Forward-Port-Of: odoo/enterprise#60627 Forward-Port-Of: odoo/enterprise#54311
The "radio selection with filter" widget allows to show/hide some selection values given a list of allowed selection values. The feature is similar to the "filterable selection" widget but for radio buttons. The allowed selection context now takes a list of technical strings instead of a list of (technical string, human string) pairs. This allows to keep the (possibly translated) original values along with the original selection order. task-3829801 Forward-Port-Of: odoo/enterprise#59
Original PR description
The "radio selection with filter" widget allows to show/hide some selection values given a list of allowed selection values. The feature is similar to the "filterable selection" widget but for radio buttons. The allowed selection context now takes a list of technical strings instead of a list of (technical string, human string) pairs. This allows to keep the (possibly translated) original values along with the original selection order. task-3829801 Forward-Port-Of: odoo/enterprise#59405
Ease the audit of a General Ledger, especially the tax lines by having the bank transaction description/payment reference displayed next to the tax applied to it. task id: 3861381 Forward-Port-Of: odoo/enterprise#60472
Original PR description
Ease the audit of a General Ledger, especially the tax lines by having the bank transaction description/payment reference displayed next to the tax applied to it. task id: 3861381 Forward-Port-Of: odoo/enterprise#60472
…ressbar Have a kanban view that: - is grouped by a granular date field "date:month" - has a progressbar - won't display any records (the domain yields no record) Before this commit, there was a crash, because the field name was wrongly parsed. After this commit, there is no crash when we open that kanban view, even in the ml editor opw-3853604 Forward-Port-Of: odoo/enterprise#60428
Original PR description
…ressbar Have a kanban view that: - is grouped by a granular date field "date:month" - has a progressbar - won't display any records (the domain yields no record) Before this commit, there was a crash, because the field name was wrongly parsed. After this commit, there is no crash when we open that kanban view, even in the ml editor opw-3853604 Forward-Port-Of: odoo/enterprise#60428
Before this commit, the footer buttons in the Barcode app are too small. This commit undoes that, making the buttons' size more or less the same whatever the device's size or orientation. That said, their height are still smaller in case the device height is smaller than 800 px. Community PR: odoo/odoo#161647 Forward-Port-Of: odoo/enterprise#60611
Original PR description
Before this commit, the footer buttons in the Barcode app are too small. This commit undoes that, making the buttons' size more or less the same whatever the device's size or orientation. That said, their height are still smaller in case the device height is smaller than 800 px. Community PR: odoo/odoo#161647 Forward-Port-Of: odoo/enterprise#60611
Steps to reproduce =================== - Open Gantt view of any appointment. - Click on "New' to create a new booking. - The default start is set to today's midnight which is not relevant. After this PR ================== The current Time with rounded in half-hour format will be set as a default start while creating a new booking through the Gantt view. eg 10:10 => rounded to 10:30, 10:40 => rounded to 11. Task-3820387 Forward-Port-Of: odoo/enterprise#59992
Original PR description
Steps to reproduce =================== - Open Gantt view of any appointment. - Click on "New' to create a new booking. - The default start is set to today's midnight which is not relevant. After this PR ================== The current Time with rounded in half-hour format will be set as a default start while creating a new booking through the Gantt view. eg 10:10 => rounded to 10:30, 10:40 => rounded to 11. Task-3820387 Forward-Port-Of: odoo/enterprise#59992
Have some rules: 1. with domain, exclusive, order: 1 2. no domain, exclusive, order: 1 3: no domain, exclusive, order: 2 Have a record that doesn't satisfy rule#1's domain. Before this commit, no notification is sent when validating rules, but it should send one for rule#3 After this commit, a notification is sent for rule#3 opw-3815732 Forward-Port-Of: odoo/enterprise#60257
Original PR description
Have some rules: 1. with domain, exclusive, order: 1 2. no domain, exclusive, order: 1 3: no domain, exclusive, order: 2 Have a record that doesn't satisfy rule#1's domain. Before this commit, no notification is sent when validating rules, but it should send one for rule#3 After this commit, a notification is sent for rule#3 opw-3815732 Forward-Port-Of: odoo/enterprise#60257
…or res.users Open the base action for res.users (Settings => Users) Unfold the Existing fields list, and search for a field reprensenting an access rights category. Before this commit, adding such field crashed because some meta data were missing in the fields_get. Since those fields are dynamic and may change with any changes in groups' hierarchy, it doesn't really make sense to make them available to add on a view. Before this commit, those fields are not proposed any more. opw
Original PR description
…or res.users Open the base action for res.users (Settings => Users) Unfold the Existing fields list, and search for a field reprensenting an access rights category. Before this commit, adding such field crashed because some meta data were missing in the fields_get. Since those fields are dynamic and may change with any changes in groups' hierarchy, it doesn't really make sense to make them available to add on a view. Before this commit, those fields are not proposed any more. opw-3842879 Forward-Port-Of: odoo/enterprise#60719 Forward-Port-Of: odoo/enterprise#60321
Following #38133, we were no longer waiting for the datasources to be properly loaded before calling `model.exportXLSX` which means that only the asynchronous data already loaded were properly loaded as we lazy load them. Task: 3839559 Forward-Port-Of: odoo/enterprise#60862 Forward-Port-Of: odoo/enterprise#59772
Original PR description
Following #38133, we were no longer waiting for the datasources to be properly loaded before calling `model.exportXLSX` which means that only the asynchronous data already loaded were properly loaded as we lazy load them. Task: 3839559 Forward-Port-Of: odoo/enterprise#60862 Forward-Port-Of: odoo/enterprise#59772