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.
Installing my module I load several companies and I want to set my chart of account for each company. I do this in the post install hook.
super_user=registry['res.users'].browse(cr, SUPERUSER_ID, SUPERUSER_ID,context=None)
for company_id in company_ids:
registry['account.chart.template'].browse(cr, SUPERUSER_ID, chart_id,context=None).try_loading_for_current_company()
The code works but I'm in doubts about super_user.company_id=company_id.
Is it ok?
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: 9/23/16, 4:18 AM|
|Seen: 232 times|
|Last updated: 9/23/16, 5:04 AM|