Odoo Help

0

How to render a view widget within Qweb template?

By
drecute
on 6/10/16, 9:10 AM 1,480 views

Hi,

In `res_partner_view.xml`, there's the `company_type` widget like this:

```<field name="company_type" widget="radio"

class="oe_edit_only"

on_change="on_change_company_type(company_type)"

options="{'horizontal': true}"/>```

I'll like to render this widget within Qweb template. How can I go about this?

I Appreciate you response.

0
Prakash Sharma
On 6/10/16, 12:45 PM

use t-field-options

<span t-field="pack.template_id.image_medium" t-field-options='{"widget": "image", "class": "img-rounded"}'/>

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

Question tools

1 follower(s)

Stats

Asked: 6/10/16, 9:10 AM
Seen: 1480 times
Last updated: 6/10/16, 12:45 PM