diff options
| author | aamo-odoo <aamo@odoo.com> | 2025-01-28 12:28:26 +0000 |
|---|---|---|
| committer | aamo-odoo <aamo@odoo.com> | 2025-02-05 12:54:30 +0000 |
| commit | 6f04d42f849827d7bde302c44ba0329b6457b510 (patch) | |
| tree | b9b07530235ba653870820d5b93573bc46ec6d55 | |
| parent | 0fb0d8de32b443dc0edadb0ed11c569c5b7a12d6 (diff) | |
[FIX] event_sale: prevent error on upgrading module
Currently a 'ParseError' is arising when the user upgrades the 'event_sale'
module after deleting the 'Event Registration' product from sales.
Steps to reproduce:
- Install 'Sale_management' and 'event' module (without demo data)
- Open 'Products' in Sales > Delete 'Event Registration'
- Now upgrade 'event_sale' module
- The error appears in the log.
Traceback:
Exception: Cannot update missing record 'event_product.product_product_event'
ParseError: while parsing /home/odoo/src/odoo/saas-18.1/addons/event_sale/data/event_sale_data.xml:4, somewhere inside
<record id="event_product.product_product_event" model="product.product">
<field name="invoice_policy">order</field>
</record>
This commit resolves the issue by preventing the creation of a product using
'forcecreate="False"'.
sentry-5731062091
closes odoo/odoo#196470
X-original-commit: 1d0d004aef2611456c5f7cd939209155365341d7
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Aayush Modi (aamo) <aamo@odoo.com>
| -rw-r--r-- | addons/event_sale/data/event_sale_data.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/event_sale/data/event_sale_data.xml b/addons/event_sale/data/event_sale_data.xml index a67cbc31f7d..69edfed8752 100644 --- a/addons/event_sale/data/event_sale_data.xml +++ b/addons/event_sale/data/event_sale_data.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> <data noupdate="1"> - <record id="event_product.product_product_event" model="product.product"> + <record id="event_product.product_product_event" model="product.product" forcecreate="False"> <field name="invoice_policy">order</field> </record> </data> |
