dolibarr icon indicating copy to clipboard operation
dolibarr copied to clipboard

Deleting a third party

Open atm-florianm opened this issue 7 months ago • 0 comments

Bug

One of our clients just told us about this bug in Dolibarr 16.0.5 :

  1. they created a new third party
  2. the new third party was defined as a "prospect / client"
  3. they added client tags to the third party
  4. they changed the third party as "neither prospect nor client"
  5. they tried to delete the third party → Cannot delete or update a parent row: a foreign key constraint fails (cdcconseil_dolibarr.llx_categorie_societe, CONSTRAINT fk_categorie_societe_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid))

I think deleting the third party should first remove any tags the third party might have to avoid this issue.

In this particular case, the tags were still there but no longer displayed because the third party was no longer a prospect / client, which made it more difficult for the client to understand what was going on.

To perform the deletion, I simply changed back the third party to "prospect / client", removed the categories and then the deletion went smoothly, but this shouldn't be necessary.

Dolibarr Version

16.0.5

Environment PHP

7.4

Environment Database

MariaDB 10.11.16

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

atm-florianm avatar Jun 26 '24 08:06 atm-florianm