Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
14376 Lượt xem



I want to run my form with the 

widget="many2many_tags" in my selection

template.xml : 

<div class="col-md-7 col-sm-8 ">

<select id="membre_interne" name="x_membre_interne" class="form-control o_form_input_dropdown" >

<option value="" >Sélectionnez...</option>

<t t-foreach="users" t-as="user">

<option value="" t-att-value="user.login" >

<!--- <field name="x_membre_interne" widget="many2many_tags" /> -->
<t t-esc="user.login"/>

</option>

</t>
</select>
</div>

And in my model.py  my fields is already in many2many : 

x_membre_interne = fields.Many2many("res.users", string="many2many_tags" , readonly=0, website_form_blacklisted=0, Store=True)

Thanks for your help, 

Regards

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

hello

this same kind of example you can find inside the website_forum module.

while you post a new question, at that time you can select many tags  with the question.

you can take the reference from that.

Hope this will helps you.

Ảnh đại diện
Huỷ bỏ

+1 for Good example. It would have been more helpful if you would have post the code or git link that refer to code.

Tác giả

How can i post a screen shot in order to be more understanding?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 23
3321
1
thg 11 19
5613
1
thg 4 19
4687
0
thg 8 24
1493
1
thg 7 21
7349