-
- Downloads
[FIX] mrp: create production location when type is not production
If the user change a location type of the 'Production' from inventory locations and installs the 'MRP' module, the traceback will appear. Steps to produce: - Install Stock module. - Inventory > Configuration > Settings > enable the Storage Locations. - Inventory > Configuration > Locations > Remove the filter 'Internal'. - Open the 'Production' location and change the Location Type to 'View'. - Now install the 'Manufacturing' module. Error: A traceback appears: 'ParseError: while parsing /home/odoo/src/odoo/saas-16.2/addons/mrp/data/mrp_data.xml:17, somewhere inside' At the time of installing the MRP module, it will search for the production location using the location type as the production here - https://github.com/odoo/odoo/blob/f65a9bffe2cbc03b2efc969dc205c9ba01ee9ab5/addons/mrp/models/stock_warehouse.py#L65 If the production location is not found it will raise an userError. In this commit, the production location is created based on the company if not found. It will lead to the above traceback. sentry-4215564628 closes odoo/odoo#125885 X-original-commit: e8ce51dd Signed-off-by:William Henrotin (whe) <whe@odoo.com> Signed-off-by:
Parth Solanki (paso) <paso@odoo.com>
Please register or sign in to comment