如何使用qweb模板引擎在openerp中设置多个文本框的名称? [英] how to set name of multiple textbox in openerp using qweb template engine?

查看:69
本文介绍了如何使用qweb模板引擎在openerp中设置多个文本框的名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码:

<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"/> 

推荐答案

要将文本框名称设置为item_value,您需要使用t-att属性:

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"/>

希望这会有所帮助!

这篇关于如何使用qweb模板引擎在openerp中设置多个文本框的名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆