Reputation: 125
First of all I'm kinda new to Odoo and I'm trying to understand some Basic logic. I created my own Report based on the Basic Report of Odoo.
There are a lot of fields like t-field="o.date_invoice"
or t-field="o.partner_id
etc. which work really fine but where can I find all functions? Is there any list?
For Example I Need a Field for the order date and for the print date or for a Customer ID.
Upvotes: 2
Views: 1747
Reputation: 9620
With a t-field
attribute you can access and print fields from the actual model or from a related model, for example with the following element you can print the content of the phone column (field) of the actual record:
<span t-if="o.phone"
t-field="o.phone" />
Explanation of t-field
in the documentation:
The t-field directive can only be used when performing field access (a.b) on a "smart" record (result of the browse method). It is able to automatically format based on field type, and is integrated in the website's rich text edition.
Check this link for further information if you want to build reports and this one, where you can read about some the elements that you can use in Qweb
In addition, you can check here a list of some attributes that you can use in a Qweb template
Upvotes: 0