Odoo 11-one2many-小部件过滤器

时间:2019-03-05 22:05:00

标签: odoo-11

我无法过滤有关one2Many_list代码的信息:

<field name="supplies" widget="one2many_list">
<tree>
    <field name="product_id" string="Product"/>
    <field name="supplies_category" string="Category"/>

</tree>

型号:

class printer_service_supplies(models.Model):
    _name = 'printer.service.supplies'
    product_id = fields.Many2one('product.template')
    supplies_category = fields.Many2one('printer.service.supplies.category')

我已经尝试了,

<field name="supplies" widget="one2many_list" context="'supplies_category': 'Ink' }"> 

<field name="supplies" widget="one2many_list" context="{'supplies_category': 1 }"> 

<field name="supplies" widget="one2many_list" domain=" 
[('supplies_category','=','Ink')]"> 

 <field name="supplies" widget="one2many_list" domain=" 
    [('supplies_category','=',1)]"> 

0 个答案:

没有答案