Currently, an error occurs when the user follows the below steps and tries to
run cron "Maintenance: generate preventive maintenance requests"
Steps:
- Open maintenance > Configuration > Maintenence Teams
- Create new team e.g. "ABC"
- Go to Equipments and create new equipemnt
- Set 1 "Preventive Maintenance Frequency" from maintenance page
- Select "ABC" in Maintenance Team >> save it
- Delete Maintenence Team "ABC"
This commit solves the above issue by restricting the deletion
of maintenance teams who are related to equipment.
sentry-4467657509
closesodoo/odoo#137943
X-original-commit: 9e4aa20c05999ccd9952480b8fea22b9fb651d74
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: ANSARI MAHAMADASIF (maan) <maan@odoo.com>