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.
When I create a partner (company) within OpenERP, I've noticed that records are automatically created in ir_property table.
I'm looking to import partners through direct SQL insert queries, in the res_partner table.
Is it necessary to make inserts in the ir_property table too ?
If yes, could someone explain why ? And what is the purpose ?
when customers are created in OpenERP the model res.users updates both tabel res.users and also tabel ir_property for a number of properties such as
- property_payment_term -property_product_pricelist -property_delivery_carrier -many more... (see screenshot)
In order to ensure that the correct tabel in updated by any inserts/updates and deletes it is recommended that instead of directly updating a singele tabel with a SQL-statement that you instead utilise the OpenERP model itself. In this way you guarantee data integrity.
There are many methods to insert records using the OpenERP models for example: -program a script for it called XML/RPC -Use the inbuilt OpenERP csv import functionality -Use Talend which has available OpenERP connectors (my persona;l favourite)
hope this helps
Thank you. But I would like to go further.
I would of course never use direct INSERT SQL queries for sales, invoices etc... but to import partners and products, at the setup of a new database, it would make sense to try, especially with thousands of references.
CSV and even XML-RPC imports are -unfortunatly- rather slow.
Some people seem to use SQL to import products, successfully (videos on youtube).
On a fresh DB install, I've noticed that if I choose a "chart of account", and then create a partner, the compulsory fields for the partner "account receivable" and "account payable" are automatically filled.
But OpenERP doesn't create records in ir_property table.
However, when I choose a payment term for a partner, or if i change the AR or AP accounts, then records are added into the ir_property table.
So i'm rather lost.
I believe it would be good for the community to have a clear understanding of the mechanism, regarding importation of products (the most important point) and partners, in order to know once and for all if a proper set of direct INSERT SQL queries could do the job.
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: 8/24/13, 10:31 AM|
|Seen: 3142 times|
|Last updated: 3/16/15, 8:10 AM|