如何在Odoo中制作一个内联树multi2many字段看起来没问题?

时间:2014-09-19 04:27:21

标签: openerp odoo openerp-8

我有一个带有many2many字段require_weekday的树视图:

<record model="ir.ui.view"
       id="sale_order_email_collection_form">
 <field name="name">sale.order_email.collection.form</field>
 <field name="model">sale.order_email.collection</field>
 <field name="arch" type="xml">
   <form string="Collection">
     <group>
       <field name="name"/>
     </group>
     <field name="emails">
       <tree string="Lines" editable="bottom">
         <field name="required_weekday"/>
       </tree>
     </field>
   </form>
 </field>
</record>

当我点击many2many字段时,它基本上无法使用覆盖树视图的一些蓝色文字,因此无法分辨出发生了什么。

enter image description here

是否可以使其正常工作?

2 个答案:

答案 0 :(得分:6)

您可以在xml中使用widget =“many2many_tags”。 例如:

<field name="fields_name" widget="many2many_tags"/>

答案 1 :(得分:1)

您可以在xml中使用widget="one2many"

这会根据需要将many2many表单视图更改为one2many

例如:

<field name="your_many2many_field" widget="one2many">
    <tree string="your string" editable="top/bottom">
        <field name="your_fields"/>#Define all your fields for tree view
    </tree>
</field?