Could someone help me to understand the following sentence for QWeb reports? I see what it does, I just do not understand how it works. What is widget, what is contact, what is fields, what is name, what is no_marger. And why that &quot?

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

When you define the attribute t-field on a html node, not available for ("table", "tbody", "thead", "tfoot", "tr", "td", "li", "ul", "ol", "dl", "dt", "dd", "t"), you are saying that your t-field expression result could be modified by the values of t-field-options attribute that let you specify a number a dict items depending of every case but most important ones is the widget item that let you change the default field widget in qweb to render the field result, in your case the widget contact is assigned to the class openerp.addons.base.ir.ir_qweb.Contact that is the model 'ir.qweb.field.contact'. When you define the widget in the t-field-options dict string you are saying: Search for a model with the name prefixed with 'ir.qweb.field.' plus the t-field-options key widget value and use it to render the result of the t-field expression. In the case of the widget contact the implementation of the method record_to_html use the fields key to render the template 'contact' and in that template the 'no_marker' key is used.

That's the use of those t-field-options keys. The attribute t-field-options is a bag, a dict string that gets evaluated and passed to the default widget for the field type or for the widget option value and used to change the default render way of the field. In the case of the contact widget it operate over many2one values like o.partner_id you define it

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just
use the commenting tool. Please remember that you can always revise your answers
- no need to answer the same question twice. Also, please don't forget to vote
- it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines