This question has been flagged
3 Replies
9729 Views

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?

Avatar
Discard
Best Answer

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

Avatar
Discard

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.

Best Answer

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

You have mentioned Many2one in subject but it's one2many

Avatar
Discard
Best Answer

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

<tree create="0">
Avatar
Discard