Wednesday, June 12, 2024
27 changes · saas-17.2
Miscellaneous changes
With the introduction of alias domains in 17.0 an issue was uncovered in the helpdesk module where any additional alias names with different domains would be added as followers. This stemmed from an issue in _ticket_email_split which was not properly filtering emails out that matched the alias name because self was not yet defined when the method was called. This was not a problem before because this was immediately fed into _mail_find_partner_from_emails that would also filter out by alias_name
Original PR description
With the introduction of alias domains in 17.0 an issue was uncovered in the helpdesk module where any additional alias names with different domains would be added as followers. This stemmed from an issue in _ticket_email_split which was not properly filtering emails out that matched the alias name because self was not yet defined when the method was called. This was not a problem before because this was immediately fed into _mail_find_partner_from_emails that would also filter out by alias_name. This is no longer the case because the domain has to also match. Passing in the newly created ticket and using this to map to team_id.alias_name fixes this issue by properly filtering out alias emails even with different domains. opw-3920634 Forward-Port-Of: odoo/enterprise#63477
Problem: When the user creates a new quotation from a CRM opportunity, the quotation does not compute to the partner's usage value and always default to "General Usage". The default prevents the compute from getting called. Purpose: The compute method "_compute_l10n_mx_edi_usage" should be called when a new quotation is created from the crm opportunity. Steps to Reproduce on Runbot17: 1. Install Sales, l10n_mx, l10n_mx_edi, CRM, Contacts 2. Set a value for field "Usage" (l10n_mx_edi_usag
Original PR description
Problem: When the user creates a new quotation from a CRM opportunity, the quotation does not compute to the partner's usage value and always default to "General Usage". The default prevents the compute from getting called. Purpose: The compute method "_compute_l10n_mx_edi_usage" should be called when a new quotation is created from the crm opportunity. Steps to Reproduce on Runbot17: 1. Install Sales, l10n_mx, l10n_mx_edi, CRM, Contacts 2. Set a value for field "Usage" (l10n_mx_edi_usage) on a partner whose country is Mexico in Contacts 3. Create a CRM opportunity with the partner above 4. Create a new quotation from the opportunity and observe that the "Usage" value is not the same as defined on the partner opw-3934009 Forward-Port-Of: odoo/enterprise#63766
In `pos_restaurant`, the user will see the upcoming appointment for each table underneath it. The text should be styled differently based on the situation. Late arrivals should be shown in red; future appointments should be shown with decreased opacity. During the refactoring in bb06fde, a bug was introduced that made the time computation invalid. This commit addresses the issue. Task: 3978801 Forward-Port-Of: odoo/enterprise#64218
Original PR description
In `pos_restaurant`, the user will see the upcoming appointment for each table underneath it. The text should be styled differently based on the situation. Late arrivals should be shown in red; future appointments should be shown with decreased opacity. During the refactoring in bb06fde, a bug was introduced that made the time computation invalid. This commit addresses the issue. Task: 3978801 Forward-Port-Of: odoo/enterprise#64218
With an MX company setup Create a product with: - UNSPSC Category: 12352106 Ácidos orgánicos o sus sustitutos - Hazardous Material Designation Code (MX): - Hazardous Packaging (MX): - Tariff Fraction: 2917190800 Ácido fumárico. - UMT Aduana: kg - Weight: 1.00 Create a Sale Order with the product Confirm Go to Delivery Set: - Tansport Type: Federal Highways - In MX Tab add 'Vehicle Setup' and 'Gross Vehicle Weight' Validate and Generate Delivery Guide Error: Code : CP155 Mes
Original PR description
With an MX company setup Create a product with: - UNSPSC Category: 12352106 Ácidos orgánicos o sus sustitutos - Hazardous Material Designation Code (MX): - Hazardous Packaging (MX): - Tariff…
With an MX company setup Create a product with: - UNSPSC Category: 12352106 Ácidos orgánicos o sus sustitutos - Hazardous Material Designation Code (MX): - Hazardous Packaging (MX): - Tariff Fraction: 2917190800 Ácido fumárico. - UMT Aduana: kg - Weight: 1.00 Create a Sale Order with the product Confirm Go to Delivery Set: - Tansport Type: Federal Highways - In MX Tab add 'Vehicle Setup' and 'Gross Vehicle Weight' Validate and Generate Delivery Guide Error: Code : CP155 Message : El valor registrado en el atributo "Mercancia:MaterialPeligroso" no es válido o el valor registrado en el atributo “Mercancias:Mercancia:BienesTransp” contiene el valor "0" (cero) en la columna "Material peligroso" del catálogo catCartaPorte:c_ClaveProdServCP. This occurs because the MarierialPeligroso element is not filled In the ClaveProdServ tab of the CatalogoCartaPorte30 it is specified if a product or service is (1), not is (0) or may be (0,1) considered hazardous When having to deal with "may be" hazardous products it is required to set the 'MaterialPeligroso' element. Currently, the system does not allow to specify if the "may be" product is actually hazardous, but if the 'Hazardous Material Designation Code (MX)' field is not set the MaterialPeligroso element will not be filled, failing the validation The proposed workaround is to use the value '0' as flag to indicate that the maybe hazardous product should not be considered hazardous and 'MaterialPeligroso' will be set to 'No' opw-3955361 task-3668225 Forward-Port-Of: odoo/enterprise#64153 Forward-Port-Of: odoo/enterprise#63832
When trying to reconcile to debit or credit lines with different currencies, we get a singleton error on `wizard.reco_currency_id` in `_compute_is_write_off_required` opw-3833477 Forward-Port-Of: odoo/enterprise#64011
Original PR description
When trying to reconcile to debit or credit lines with different currencies, we get a singleton error on `wizard.reco_currency_id` in `_compute_is_write_off_required` opw-3833477 Forward-Port-Of: odoo/enterprise#64011
The 'Totales' section is computed by aggregating amounts then rounding. The 'ImpuestosP' section is computed by making the sum of rounded values. So when the payment is expressed in MXN but not the invoices, we could have a rounding issue here. Forward-Port-Of: odoo/enterprise#64013
Original PR description
The 'Totales' section is computed by aggregating amounts then rounding. The 'ImpuestosP' section is computed by making the sum of rounded values. So when the payment is expressed in MXN but not the invoices, we could have a rounding issue here. Forward-Port-Of: odoo/enterprise#64013
Current behavior: When you add a product with an internal note to an order the preparation display is not updated correctly. Steps to reproduce: - Open PoS restaurant session - Add product A, and press Order button - Add product A, add an internal note, and press Order button - Go on the preparation display, there is only one product A opw-3902869 Forward-Port-Of: odoo/enterprise#64023 Forward-Port-Of: odoo/enterprise#63879
Original PR description
Current behavior: When you add a product with an internal note to an order the preparation display is not updated correctly. Steps to reproduce: - Open PoS restaurant session - Add product A, and press Order button - Add product A, add an internal note, and press Order button - Go on the preparation display, there is only one product A opw-3902869 Forward-Port-Of: odoo/enterprise#64023 Forward-Port-Of: odoo/enterprise#63879
By default, tables automatically adjust their width to accommodate the content of their cells, That causes table row to grow in size and make "X" button invisible. Here I'm constraining table layout so it doesn't matter how long the content of columns is [Reproduce] - Install documents - Add tag with a very long name - Go to all Documents, Select a document, Add the tag on a doc - BUG: "X" button is not visible* opw-3937326 BEFORE / AFTER https://github.com/odoo/enterprise/assets
Original PR description
By default, tables automatically adjust their width to accommodate the content of their cells, That causes table row to grow in size and make "X" button invisible. Here I'm constraining table layout so it doesn't matter how long the content of columns is [Reproduce] - Install documents - Add tag with a very long name - Go to all Documents, Select a document, Add the tag on a doc - BUG: "X" button is not visible* opw-3937326 BEFORE / AFTER https://github.com/odoo/enterprise/assets/33809926/5f2fc861-cd68-4478-8b8b-b8843b7d4944 Forward-Port-Of: odoo/enterprise#63279
Steps to reproduce: - Install Planning - Click on Schedule -> By Resource - Select multiple slots without a resource - Select a resource to add Issues: A traceback is shown because this line in the write function wasn't coded to work with recordset. https://github.com/odoo/enterprise/blob/70f0ce78ac5f976f93abd0b9ee239a998d6d7445/planning/models/planning.py#L803-L806 opw-3948517 Forward-Port-Of: odoo/enterprise#64217 Forward-Port-Of: odoo/enterprise#63450
Original PR description
Steps to reproduce: - Install Planning - Click on Schedule -> By Resource - Select multiple slots without a resource - Select a resource to add Issues: A traceback is shown because this line in the write function wasn't coded to work with recordset. https://github.com/odoo/enterprise/blob/70f0ce78ac5f976f93abd0b9ee239a998d6d7445/planning/models/planning.py#L803-L806 opw-3948517 Forward-Port-Of: odoo/enterprise#64217 Forward-Port-Of: odoo/enterprise#63450
The chilean law requires the date to be on top of the receipt. This is now the case. Community PR: odoo/odoo#168270 Forward-Port-Of: odoo/enterprise#63966
Original PR description
The chilean law requires the date to be on top of the receipt. This is now the case. Community PR: odoo/odoo#168270 Forward-Port-Of: odoo/enterprise#63966
Steps to reproduce ================== - Enable debug mode - Go to accounting app - reporting - balance sheet - three wheels on top right - click on the icon to show new columns -> Invalid portal target Cause of the issue ================== The uniqueRendererClass is used to target a portal for the dropdown, but that class isn't applied in the AccountReportListRenderer. https://github.com/odoo/odoo/pull/160566 opw-3974195 Forward-Port-Of: odoo/enterprise#64316
Original PR description
Steps to reproduce ================== - Enable debug mode - Go to accounting app - reporting - balance sheet - three wheels on top right - click on the icon to show new columns -> Invalid portal target Cause of the issue ================== The uniqueRendererClass is used to target a portal for the dropdown, but that class isn't applied in the AccountReportListRenderer. https://github.com/odoo/odoo/pull/160566 opw-3974195 Forward-Port-Of: odoo/enterprise#64316
Modules related to multiple countries are historically named without `l10n_` prefix. Also, it is not always linked to the country but just used for the `auto_install` feature like in `account_reports_cash_basis` for instance, where we don't want to make it sound like a localization feature. Forward-Port-Of: odoo/odoo#163730
Original PR description
Modules related to multiple countries are historically named without `l10n_` prefix. Also, it is not always linked to the country but just used for the `auto_install` feature like in `account_reports_cash_basis` for instance, where we don't want to make it sound like a localization feature. Forward-Port-Of: odoo/odoo#163730
This traceback arises when the user tries to remove the Batch Limit value and test the imported file. To reproduce this issue: 1) Import a file with large data in any module 2) You see the Batch limit at the left side pannel 3) Remove the default "Batch Limit" value 4) Test the file 5) A traceback will encountered Error:- ``` TypeError: '<' not supported between instances of 'int' and 'str' ``` when the user removes the default batch limit its value will be an empty string.
Original PR description
This traceback arises when the user tries to remove the Batch Limit value and test the imported file. To reproduce this issue: 1) Import a file with large data in any module 2) You see the Batch…
This traceback arises when the user tries to remove the Batch Limit value and test the imported file.
To reproduce this issue:
1) Import a file with large data in any module
2) You see the Batch limit at the left side pannel
3) Remove the default "Batch Limit" value
4) Test the file
5) A traceback will encountered
Error:-
```
TypeError: '<' not supported between instances of 'int' and 'str'
```
when the user removes the default batch limit its value will be an empty string.
You can see in [1] that parseFloat('') is "NaN" so it directly assigns the limit as the value which is an empty string.
[1]
https://github.com/odoo/odoo/blob/2c40a55232fb501dd70b64f7ddbdc4244f365139/addons/base_import/static/src/import_data_sidepanel/import_data_sidepanel.js#L34-L36
which leads to a traceback when a comparison is done between int and str.
https://github.com/odoo/odoo/blob/106c343027e3bab1c94c414f30e914cf673cceec/odoo/models.py#L1318-L1319
After applying this commit will resolve the issue of getting an int value instead of a str.
sentry-5298904064
Forward-Port-Of: odoo/odoo#167323This only adds an id to the div containing the date in the order receipt so that it can be xpath easily in the enterprise PR. Enterprise PR: odoo/enterprise#63966 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168270
Original PR description
This only adds an id to the div containing the date in the order receipt so that it can be xpath easily in the enterprise PR. Enterprise PR: odoo/enterprise#63966 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168270
This commit implements two changes to prevent search engines from crawling and indexing content on websites marked as neutralized: - Robots.txt update: The robots.txt field in the website database is updated with a rule disallowing all crawling (User-agent: * \n Disallow: /). - Robots meta tag injection: An XPath expression is used to inject a robots meta tag with content="noindex, nofollow" within the web.neutralize_banner view's <head> section. These combined changes ensure a strong sig
Original PR description
This commit implements two changes to prevent search engines from crawling and indexing content on websites marked as neutralized: - Robots.txt update: The robots.txt field in the website database is updated with a rule disallowing all crawling (User-agent: * \n Disallow: /). - Robots meta tag injection: An XPath expression is used to inject a robots meta tag with content="noindex, nofollow" within the web.neutralize_banner view's <head> section. These combined changes ensure a strong signal to search engines to not index neutralized databases. task-3895772 Forward-Port-Of: odoo/odoo#167963
Before, we could not send any simplified invoice for Bizkaia, because it would give error B4_2000026: "Las Claves indicadas no son compatibles". En las validaciones dice que "Las claves 51 y 52 sólo son compatibles entre sí" But normally we send 01 and 52 in case of a simplified invoice. By removing the 52 however, we see that we can send the simplified invoice. Also, elsewhere in the XML, it is already clearly indicated that the invoice is simplified anyways. So, the simple fix for n
Original PR description
Before, we could not send any simplified invoice for Bizkaia, because it would give error B4_2000026: "Las Claves indicadas no son compatibles". En las validaciones dice que "Las claves 51 y 52 sólo son compatibles entre sí" But normally we send 01 and 52 in case of a simplified invoice. By removing the 52 however, we see that we can send the simplified invoice. Also, elsewhere in the XML, it is already clearly indicated that the invoice is simplified anyways. So, the simple fix for now is to remove the 52 key if the agency is Bizkaia opw-3938800 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 Forward-Port-Of: odoo/odoo#167566
Steps to reproduce ================== - Install mrp - Enable debug mode - Go to products - Open the "Acoustics Bloc Screens" form - Click on the "Forecasted" smart button - Click on the debug icon > "View access rights" A traceback occurs when evaluating the domain Cause of the issue ================== ir.actions.client is supposed to be a string but is an id in this case. `ir.model.search([["model", "=", action.res_model]])` returns nothing. [0] --- [0]: https://gith
Original PR description
Steps to reproduce ================== - Install mrp - Enable debug mode - Go to products - Open the "Acoustics Bloc Screens" form - Click on the "Forecasted" smart button - Click on the debug icon > "View access rights" A traceback occurs when evaluating the domain Cause of the issue ================== ir.actions.client is supposed to be a string but is an id in this case. `ir.model.search([["model", "=", action.res_model]])` returns nothing. [0] --- [0]: https://github.com/odoo/odoo/blob/c07181b20bf4f06b783136ffdb3b7a304be6b136/addons/web/static/src/webclient/actions/debug_items.js#L147 opw-3955762 Forward-Port-Of: odoo/odoo#168498
Since early June 2024, on new individual accounts, Stripe validates Indian mandate parameters even if they are irrelevant (e.g. mandates are not needed and won't be created). This prevents payments not compatible with Indian mandates from being made, like those made with MXN currency. With this fix, mandate parameters will be sent only if the payment's currency is supported by Indian mandates. Note: Accounts created before June 2024 or accounts linked to a platform created before June 2024
Original PR description
Since early June 2024, on new individual accounts, Stripe validates Indian mandate parameters even if they are irrelevant (e.g. mandates are not needed and won't be created). This prevents payments not compatible with Indian mandates from being made, like those made with MXN currency. With this fix, mandate parameters will be sent only if the payment's currency is supported by Indian mandates. Note: Accounts created before June 2024 or accounts linked to a platform created before June 2024 that have already used mandates are not affected by this bug. opw-3946505 Forward-Port-Of: odoo/odoo#168760 Forward-Port-Of: odoo/odoo#168465
Due to Stripe sending multiple confirmations regarding authorized payment, multiple mails were send to customer that their payment was succesful, now only transactions that were not processed yet result in mail sending. opw-3967807 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 Forward-Port-Of: odoo/odoo#168298
Original PR description
Due to Stripe sending multiple confirmations regarding authorized payment, multiple mails were send to customer that their payment was succesful, now only transactions that were not processed yet result in mail sending. opw-3967807 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 Forward-Port-Of: odoo/odoo#168298
This commit just add a new tour method used in another commit opw-3902869 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168335 Forward-Port-Of: odoo/odoo#168150
Original PR description
This commit just add a new tour method used in another commit opw-3902869 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168335 Forward-Port-Of: odoo/odoo#168150
Steps to reproduce: - Install "Time Off" and `l10n_be` - "Time Off" -> "Reporting" -> "by Type" - Unselect the company with the time off Issues: All the time off will be shown, company selection will not be taken into account. This is due to a missing security rules. opw-3954393 Forward-Port-Of: odoo/odoo#168516
Original PR description
Steps to reproduce: - Install "Time Off" and `l10n_be` - "Time Off" -> "Reporting" -> "by Type" - Unselect the company with the time off Issues: All the time off will be shown, company selection will not be taken into account. This is due to a missing security rules. opw-3954393 Forward-Port-Of: odoo/odoo#168516
opw-3863382 Forward-Port-Of: odoo/odoo#168755
Original PR description
opw-3863382 Forward-Port-Of: odoo/odoo#168755
KBC has been added to Mollie. Cards support refund. Refund is now checked based on payment method refund support, not brand. "Cleared" mapping has been added to done state in PayPal in order to properly support echeck. opw-3880431 Forward-Port-Of: odoo/odoo#162837
Original PR description
KBC has been added to Mollie. Cards support refund. Refund is now checked based on payment method refund support, not brand. "Cleared" mapping has been added to done state in PayPal in order to properly support echeck. opw-3880431 Forward-Port-Of: odoo/odoo#162837
With an IT Company setup but without the withholding module: - Set fiscal position to split payment - Set tax on product to SP type tax - Click send and print to generate XML Error: XML generation is blocked with message "Invoices must have exactly one VAT tax set per line" This occurs because the system find 2 VAT taxes, but only the positive one should count for the validation Ticket [link](https://www.odoo.com/web#model=project.task&id=3945046) opw-3945046 Forward-Port-Of: odoo
Original PR description
With an IT Company setup but without the withholding module: - Set fiscal position to split payment - Set tax on product to SP type tax - Click send and print to generate XML Error: XML generation is blocked with message "Invoices must have exactly one VAT tax set per line" This occurs because the system find 2 VAT taxes, but only the positive one should count for the validation Ticket [link](https://www.odoo.com/web#model=project.task&id=3945046) opw-3945046 Forward-Port-Of: odoo/odoo#166893
The project sharing search view is inheriting the wrong base search view (instead of inheriting `view_task_search_form_project_base`, it should be inheriting `view_task_search_form_base`), which causes some fields and filters to be visible in project sharing when they shouldn't. This commit makes those fields and filters invisible for portal users. Task-3978479 Forward-Port-Of: odoo/odoo#168761 Forward-Port-Of: odoo/odoo#168523
Original PR description
The project sharing search view is inheriting the wrong base search view (instead of inheriting `view_task_search_form_project_base`, it should be inheriting `view_task_search_form_base`), which causes some fields and filters to be visible in project sharing when they shouldn't. This commit makes those fields and filters invisible for portal users. Task-3978479 Forward-Port-Of: odoo/odoo#168761 Forward-Port-Of: odoo/odoo#168523
Since Commit 4c58d82c7e582c11eb967b6ed7c918a6da3ebd23 refactored `test_delivery_ui`, the check for the `payment_custom` module was moved to individual tests, however, the new `setUpClass` function now uses code that requires `payment_custom` and fails when the server tries to run tests. Solution: Move the initialization of `transfer_provider` to the individual tests instead of within the setup function. opw-3957075 Forward-Port-Of: odoo/odoo#168792
Original PR description
Since Commit 4c58d82c7e582c11eb967b6ed7c918a6da3ebd23 refactored `test_delivery_ui`, the check for the `payment_custom` module was moved to individual tests, however, the new `setUpClass` function now uses code that requires `payment_custom` and fails when the server tries to run tests. Solution: Move the initialization of `transfer_provider` to the individual tests instead of within the setup function. opw-3957075 Forward-Port-Of: odoo/odoo#168792
This traceback arises when the user tries to create a new journal from the payment. To reproduce this issue: 1) Install `accounting` 2) Create a new payment from `Accounting/vendors/payments` 3) save the record and now remove the `journal` or make the `journal` field empty 5) A traceback arises. Error:- ``` KeyError: ('res.company', <function Company.__accessible_branches at 0x7fabdfc69c60>, (1,), False, 2) File "odoo/tools/cache.py", line 99, in lookup r = d[key] File
Original PR description
This traceback arises when the user tries to create a new journal from the payment. To reproduce this issue: 1) Install `accounting` 2) Create a new payment from `Accounting/vendors/payments` 3) save…
This traceback arises when the user tries to create a new journal from the payment.
To reproduce this issue:
1) Install `accounting`
2) Create a new payment from `Accounting/vendors/payments`
3) save the record and now remove the `journal` or make the `journal` field empty
5) A traceback arises.
Error:-
```
KeyError: ('res.company', <function Company.__accessible_branches at 0x7fabdfc69c60>, (1,), False, 2)
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: not enough values to unpack (expected 1, got 0)
File "odoo/models.py", line 5941, in ensure_one
_id, = self._ids
ValueError: Expected singleton: res.company()
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 34, in call_kw
return 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 "addons/web/models/models.py", line 1074, in onchange
todo = [
File "addons/web/models/models.py", line 1077, in <listcomp>
if field_name not in done and snapshot0.has_changed(field_name)
File "addons/web/models/models.py", line 1190, in has_changed
return self[field_name] != self.record[field_name]
File "odoo/models.py", line 6664, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "odoo/fields.py", line 1138, in __get__
self.recompute(record)
File "odoo/fields.py", line 1353, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1326, in apply_except_missing
func(records)
File "odoo/fields.py", line 1375, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 416, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4982, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 102, in determine
return needle(*args)
File "addons/account/models/account_payment.py", line 369, in _compute_reconciliation_status
liquidity_lines, counterpart_lines, writeoff_lines = pay._seek_for_lines()
File "addons/account/models/account_payment.py", line 192, in _seek_for_lines
if line.account_id in self._get_valid_liquidity_accounts():
File "addons/account/models/account_payment.py", line 211, in _get_valid_liquidity_accounts
accessible_branches = journal_comp.with_company(journal_comp)._accessible_branches()
File "odoo/addons/base/models/res_company.py", line 420, in _accessible_branches
return self.browse(self.__accessible_branches())
File "<decorator-gen-107>", line 2, in __accessible_branches
File "odoo/tools/cache.py", line 104, in lookup
value = d[key] = self.method(*args, **kwargs)
File "odoo/addons/base/models/res_company.py", line 402, in __accessible_branches
self.ensure_one()
File "odoo/models.py", line 5944, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
When the user removes the journal, the company ID is taken from the journal, which leads to a traceback from the line below.
https://github.com/odoo/odoo/blob/53d6d795ddf6cc9e470bfeb48bb31bc728acedbe/addons/account/models/account_payment.py#L207-L208
After applying this commit, resolve this issue by taking the default company,
when there is no journal.
sentry-5054332731
Forward-Port-Of: odoo/odoo#169048
Forward-Port-Of: odoo/odoo#157337