how to set name of multiple textbox in openerp using qweb template engine?

让人想犯罪 __ 提交于 2019-12-06 16:48:05

问题


Here is my code:

<tr t-foreach="keyword" t-as="item"><td><t t-esc="item_value"/></td><td><input type="text" name=""/></td></tr>  

So here, Textbox are generated dynamically.

Now I want to set textbox name to the value that is generated on

<t t-esc="item_value"/> 

回答1:


To set the text box name to item_value you need to use the t-att attribute:

<input type="text" t-att-name="item_value"/>

Hope this helps!



来源:https://stackoverflow.com/questions/21778744/how-to-set-name-of-multiple-textbox-in-openerp-using-qweb-template-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!