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 update company name with a new module installation. I have company_data.xml
<?xml version="1.0" encoding="utf-8"?> <openerp> <data noupdate="0"> <record model="res.company" id="1"> <field name="name">New name</field> </record> </data> </openerp>
But instead of update the name it adds a new company with id=2. If I change the name value again AND id value 1 or 2 in XML then reinstall the module, it changes only the name of company id 2.
Why it doesn't change the name of company with id 1??? IS IT A BUG???
That id="1" doesn't mean that you are going to update that name to the id="1", it's saying that your xml view's name is "1". I'm not sure about this but you can try writing.
<record model="res.company" id="custom_module_company_name"> <field name="id">1</field> <field name="name">New name</field> </record>
Maybe that could work.
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: 7/5/13, 1:20 PM|
|Seen: 2257 times|
|Last updated: 3/16/15, 8:10 AM|