keyur
keyur

Reputation: 31

Dont want to uninstall my module in openerp

My requirement is that if anyone install my module in openerp gtk-client after that he/she can't uninstall that module in current database.Consider database name as 'XYZ'.

Upvotes: 3

Views: 2122

Answers (4)

gurney alex
gurney alex

Reputation: 13645

Not quite what you asked, but you could maybe configure __openerp__.py to:

  • set you module in the Hidden category
  • set auto_install to True

In this way, you are guaranteed that your module will be installed, and not uninstallable.

Upvotes: 0

Keyur
Keyur

Reputation: 93

I found a solution by inheriting the ir.module.module class and overriding the button_uninstall method.

Upvotes: 1

Don Kirkby
Don Kirkby

Reputation: 56650

As I recall, the use control module could not be uninstalled. There was a big discussion about it in this bug, and it's since been removed from the extra addons branch. You could poke around in the source code to figure out what it was doing to be so nasty.

Upvotes: 0

Sandro Munda
Sandro Munda

Reputation: 41030

To uninstall a module, you can go to Administration / Modules / Modules... search and open your module.

Then, there is a "uninstall" button to uninstall your module. However, it's a Beta version of the functionnality. I've never had a problem yet.

EDIT:

According to your comment, the only way to do that is to specify a security file to prevent a user can go into the administration menu.

Upvotes: 0

Related Questions