在网站中填写表格以更新或添加成员

时间:2016-04-22 15:28:15

标签: xml openerp

我想创建一个HTML页面,其中包含可以更新成员或成员的表单。我创建表单,字段和输入之间的链接,我必须添加什么以更新或添加成员?

<form action="" class="oe_signup_form" role="form" method="post" t-attf-action="" t-if="not message"
onsubmit="" enctype="">

<div class="form-group">

<label for="name" class="control-label">

<input type="text" name="name" id="name" t-att-value="name" class="form-control" autofocus="autofocus" required="required"/>
Name 
</label>
</div>

<div class="clearfix oe_login_buttons">

<a t-attf-href="" class="btn btn-link pull-right">Valider</a>

<button type="submit" class="btn btn-primary pull-left">Valider</button>
</div>
</form>

由于

1 个答案:

答案 0 :(得分:0)

您希望使用html表单向odoo模型添加记录,据我了解。

第一步是制作html页面表格。

第二步是创建Web控制器,它将处理来自表单的发布请求

使用request.registry [] .create()将记录添加到模型

的第三步

更详细的例子阅读odoo源代码