Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
12986 มุมมอง

Hi,

here, i have mentioned the code:

                    <notebook>
                            <page string="Test Lines">
                            <field name="labtest_type_line" options="{'no_create': True, 'no_create_edit':True}" >
                                <tree string="Test Name" editable="bottom" >
                                    <field name="labtest_type_id" required="1"/>
                                    <field name="state" invisible="1"/>
                                   
                                    <field name="sample_value"/>
                                    <field name="sample_value_per"/>
                                    <field name="ontruck_value" attrs="{'invisible': [('state', '=', 'draft')]}"/>
                                    <field name="ontruck_value_per" attrs="{'invisible': [('state', '=', 'draft')]}"/>
                                   
                                    <field name="final_value" attrs="{'invisible': [('state', 'in', ('draft','sample'))]}"/>
                                    <field name="final_value_per" attrs="{'invisible': [('state', 'in', ('draft','sample'))]}"/>
                                </tree>
                            </field>
                            </page>
                        </notebook>

Can anyone tell what i did mistake?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi V,
<tree string="Test Name" editable="bottom"  create="false">

You have mentioned Many2one in subject but it's one2many

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Mr. V,

Please Try from below,

options="{'no_quick_create':True,'no_create_edit':True,'no_open': True,}"

OR

<field name="Your_many2one_field" widget="selection">

For your ref:

  • no_quick_create - It will remove Create and edit... option.
  • no_create_edit - It will remove Create "entered text" option.
  • no_create - no_quick_create and no_create_edit combined.
  • no_open - in read mode: do not render as a link.

Thanks,

Dipak

อวตาร
ละทิ้ง

Hello Dipak,

Thanks for your answer!

I applied your solution but when I clicked on 'Search More..' option inside M2O field, I see 'Create' button.

คำตอบที่ดีที่สุด

just remove editable="bottom" and add create="0" to your tree tag.

<tree create="0">
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.พ. 25
5899
1
ธ.ค. 24
1450
1
พ.ย. 22
15963
2
ส.ค. 22
4476
0
ก.ค. 22
836