Skip to Content
Menu
This question has been flagged
3 Replies
10758 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

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

You have mentioned Many2one in subject but it's one2many

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

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

<tree create="0">
Avatar
Discard
Related Posts Replies Views Activity
1
Nov 22
14647
2
Aug 22
3050
0
Jul 22
835
2
Oct 21
1436
1
Jun 21
1937