Thursday, April 10, 2025
28 changes · saas-18.1
Resolved issues and error corrections
The point of sale test setup now removes sample category data before running an automated walkthrough. This prevents differences between demo and non-demo databases from causing false test failures, helping keep release validation stable.
Original PR description
This commit is unlinking all demo categories before starting the tour. In this way we avoid different behavior in no-demo and demo databases. runbot error: 162972
This fixes an issue in the Point of Sale loyalty flow where free product rewards could fail during automated checks because product details were incomplete. The change helps ensure loyalty rewards are added to orders reliably, reducing the risk of checkout disruptions related to reward products.
Original PR description
Currently the following tests
- test_loyalty_free_product_rewards
- test_loyalty_free_product_rewards_2
may fail with the error
```
TypeError: Cannot read properties of undefined (reading 'sale_line_warn')
at Proxy.addLineToCurrentOrder (http://127.0.0.1:8959/web/assets/eb52e48/point_of_sale.assets_prod.min.js:17244:235)
at Proxy.addLineToCurrentOrder (http://127.0.0.1:8959/web/assets/eb52e48/point_of_sale.assets_prod.min.js:17415:14)
at http://127.0.0.1:8959/web/assets/eb52e48/point_of_sale.assets_prod.min.js:16996:532
```
This occurs because, since 5620a16d55091b0ed74feee694a02252e3d13c17, when adding a line to current order we should specify the product template idThis fix prevents point of sale automated tests from failing when browser storage cleanup takes too long. It allows testing to continue after a short wait, improving build reliability without changing customer-facing behavior.
Original PR description
Before this commit, when indexedDB takes too long to flush, an error is raised in the tests, causing them to fail. This commit allows continuing the tests without flushing indexedDB after 2 seconds. runbot error: 163055
Miscellaneous changes
### Issue: Currently, the default route set on an automatically created RR might not be set on the product. ### Steps to reproduce: - In the settings: enable Multi-Steps Routes - On your warehouse set Manufacture in 3 steps - Create a storable product without any set route - Create a need for that product, for instance by creating and confirming an SO for 1 unit. - Inventory > Operations > Procurement > Replenishment #### > A reordering rule was automatically created for your prod
Original PR description
### Issue: Currently, the default route set on an automatically created RR might not be set on the product. ### Steps to reproduce: - In the settings: enable Multi-Steps Routes - On your warehouse…
### Issue: Currently, the default route set on an automatically created RR might not be set on the product. ### Steps to reproduce: - In the settings: enable Multi-Steps Routes - On your warehouse set Manufacture in 3 steps - Create a storable product without any set route - Create a need for that product, for instance by creating and confirming an SO for 1 unit. - Inventory > Operations > Procurement > Replenishment #### > A reordering rule was automatically created for your product but the manufacture route is set by default. ### Cause of the issue: Entering the replenishment tab will create orderpoints and set their default routes: https://github.com/odoo/odoo/blob/884130330b600b4356c640cb679c2bb8fdb833a0/addons/stock/models/stock_orderpoint.py#L478-L481 However, the `_set_default_route_id` does not check that the route found to match a given orderpoint is actually selected on the product of the orderpoint: https://github.com/odoo/odoo/blob/884130330b600b4356c640cb679c2bb8fdb833a0/addons/stock/models/stock_orderpoint.py#L323-L336 opw-4681202 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#204850 Forward-Port-Of: odoo/odoo#204449
This is a followup on [1]. Restricted users are not allowed to apply shapes on images because: - it involves the duplication of the image attachment, and - SVGs mimetype is kept only for users allowed to write views. This commit verifies that the user has restricted edition rights and makes it possible for them to apply shapes on images. Steps to reproduce: - Install eCommerce. - Create a user with sales administrator rights. - Connect as that user. - Go to a product page. - Edi
Original PR description
This is a followup on [1]. Restricted users are not allowed to apply shapes on images because: - it involves the duplication of the image attachment, and - SVGs mimetype is kept only for users allowed to write views. This commit verifies that the user has restricted edition rights and makes it possible for them to apply shapes on images. Steps to reproduce: - Install eCommerce. - Create a user with sales administrator rights. - Connect as that user. - Go to a product page. - Edit. - Drop a "Text - Image" block. - Set a shape on the image. - Save. => Did trigger an error popup. [1]: https://github.com/odoo/odoo/commit/d5aa54ca108eb99c7eb855a7d456bfe2f208a8eb task-2830084 Forward-Port-Of: odoo/odoo#204857 Forward-Port-Of: odoo/odoo#92540
- have a follower with a portal partner linked to a specific company "portal" user is important here because internal users don't have multi-company rule. - view the chatter with a user which has no access to that company - the chatter is currently locked by an ACL error The follower should be displayed instead. task-4648765 Forward-Port-Of: odoo/odoo#205063 Forward-Port-Of: odoo/odoo#201864
Original PR description
- have a follower with a portal partner linked to a specific company "portal" user is important here because internal users don't have multi-company rule. - view the chatter with a user which has no access to that company - the chatter is currently locked by an ACL error The follower should be displayed instead. task-4648765 Forward-Port-Of: odoo/odoo#205063 Forward-Port-Of: odoo/odoo#201864
Partial backport of #202835 Nicer strategy for stable to avoid braking all existing clients tests This should catch most case without introducing a lock and a mandatory allowance of the request. - If the cookie is present, check if it is valid (request opening cursor in next test) - Check if the test cursor was opened in the same test as the execute/rollback (request started in previous test executing in next) - custom expected cookie for browser js to avoid allowing a request after w
Original PR description
Partial backport of #202835 Nicer strategy for stable to avoid braking all existing clients tests This should catch most case without introducing a lock and a mandatory allowance of the request. - If…
Partial backport of #202835 Nicer strategy for stable to avoid braking all existing clients tests This should catch most case without introducing a lock and a mandatory allowance of the request. - If the cookie is present, check if it is valid (request opening cursor in next test) - Check if the test cursor was opened in the same test as the execute/rollback (request started in previous test executing in next) - custom expected cookie for browser js to avoid allowing a request after wait_remaining_requests All message could be silenced to kill the transaction without braking the test if it is a better strategy. Some design choices: - current_test is passed to Testcursor to avoid to add an import to odoo modules in sql_db, only impacts test logic. Parameter is optional. - test cursor checks current_test before each operation (execute, commit, rollback). - http_request_key is the test itself (between setup and cleanup), only exception is for browser js to avoid request executing during the end of the test (once browser is closed). It is the most common case. Forward-Port-Of: odoo/odoo#205487 Forward-Port-Of: odoo/odoo#205190
Factur x cannot have negative lines on <ram:ChargeAmount> which can happen when there is a discount on the invoice. - Create a sale order with a global discount, generate the invoice and generate the factur x xml. - The amount on <ram:ChargeAmount> is negative. We can instead invert both price unit and quantity to have the same result. Inspired by 6f0642d62b6a07141553b655ee3c2b4369bf8ffb which did the same fix for ubl. opw-4668558 Description of the issue/feature this PR addresse
Original PR description
Factur x cannot have negative lines on <ram:ChargeAmount> which can happen when there is a discount on the invoice. - Create a sale order with a global discount, generate the invoice and generate the factur x xml. - The amount on <ram:ChargeAmount> is negative. We can instead invert both price unit and quantity to have the same result. Inspired by 6f0642d62b6a07141553b655ee3c2b4369bf8ffb which did the same fix for ubl. opw-4668558 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#204952 Forward-Port-Of: odoo/odoo#203298
After https://github.com/odoo/odoo/pull/144586, the modules other than base localization module should not have the `countries` key defined in their manifest. The issue happens because `countries` key works similar to auto-install and it can lead to unwanted installation of the module. As there was no check implemented, for some modules this key was used accidentally and caused issues with auto-install. This commit removes this field from the manifest of the modules that could have this
Original PR description
After https://github.com/odoo/odoo/pull/144586, the modules other than base localization module should not have the `countries` key defined in their manifest. The issue happens because `countries` key works similar to auto-install and it can lead to unwanted installation of the module. As there was no check implemented, for some modules this key was used accidentally and caused issues with auto-install. This commit removes this field from the manifest of the modules that could have this problem to avoid the issue. Also in https://github.com/odoo/odoo/pull/201526 a linting test is proposed to avoid having the same issue in the future. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#201610
Steps to reproduce the bug: - Install point of sales app, employees app - Make a shop and enable multiple employees per session option - Add another user as a basic right user for any shop - Open a shop session (the one rights are set up for) - Log out of the current user and log in with the other user account - Open the session - The current logged-in user can close the session despite having basic rights Problem: The close session in the XML was having a condition of pos.employeeIsA
Original PR description
Steps to reproduce the bug: - Install point of sales app, employees app - Make a shop and enable multiple employees per session option - Add another user as a basic right user for any shop - Open a…
Steps to reproduce the bug: - Install point of sales app, employees app - Make a shop and enable multiple employees per session option - Add another user as a basic right user for any shop - Open a shop session (the one rights are set up for) - Log out of the current user and log in with the other user account - Open the session - The current logged-in user can close the session despite having basic rights Problem: The close session in the XML was having a condition of pos.employeeIsAdmin, and the employeeIsAdmin flag was checking if the user is having advanced rights on the shop or it is the logged-in Odoo user. So if you are the logged-in user, you will always have the close register option regardless of the access rights you have for a specific shop. opw-4575692 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#198613
When a purchase order is created with a positive and negative quantity of the same product but different unit prices, the read_group runs into a division by zero error as the `SUM('purchase_report'.'qty_ordered')` is zero. To prevent this exception, we NULL the denominator if it's 0. **Example PO that would cause issues when adding "Average Cost" as a measure in the purchase report:**  opw-4684787
Original PR description
When a purchase order is created with a positive and negative quantity of the same product but different unit prices, the read_group runs into a division by zero error as the `SUM('purchase_report'.'qty_ordered')` is zero.
To prevent this exception, we NULL the denominator if it's 0.
**Example PO that would cause issues when adding "Average Cost" as a measure in the purchase report:**

opw-4684787
Forward-Port-Of: odoo/odoo#204674__Current behavior before commit:__ Sometimes when a Worldline terminal makes a payment with Edenred or Sodexo, it creates a ticket with special ascii characters like `0x0E` that are not supposed to be printed. Some of those characters make the [`createImage`][1] method throw an error with the `onerror` Event. __Description of the fix:__ Added the `sanitizeNodeText` function to remove all problematic ascii characters that should not be printed anyway. Added a test to make sure `htmlToCanva
Original PR description
__Current behavior before commit:__ Sometimes when a Worldline terminal makes a payment with Edenred or Sodexo, it creates a ticket with special ascii characters like `0x0E` that are not supposed to be printed. Some of those characters make the [`createImage`][1] method throw an error with the `onerror` Event. __Description of the fix:__ Added the `sanitizeNodeText` function to remove all problematic ascii characters that should not be printed anyway. Added a test to make sure `htmlToCanvas` can handle all ascii characters without crashing. opw-4322339 [1]:https://github.com/odoo/odoo/blob/a98e802976f6798f3aea07231a366fbcd8002ce2/addons/point_of_sale/static/src/app/utils/html-to-image.js#L217 Forward-Port-Of: odoo/odoo#201240 Forward-Port-Of: odoo/odoo#195004
- Changed payment link error to list the causes instead of displaying 'This invoice is already paid' in all cases. - Generating a payment link is now not possible while online payments are disabled in settings, a warning is displayed instead. task-4609554 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199985
Original PR description
- Changed payment link error to list the causes instead of displaying 'This invoice is already paid' in all cases. - Generating a payment link is now not possible while online payments are disabled in settings, a warning is displayed instead. task-4609554 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199985
Enhance query efficiency for large accrued data by implementing batch processing Previously, fetchall() loaded all IDs at once, causing memory errors. ```sql select count(*) from pos_order; count ---------- 16736714 (1 row) select count(*) from pos_order_line; count ---------- 24988345 (1 row) select count(*) from pos_payment; count ---------- 16430502 (1 row) ``` - Traceback ```python Traceback (most recent call last): File "/home/odoo/src/odoo/18.0/
Original PR description
Enhance query efficiency for large accrued data by implementing batch processing Previously, fetchall() loaded all IDs at once, causing memory errors. ```sql select count(*) from pos_order; count…
Enhance query efficiency for large accrued data by implementing batch processing
Previously, fetchall() loaded all IDs at once, causing memory errors.
```sql
select count(*) from pos_order;
count
----------
16736714
(1 row)
select count(*) from pos_order_line;
count
----------
24988345
(1 row)
select count(*) from pos_payment;
count
----------
16430502
(1 row)
```
- Traceback
```python
Traceback (most recent call last):
File "/home/odoo/src/odoo/18.0/odoo/service/server.py", line 1321, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-13>", line 2, in new
File "/home/odoo/src/odoo/18.0/odoo/tools/func.py", line 97, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/18.0/odoo/modules/registry.py", line 127, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 484, in load_modules
processed_modules += load_marked_modules(env, graph,
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 372, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 240, in load_module_graph
migrations.migrate_module(package, 'post')
File "/home/odoo/src/odoo/18.0/odoo/modules/migration.py", line 254, in migrate_module
mod.migrate(self.cr, installed_version)
File "/home/odoo/src/odoo/18.0/addons/point_of_sale/upgrades/1.0.2/post-deduplicate-uuids.py", line 38, in migrate
deduplicate_uuids("pos_order_line")
File "/home/odoo/src/odoo/18.0/addons/point_of_sale/upgrades/1.0.2/post-deduplicate-uuids.py", line 30, in deduplicate_uuids
all_ids = [r[0] for r in cr.fetchall()]
MemoryError
```
opw - 4544050
upg - 2459515
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#204235**Steps to reproduce:** - Install Accounting and l10n_es_edi_facturae - Switch to a Spanish company (e.g. ES Company) - Create an invoice: * Customer: [a Spanish customer] (e.g. Ayuntamiento De Bilbao) * Product: [any] * Customer Reference: [anything] - Confirm the invoice - Generate Facturae edi file via "Send & Print" button - Check the generated XML **Issue:** When submitting the XML to FACe service, the XML is rejected because "ReceiverTransactionReference" and "ReceiverCo
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_es_edi_facturae - Switch to a Spanish company (e.g. ES Company) - Create an invoice: * Customer: [a Spanish customer] (e.g. Ayuntamiento De…
**Steps to reproduce:** - Install Accounting and l10n_es_edi_facturae - Switch to a Spanish company (e.g. ES Company) - Create an invoice: * Customer: [a Spanish customer] (e.g. Ayuntamiento De Bilbao) * Product: [any] * Customer Reference: [anything] - Confirm the invoice - Generate Facturae edi file via "Send & Print" button - Check the generated XML **Issue:** When submitting the XML to FACe service, the XML is rejected because "ReceiverTransactionReference" and "ReceiverContractReference" are not defined for each "InvoiceLine" element. There are just defined for the invoice in general in "FileReference" element. According to the official documentation https://www.facturae.gob.es/formato/Paginas/version-3-2.aspx they can be defined in "InvoiceIssueData" and "InvoiceLine". FACe seems to require it in "InvoiceLine". **Solution:** Also add "ReceiverContractReference" in "InvoiceLine" and fall back on customer reference of the invoice for "ReceiverTransactionReference" of the line. opw-4579987 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#205264 Forward-Port-Of: odoo/odoo#204294
**Current behavior before PR:** When a thread is created from a message, the message author is not automatically added as a member of the thread. **Desired behavior after PR is merged:** The message author is implicitly added as a member when a thread is created from message. **Task**-4656632 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#203094
Original PR description
**Current behavior before PR:** When a thread is created from a message, the message author is not automatically added as a member of the thread. **Desired behavior after PR is merged:** The message author is implicitly added as a member when a thread is created from message. **Task**-4656632 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#203094
In Modelo 390 section 1, the value for [33] and [34] are wrong. - For [33], the balance of [27] and [29] are missing in the sum expression. - For [34], the balance of [28] and [30] are missing in the sum expression. By fixing those two expressions, the total match the Modelo 303 totals. opw-4520183 Forward-Port-Of: odoo/odoo#205403
Original PR description
In Modelo 390 section 1, the value for [33] and [34] are wrong. - For [33], the balance of [27] and [29] are missing in the sum expression. - For [34], the balance of [28] and [30] are missing in the sum expression. By fixing those two expressions, the total match the Modelo 303 totals. opw-4520183 Forward-Port-Of: odoo/odoo#205403
Fixes ``` File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 2647, in _process_end self._process_end_unlink_record(record) File "/home/odoo/src/odoo/addons/website/models/ir_model_data.py", line 35, in _process_end_unlink_record return super()._process_end_unlink_record(record) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 2576, in _process_end_unlink_record record.unlink()
Original PR description
Fixes ``` File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 2647, in _process_end self._process_end_unlink_record(record) File…
Fixes
```
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 2647, in _process_end
self._process_end_unlink_record(record)
File "/home/odoo/src/odoo/addons/website/models/ir_model_data.py", line 35, in _process_end_unlink_record
return super()._process_end_unlink_record(record)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 2576, in _process_end_unlink_record
record.unlink()
File "/home/odoo/src/odoo/addons/mail/models/ir_model_fields.py", line 52, in unlink
'sequence': self.env[field.model_id.model]._mail_track_get_field_sequence(field.name),
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/api.py", line 612, in __getitem__
return self.registry[model_name](self, (), ())
~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/modules/registry.py", line 240, in __getitem__
return self.models[model_name]
~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'my.custom.model'
```
To reproduce:
* add a model with a tracked field to a module
* create a record and update field value to create a tracking message
* remove the model from the module and update the module
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#204978**Problem:** On a repair order, if the user is changed it changes the location (and recycled parts destination location) to the default one. Additionally, when the order is confirmed, there is no way to change manually the location. The problematic use case is that if you first confirm the RO and then change the user, it will trigger a change of the location that you won't be able to revert manually. **Steps to reproduce:** - enable location in DB - create a new repair order - change the
Original PR description
**Problem:** On a repair order, if the user is changed it changes the location (and recycled parts destination location) to the default one. Additionally, when the order is confirmed, there is no way…
**Problem:** On a repair order, if the user is changed it changes the location (and recycled parts destination location) to the default one. Additionally, when the order is confirmed, there is no way to change manually the location. The problematic use case is that if you first confirm the RO and then change the user, it will trigger a change of the location that you won't be able to revert manually. **Steps to reproduce:** - enable location in DB - create a new repair order - change the location and recycled parts destination location - confirm the repair order - change the responsible user **Current Behavior:** The location and recycled parts destination location fields values are changed to the default value for this operation type. **Expected Behavior:** The values of those fields shouldn't change after the repair order is confirmed. **Cause of the issue:** The _compute_picking_type_id depends on "user_id" and is therefore triggered when the user is changed https://github.com/odoo/odoo/blob/1445d5adabf8eabe83e842c214655a74434bad4d/addons/repair/models/repair.py#L196 This triggers the _compute_location_id and _compute_recycle_location_id methods because they depend on "picking_type_id" https://github.com/odoo/odoo/blob/fa41c1d50f10ebab08437557ee863348a63de2c0/addons/repair/models/repair.py#L204 This happens regardless of whether the repair order has been confirmed. Because the list of compute methods to be triggered when user_id is changed is computed all at once before running them, adding an if statement at the beginning of _compute_picking_type_id (preventing the change of value of picking_type_id if the state is not "draft") would not prevent _compute_location_id and _compute_recycle_location_id to run. Putting an if statement at the beginning of _compute_location_id and _compute_recycle_location_id to prevent the change when the state is not in "draft" is not a good fix either. That's because we wouldn't know if the computation is triggered by a change of user or a change of picking_type_id (in which case we want the computation to run) **Fix:** I removed the 'user_id' dependency on _compute_picking_type_id opw-4555293 Forward-Port-Of: odoo/odoo#202227
In this commit: ------------------- - If we have custom description applied in the sale order for any product that custom description would be reflected as it is on the invoice when we settle that SO from POS. Task - 4645762 Forward-Port-Of: odoo/odoo#202665
Original PR description
In this commit: ------------------- - If we have custom description applied in the sale order for any product that custom description would be reflected as it is on the invoice when we settle that SO from POS. Task - 4645762 Forward-Port-Of: odoo/odoo#202665
Description of the issue/feature this PR addresses: As a result of the following commit 9a6b8fec280ccf63b14d3fdafdd39f534c54c646 normal users attempting to print invoices in SA company where the invocie has been ZATCA verified, are getting errors if they have insufficient access rights; for instance a normal user who has POS User access and Accounting/Billing is unable to generate PoS orders as they are forced to have the invoice checkbox set in the `l10n_sa_pos` and when the invoice is generat
Original PR description
Description of the issue/feature this PR addresses: As a result of the following commit 9a6b8fec280ccf63b14d3fdafdd39f534c54c646 normal users attempting to print invoices in SA company where the…
Description of the issue/feature this PR addresses:
As a result of the following commit 9a6b8fec280ccf63b14d3fdafdd39f534c54c646 normal users attempting to print invoices in SA company where the invocie has been ZATCA verified, are getting errors if they have insufficient access rights; for instance a normal user who has POS User access and Accounting/Billing is unable to generate PoS orders as they are forced to have the invoice checkbox set in the `l10n_sa_pos` and when the invoice is generated it is giving the following Traceback.
Current behavior before PR:
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/api.py", line 1013, in get
cache_value = field_cache[record._ids[0]]
KeyError: 415613
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/fields.py", line 1161, in _get_
value = env.cache.get(record, self)
File "/home/odoo/src/odoo/odoo/api.py", line 1020, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'account.edi.document(415613,).attachment_id'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/fields.py", line 1187, in _get_
recs._fetch_field(self)
File "/home/odoo/src/odoo/odoo/models.py", line 3230, in _fetch_field
self.check_field_access_rights('read', [field.name])
File "/home/odoo/src/odoo/odoo/models.py", line 2986, in check_field_access_rights
raise AccessError(_(
odoo.exceptions.AccessError: The requested operation can not be completed due to security restrictions.
Document type: Electronic Document for an account.move (account.edi.document)
Operation: read
User: 40
Fields:
• attachment_id (allowed for groups 'Administration / Settings')
```
Desired behavior after PR is merged:
To Fix the issue and sudo() the access to the edi attachment
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#204912This commit changes a test that checks that we cannot remove a specific member from an article. The issue was that the parameter provided didn't respect the function's signature by giving a `res.users` instead of a `knowledge.article.member`. By chance, it always worked as those model share the field partner_id that represent the same data. But it is updated so that it better represents the correct use of the method. Forward-Port-Of: odoo/enterprise#83024
Original PR description
This commit changes a test that checks that we cannot remove a specific member from an article. The issue was that the parameter provided didn't respect the function's signature by giving a `res.users` instead of a `knowledge.article.member`. By chance, it always worked as those model share the field partner_id that represent the same data. But it is updated so that it better represents the correct use of the method. Forward-Port-Of: odoo/enterprise#83024
In databases migrated to Odoo 18, that has the module l10n_mx_edi_stock installed the field l10n_mx_edi_hazardous_material remains empty. This issue occurs because the CSV file (product.unspsc.code.csv) assigns the value but the records are no update As a result, customers cannot generate the Carta Porte in the l10n_mx module, encountering the following error: Error 301 (CP155): The attribute "Mercancia:MaterialPeligroso" is missing or invalid when the ClaveProdServ is declared as hazardo
Original PR description
In databases migrated to Odoo 18, that has the module l10n_mx_edi_stock installed the field l10n_mx_edi_hazardous_material remains empty. This issue occurs because the CSV file (product.unspsc.code.csv) assigns the value but the records are no update As a result, customers cannot generate the Carta Porte in the l10n_mx module, encountering the following error: Error 301 (CP155): The attribute "Mercancia:MaterialPeligroso" is missing or invalid when the ClaveProdServ is declared as hazardous. As it was mentioned here: https://github.com/odoo/upgrade/pull/7468 I modified the script to use ir_model_data to link the records and now it's on the carpet migrations of l10n_mx_edi_stock Here is a ticket with an example of the error https://www.odoo.com/odoo/project.task/4577049/action-4665/4631583 Forward-Port-Of: odoo/enterprise#82972
After https://github.com/odoo/odoo/pull/144586, the modules other than base localization module should not have the countries key defined in their manifest. The issue happens because countries key works similar to auto-install and it can lead to unwanted installation of the module. As there was no check implemented, for some modules this key was used accidentally and caused issues with auto-install. This commit removes this field from the manifest of the modules that could have this pro
Original PR description
After https://github.com/odoo/odoo/pull/144586, the modules other than base localization module should not have the countries key defined in their manifest. The issue happens because countries key works similar to auto-install and it can lead to unwanted installation of the module. As there was no check implemented, for some modules this key was used accidentally and caused issues with auto-install. This commit removes this field from the manifest of the modules that could have this problem to avoid the issue. Also in https://github.com/odoo/odoo/pull/201526 a linting test is proposed to avoid having the same issue in the future. Runbot Errors: https://runbot.odoo.com/odoo/error/159875 https://runbot.odoo.com/odoo/error/159877 Forward-Port-Of: odoo/enterprise#81178
adding missing access rule (read permission to the group_purchase_user) for the test that checks it build_error-70728 Forward-Port-Of: odoo/enterprise#82753
Original PR description
adding missing access rule (read permission to the group_purchase_user) for the test that checks it build_error-70728 Forward-Port-Of: odoo/enterprise#82753
…rwriting **Issue:** The data_cleaning module contains two views, data_merge_model_views and data_cleaning_model_views, that share the same form view id. **Steps to Reproduce:** 1. Install the data_cleaning module 2. Open psql in the terminal 3. Run the following query:” select id, name, model from ir_ui_view where model ilike 'data_%' and type = 'form';” 4. Observe that data_cleaning.model is missing from the results Expected Behavior: the form view for data_cleaning.model should
Original PR description
…rwriting **Issue:** The data_cleaning module contains two views, data_merge_model_views and data_cleaning_model_views, that share the same form view id. **Steps to Reproduce:** 1. Install the…
…rwriting **Issue:** The data_cleaning module contains two views, data_merge_model_views and data_cleaning_model_views, that share the same form view id. **Steps to Reproduce:** 1. Install the data_cleaning module 2. Open psql in the terminal 3. Run the following query:” select id, name, model from ir_ui_view where model ilike 'data_%' and type = 'form';” 4. Observe that data_cleaning.model is missing from the results Expected Behavior: the form view for data_cleaning.model should be present in the database. Actual Behavior: the form view for data_cleaning.model is not found in the database. **Root Cause** The form view in data_cleaning_model_views has the same id as the one in data_merge_model_views. Because data_cleaning_model_views is loaded first (as defined in __manifest__.py), it gets overwritten by data_merge_model_views. **Fix** To prevent this issue, the form view id in data_cleaning_model_views has been renamed to a unique and more appropriate identifier. Opw-4517418 Forward-Port-Of: odoo/enterprise#80594
Vendor bills and purchase orders should always be negative on a budget with type `both`, as they are expenses. - Create a budget with type `both` - Create a sales invoice and several purchase orders and vendor bills - The budget report's purchase order amounts are positive and added up. As soon as they are billed they become negative. Task [link](https://www.odoo.com/odoo/project/967/tasks/4568067) opw-4568067 Forward-Port-Of: odoo/enterprise#83074 Forward-Port-Of: odoo/enterprise#
Original PR description
Vendor bills and purchase orders should always be negative on a budget with type `both`, as they are expenses. - Create a budget with type `both` - Create a sales invoice and several purchase orders and vendor bills - The budget report's purchase order amounts are positive and added up. As soon as they are billed they become negative. Task [link](https://www.odoo.com/odoo/project/967/tasks/4568067) opw-4568067 Forward-Port-Of: odoo/enterprise#83074 Forward-Port-Of: odoo/enterprise#81356
**before:**  **after:**  Forward-Port-Of: odoo/enterprise#82494
Original PR description
**before:**  **after:**  Forward-Port-Of: odoo/enterprise#82494