The link between the menu and the action is made with the keyword using à reference field so there no data integrity enforced.
Modifying XML record does not always work after a database update. When developing it is usually simpler to drop the database. Otherwise you may need to force the synchronization of the model data.
even if you delete models data , cache, somewhere is keept some older infos. even when you rsync… there is a ghost somewhere.
I could wipe out the all database but i would prefer find where things are kept…
File “/trytond/pool.py”, line 187, in get
return self._pool[self.database_name][type][name]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: ‘formo_delatour.interet’
I support @ced 's recommendation: When developing a module, it’s usually simpler to drop the database it something breaks. Don"t waste your time trying to fix the database in this case.
For developing I use sqlite databases, which I can create and drop as easy as backup and restore (without need of advanced permissions on my system).
Hint: For using sqlite add this to your trytond.conf
[database]
uri = sqlite://
path = /full/path/to/directory/where/db/resides/
ok, it is simpler to drop the database, reimport the datas you need to be like in production, reajust your script because id could be différent and verify that all your datas react as expected. it reminds me the time where the solutions was re-install your windows.
would it be simpler to run a simple script that wipe the xml data :
5 or 6 or even 7 delete from … where … ?
I found 5 of them, i’ll find the others
tyni-erp/open-erp/tryton-erp exists for maybe 15 years and in 15 years no one knows where goes an xml file in the db ?
there is only an ui_view, an action_act_window, an action_act_window_view and a menu_item and it is simpler to wipe the database and start from the beginning ?
Of course you can wipe the data which can (and usually will) be spread across multiple (referential) tables. However it is much easier to start from a database backup, ideally the production database which will be the target database of your development. It is simply much faster and saves you also from errors made in the cleanup.
If cleanup is required, most developers use the GUI (for small things) or proteus. We typically don’t care about keys in the DB, as this is what Tryton takes care of.