Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
13546 Zobrazení

I've accidentally created a new company via the Project Module by adding a new column in a view sorted by companies.


What is the correct way to completely remove a [newly-created] company? The error I get when attempting to delete is:


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

Model: Project (project.project), Constraint: project_project_company_id_fkey


Also, does anyone know how to disable the creation of new columns in Kanban view (in Studio)? This would safeguard against new companies being created accidentally in the future.


Many thanks for your suggestions!


Konrad

Avatar
Zrušit
Autor Nejlepší odpověď

[SOLVED]

In this case, the process required to remove the company which had automatically been added was:

1. Delete the [default] Tasks in the [default] Project created by Odoo for the new company.

2. Delete the [default] Project.

3. Delete the company.

Contrary to what has been stated by Odoo support ("Once a company is created, we will not be able to delete it as dependencies are created in the system.") (sic!), the company was then deleted without errors.

What still remains an open question is how to disable the option to add new columns in a given Kanban view...

K. Br.

Avatar
Zrušit

I am getting the same exact error (Model: Project (project.project), Constraint: project_project_company_id_fkey) but there are no Projects or Tasks in the Projects (project.project) model...at least not in the UI that I can see.... :(

Just kidding -- the project and tasks were archived. Now I"m getting a new error. "The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead. Model: Picking Type (stock.picking.type), Constraint: stock_picking_type_company_id_fkey"
Sigh...These links/dependencies that Odoo makes you decipher and manually delete yourself instead of doing it automatically for you is such an annoying part of this platform

Related Posts Odpovědi Zobrazení Aktivita
1
čvn 23
5199
0
bře 20
3077
0
bře 15
5260
1
bře 15
3386
0
bře 25
1176