Wednesday, April 23, 2025
1 change · saas-18.1
Resolved issues and error corrections
This fix prevents Point of Sale sample shop setup from failing when all product categories have been deleted. It allows the system to handle missing category references gracefully, so users can continue loading bakery, furniture, or restaurant sample data without an unexpected error.
Original PR description
Currently, an exception is generated when the system tries to find the product category after all product categories have been deleted. Steps to reproduce: 1. Install the `point_of_sale` module…
Currently, an exception is generated when the system tries to find the product category after all product categories have been deleted. Steps to reproduce: 1. Install the `point_of_sale` module without demo data. 2. Navigate to Inventory -> Configuration -> Categories. 3. Delete all categories. 4. Navigate to Point of Sale -> load sample of furniture, bakery or restaurant shop 5. An error occurs. Error: ``` ParseError while parsing /home/odoo/src/odoo/saas-18.2/addons/product/data/product_demo.xml:10, somewhere inside ``` This issue[1] occurs because when the system tries to reference the missing product category, it results in a ParseError due to a missing required record. [1] - https://github.com/odoo/odoo/blob/6c01e3994fab23ff1b23da807ecb0bf551066816/addons/product/data/product_demo.xml#L10-L16 This fix resolves the issue by returning False when the reference product category is missing. sentry-6251128895 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr