Skip to Content
Menu
This question has been flagged
4 Replies
5495 Views

Is it possible to do inline editing in a table in an embedded view?   

I have tried this (see below), and it still opens a new window (form) when I try to edit a record.

Please help.


<field name="litho_Point_Id" widget="one2many_list" mode="tree" >

<tree editable="bottom" create="false" delete="false">

<field nolabel="1" name="my_sequence" invisible="1" />

<field string="$Record\ Id$" name="Record_Id" invisible="1" />

<field string="$Point\ Id$" required="1" name="Point_Id" />

<field string="$Layer\ Id$" name="Layer_Id" />

<field string="$Description$" readonly="1" name="description" />

<field string="${Depth}_{top}$" readonly="1" name="Depth_top" />

<field string="${Depth}_{bot}$" required="1" name="Depth_bot" />

<field string="${Elev}_{top}$" readonly="1" name="Elev_top" />

<field string="${Elev}_{bot}$" readonly="1" name="Elev_bot" invisible="1" />

<field string="$Graph\ Id$" name="Graph_Id" />

<field string="$Geo-Material\ Id$" name="Geo_Mat_Id" />

<field string="$Geo\ Id$" name="Geo_Unit_Id" />

<field string="$Ignore?$" name="IGNORE" />

<field string="${Analysis}_{Id}$" name="Analysis_Id" invisible="1" />

<field string="${Opened}$" name="Opened" invisible="1" />

</tree>
</field>

Avatar
Discard

Hi,

version Odoo ?

What is the type of your field litho_Point_Id which should be named litho_point_id without upper by convention?

I suppose a One2many, in this case field name should be litho_point_ids by convention, in this case no need to use widget="one2many_list", a list will be displayed by default. No need to use mode="tree" in your first code line too, because you are using already a widget which display a list and you are using the bottom attributes.

Try to use the minimum of code/attributes, instead to use too much code/attributes.

Regards

Best Answer

Hi,

there is a module for that, but in v8, you can migrate it in v11:

https://github.com/initOS/web/tree/8.0-tree-view-no-select/web_tree_no_open

or

define a form view in your one2many field after your  tree view definition, and set a text message in form like "form view is not available ;)", perhaps set at least one field invisible="1" in the form view, the view form will be displayed, but just with this message.

Regards



Avatar
Discard

Can you please give example to display form view in one2many field.

<group>

<field name="pages_ids">

<form>

Form view

</form>

</field>

</group>

pages_ids is a one2many field. I want to display form view for page_ids.

Author Best Answer

Thank you for your feedback.  I should have clarified, I am using Odoo 11.

...and tree view works just fine in Edit Mode.  But when a user clicks a record in the list in View Mode, a pop up with the information in the Record appears.  Is there a way to prevent this?

Avatar
Discard
Author

litho_Point_Id is a one2many field... I know.. I am not following conventions, in terms of notation... the issue is the I inherited code, and I cannot change it at this point...

Specify just the TREE option via the field view_mode attribute: <field name="view_mode">tree</field>

Hi Ray,

the problem occurs to a one2many field in a form view, how to apply view_mode type tree in the code given by Fernando ?

Related Posts Replies Views Activity
5
Aug 24
42974
2
Apr 24
948
3
Jun 23
3124
2
Jun 23
2366
3
Mar 23
8622