在odoo网站上添加多个选择复选框

问题描述

使用Odoo 13 CE。我设法添加了一个模型,并创建了自定义的many2many字段,该字段在销售订单中显示(和起作用)。

我需要在网站结帐的“其他信息”选项上选中多个复选框。我以前设法获取了自定义文本以及选择字段,但是如果我添加复选框字段,则该页面不会转到下一步,请协助编写代码。不确定many2many复选框需要使用哪些选项。

当前使用:

<div class="form-group row form-field o_website_form_custom">
    <div class="col-lg-3 col-md-4 text-md-right">
        <label class="col-form-label" for="x_binding">Binding</label>
    </div> 
    <div class="col-lg-9 col-md-8">
        <div class="col-lg-9 col-md-8">                    
            <input type="checkbox" id="Center Pinning" name="x_binding" class="custom-control-input"/>
            <label for="Center Pinning" class="custom-control-label">Center Pinning</label>                          
        </div>
        <div class="col-lg-9 col-md-8">                    
            <input type="checkbox" id="Perfect Binding" name="x_binding" class="custom-control-input"/>
            <label for="Perfect Binding" class="custom-control-label">Perfect Binding</label>                          
        </div> 
        <div class="col-lg-9 col-md-8">                    
            <input type="checkbox" id="Section Sewing" name="x_binding" class="custom-control-input"/>
            <label for="Section Sewing" class="custom-control-label">Section Sewing</label>                          
        </div> 
    </div>
</div>          

更新:

经过几次试验和错误之后,我尝试了一种新的语法,但是,向前移动表格的唯一方法是删除输入中的“名称”,否则,该数据将不会保存在后端。一旦我把“名称”放回去,它将不再移至下一页:

<div class="custom-control custom-checkbox">                     
   <input type="checkbox" id="#120" class="custom-control-input" name="x_screening1" value="#120"/>
   <label for="#120" class="custom-control-label" name="x_screening1">#120</label>                           
</div> 

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...