Wednesday, October 2, 2024
2 changes
Resolved issues and error corrections
This change fixes an installation failure in the self-order point of sale module when a company already has a chart of accounts and demo data is not installed. It prevents the setup from depending on sample restaurant data, making the module install reliably for real business databases.
Original PR description
If the company has a CoA, it's currently not possible to install the module without the demo data. When loading the data of the module, it will lead to https://github.com/odoo/odoo/blob/3ad46fc7bbb7511efeb9e4861d9795844feec878/addons/pos_self_order/data/kiosk_demo_data.xml#L3-L5 https://github.com/odoo/odoo/blob/9511bacc89cc23ce162f93af4682a4806c45dfda/addons/pos_self_order/models/pos_config.py#L344-L352 Since the company has a CoA, we execute the `ref` but they target demo data, cf how they are loaded: https://github.com/odoo/odoo/blob/0bc90e7d74bd0792b9af7464256ba8770d894a25/addons/pos_restaurant/data/demo_data.xml#L4 https://github.com/odoo/odoo/blob/b9f9dbb7a1cd7d8812658c68daca89191c28eda7/addons/pos_restaurant/models/pos_config.py#L107-L111 https://github.com/odoo/odoo/blob/e2f08d58ff024228c3f472b35fd4aef7e60bdde4/addons/pos_restaurant/data/scenarios/restaurant_data.xml#L9-L12 Hence `ValueError: External ID not found in the system: pos_restaurant.food` OPW-4226855
This fix suppresses an unnecessary warning that appeared when loading push notification functionality on newer Ubuntu environments. It keeps system logs cleaner and avoids distracting messages without changing the user-facing behavior.
Original PR description
On google-auth import, setuptools will emit a warning in ubuntu noble when importing pkg_resources. This was not visible before the previous commits because another import of pkg_resources was made before enabling the warnings. The pkg_resources import is removed in google-auth >= 1.23.0 but the noble version is 1.5.1 (as it was in jammy)