Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Can somebody point me to this section? I can't find it... If not, how do I get my models loaded when they all reference each other? Can I use _sql to add constraints to all tables from the last model to be loaded?
Not sure that adding SQL constrain is the right way to do. OpenERP deal with it's own constraints at the Controller layer (MCV architecture). If I correctly understand OpenERP doc I saw time's ago; model definitions, constraints, ... are "OpenERP" object which are stored in pgSQL but... many constraints are not simply "translated" as SQL constraints, theses are simply defined within the python code of OpenERP (ie: should not be empty, must be valid EAN13, ...).
Even if I understand "native SQL" could be easier/faster, OpenERP is not "just a pgSQL DB", this in an ERP and I feel more comfortable to use the XML RPC layer and left the controller do his job (ie: If I forget something he will tell me, and if some table should be updated, it will do it by itslef).
Here is my kind opinion. Hope this will help you to select the better/safer technical solution for your project.
If you want to dig a bit wihtin the OpenERP "model", you could have a look to the "settings/parameters/structure of the DB/model" and look at the ir.model and ir.model.fields. Here are all the models/fields definitions used by OpenERP (ie: you could filter on many2many field type).
Have a nice day. @++ Nicolas
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 4/10/13, 5:46 PM|
|Seen: 4484 times|
|Last updated: 3/16/15, 8:10 AM|