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 added a custom field to the project and I'd need to access it from within the invoice.
Which is the syntax to use in the t-field?
By using o.invoice_line.account_analytic_id.property_name I can print the value of property_name from the analytic account related to that invoice line, but I am not able to reach the related project, I tried things like:
I tried another approach, without luck:
<span t-esc="self.pool.get('project.project').search([('analytic_account_id', '=', o.invoice_line.account_analytic_id.id)]).x_customfield" />
It fails with the error "'NoneType' object has no attribute 'pool'" since the QWeb renderer does not understand the "self" of "self.pool"
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: 12/11/14, 6:09 AM|
|Seen: 537 times|
|Last updated: 3/16/15, 8:10 AM|