Thursday, February 15, 2024
7 changes · saas-17.1
Resolved issues and error corrections
This fixes an issue where group conversations created or updated through invitations could show an incorrect name because not all member details were loaded. The system now retrieves complete channel information when needed, helping users see accurate conversation names after inviting others.
Original PR description
Before this commit, all members are not received through invitation notification, leading to badly named channel when its name depends on members. This commits fixes the issue by fetching full channel info whenever necessary.
This fix ensures localization-specific fields are available immediately when users create new records for companies in affected countries. It prevents missing country-dependent information during setup, reducing confusion and avoiding incomplete data entry.
Original PR description
Install `l10n_ar` Switch to an AR company Create a new currency => the field `l10n_ar_afip_code` is not visible Go on an existing one => it is visible The compute is not triggered before the save. We should add a default to have the fiscal_code. We can even remove the compute (and keep the store=False), to avoid duplicating the code. Linked to runbot error 45392, 45417 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Posting journal entries for approved expense reports could fail when the employee did not have a work email configured. The fix restores the expected flow by pointing the employee-related action to an available view, preventing the error and allowing accounting teams to continue processing expenses.
Original PR description
Currently an error occurs when the user is generating Post Journal Entries of an employee whose work email is not specified. Steps to Reproduce: - Install `hr_expense` module. - Open Expenses >…
Currently an error occurs when the user is generating Post Journal Entries of an employee whose work email is not specified.
Steps to Reproduce:
- Install `hr_expense` module.
- Open Expenses > Expense Reports.
- Open a report of employee whose work email is not specified.
- Make sure the status of the selected recordset is `Approved`
- Now click on the `Post Journal Entries` button.
- The error is generated.
Traceback on sentry:
```
KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x7f2a26dd7010>, 'hr.open_view_employee_tree')
File "odoo/tools/cache.py", line 99, in lookup
r = d[key]
File "<decorator-gen-8>", line 2, in __getitem__
File "odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
ValueError: External ID not found in the system: hr.open_view_employee_tree
File "odoo/http.py", line 2251, in __call__
response = request._serve_db()
File "odoo/http.py", line 1826, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1847, 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 1824, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1832, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2057, 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 38, in call_button
action = self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 30, 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/hr_expense_extract/models/hr_expense.py", line 194, in action_sheet_move_create
return super().action_sheet_move_create()
File "addons/hr_expense/models/hr_expense_sheet.py", line 542, in action_sheet_move_create
self._check_can_create_move()
File "addons/hr_expense/models/hr_expense_sheet.py", line 638, in _check_can_create_move
action = self.env['ir.actions.actions']._for_xml_id('hr.open_view_employee_tree')
File "odoo/addons/base/models/ir_actions.py", line 191, in _for_xml_id
record = self.env.ref(full_xml_id)
File "odoo/api.py", line 580, in ref
res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
File "odoo/addons/base/models/ir_model.py", line 2188, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)
File "<decorator-gen-43>", line 2, in _xmlid_lookup
File "odoo/tools/cache.py", line 104, in lookup
value = d[key] = self.method(*args, **kwargs)
File "odoo/addons/base/models/ir_model.py", line 2181, in _xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
```
This error arises at [1] when it attempts to access the xml id with the view`hr.open_view_employee_tree`but due to recent changes in forward port of master this view has been removed [2] as it wasn't used anywhere; but in [3] `hr.open_view_employee_tree` was used and due to this now the error is generated.
This commit fixes the above issue by using view `hr.open_view_employee_list_my`
instead of the removed view `hr.open_view_employee_tree`.
Link: [1]-https://github.com/odoo/odoo/blob/4126dcc08ef22f2b644559ba24bd4ce093684f1c/addons/hr_expense/models/hr_expense_sheet.py#L638
[2]-https://github.com/odoo/odoo/commit/abd909498e4fd519ff8431ea9d7d09da4fc7c59a
[3]-https://github.com/odoo/odoo/commit/2c0b01e79e81e6a28ca5f610ad14d4cb8fd5d756
sentry-4968357276
opw-3724071
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prContacts linked to employees across multiple companies now show the employee count that matches the companies currently selected by the user. When multiple related employees exist, the contact opens a list-style employee view instead of incorrectly trying to create or open a single employee record.
Original PR description
[FIX] hr: give the correct number of employees on the smart button of a contact's form in a multi-company environment and redirect to kanban view A contact can be linked to many employees (even if it's something that would make no sense), an employee have 1 contact (work_partner_id). If the employees linked to the contact are from different company, the number of employees on the smart button of the contact form should reflect the number of employees for the companies selected in the environment. Also, when they are multiple employees, we should not open a form view (which tries to create a new employee) but a kanban view with all the employees related to the contact. This will also add a test with 2 employees in 2 different companies and testing if the employee count is correctly computed based on the environment selected companies.
This update corrects a previous Point of Sale change that caused customer details not to refresh properly after selecting a customer. It keeps the more appropriate fix in place so cashiers see accurate customer information during checkout.
Original PR description
Reverting this commit https://github.com/odoo/odoo/commit/1ea3719ec0ce77c8d24c69179be0accd5655f545 because it's not the right fix.
Creating a new landed cost now correctly applies the company’s fiscal country by default. This ensures the Mexican customs number field is shown when needed, helping users enter required customs information without extra workarounds.
Original PR description
To reproduce: Having installed `l10n_mx_edi_landing`, go to landed costs. Create a new one => `l10n_mx_edi_customs_number` is not visible The reason being that the `fiscal_country_code` is not computed at creation. We should add a default.
The point of sale action for settling due accounts no longer crashes when selected. This restores expected payment follow-up behavior for users affected by a recent change.
Original PR description
Before this commit, clicking on the 'Settle due accounts' button would result in an error. This issue was introduced during a recent refactor. This commit fixes the error, allowing the 'Settle due accounts' functionality to work as expected. opw-3744969