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.
in v8 which is the best way to reference to another model from within a parser?
Eg. I need to reference ir.config_parameter, but using self.env['ir.config_parameter'] I get error from Aeroo "env is not defined"
You can only use self.env inside the class if your class inherits models.model not osv.Model or other objects.
from openerp import models
#inside this class self.env can be use.
rml_parse is class which is defined inside /odoo/openerp/report/report_sxw.py file which is not inherits models.Model it simply inherits Object. So you cannot use self.env inside the parser class.
Hope this will help.
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/3/15, 10:40 AM|
|Seen: 967 times|
|Last updated: 11/29/15, 2:48 AM|