Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
1260 Vues

Hello everyone,

I’m currently facing an issue in Odoo CRM. I have a many2one field called stage_id in the crm.lead model, which is linked to the crm.stage model. I want to delete a specific stage from the crm.stage model as it is no longer needed. However, when I try to delete it, I encounter the following error:

Validation Error: The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead.

Model: Lead/Opportunity (crm.lead)

Constraint: crm_lead_stage_id_fkey

I’ve checked, and there are no leads currently using this stage (active or archived). I’ve also verified that the stage isn’t set as the default in any pipeline or automation rules.

Has anyone encountered this issue before? Is there a way to resolve it without breaking database integrity? Any advice or guidance would be greatly appreciated!

Thank you! 😊

Avatar
Ignorer

I'm currently facing the same issue :)

Meilleure réponse

Since the stage_id​ field from crm.stage​ is also linked to the crm.activity.report​ model, it is likely that this connection is preventing you from deleting the stage directly. The foreign key constraint enforces that no crm.activity.report​ records are referencing the stage you are trying to delete.

Avatar
Ignorer
Auteur

Thank you for responding, I checked the 'crm.activity.report' model and there was nothing referencing this stage.

Publications associées Réponses Vues Activité
0
mars 25
893
1
sept. 24
1557
1
juin 22
3179
0
sept. 17
3359
1
sept. 16
5175