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.
I want to make an OpenERP-module which install my configuration. I'am able to add records to the database tables using XML-files in the datasection of __openererp___. However I want to change the "Your Company" record in the res_company table instead of add an new one to it. How can this be accomplisched using a XML-file ?
To update the record of company using the demo data you need to write a record in xml file like,
<record id="base.main_company" model="res.company"> <field name="name">Your New Company</field> <field name="partner_id" ref="main_partner"/> <field name="rml_header1">Your New Company Tagline</field> <field name="currency_id" ref="base.EUR"/> </record>
it will change the default company information while installing your customer module.
Thanks for your answer. Now the record in the table res_company get updated nicely.
Only the line <field name="partner_id" ref="main_partner"/> seems redundant. In my case it generates an error since the id "main_partner" was not defined in the XML-file. However the corresponding record in the res_partner table got updated without that line as well. So is there a real need for it ?
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: 1/3/14, 1:23 PM|
|Seen: 5688 times|
|Last updated: 3/30/15, 10:54 AM|