Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Remove editable from tree view with a update view

By
Torsten Francke
on 8/15/13, 6:39 AM 5,084 views

Hi,

i want to remove the "editable" attribute from a tree view

<tree string="Phone Calls" editable="top" >

is the original view, i dont want to edit them, to stay update save.

I need somethink link:

<tree string="Phone Calls" editable="none" >

But this did not work. I get a error for not valid xml. Have someone a simular problem and a solution?

3
joseph d'souza
On 8/15/13, 11:14 AM

To remove editable in tree view you must use only tree string like below :

<tree string="Phone Calls" >

if you want to remove via inherit then try below exmple:

        <record id="view_form_editable_list" model="ir.ui.view">
        <field name="name">objectt.form.editable.list</field>
        <field name="model">object.object</field>
        <field name="inherit_id" ref="view_ref"/>
        <field name="groups_id" eval="[(6, 0, [ref('groups_if_any_in_tree_view'),ref('groups_if_any_in_tree_view'),])]"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='one2manyr_line']/tree" position="attributes">
                <attribute name="editable"/>
            </xpath>
        </field>
    </record

In groups_id you can add that groups which are in tree views fields so when this all applied group is active then editable is removed from tree view.

I know, but then i have to edit the original tree view, if i add this by a inherited view it will not work. Update the original view is not 'update save' and should be avoid

initOS GmbH, Torsten Francke
on 8/15/13, 11:42 AM
3
Torsten Francke
On 10/11/13, 1:16 PM

Correct solution is:

<?xml version="1.0"?>
<data>
<xpath expr="//tree" position="attributes">
                <attribute name="editable" />
            </xpath>
</data>
0
Omar OUHARI
On 9/12/15, 6:10 PM

I have the same issue and I am looking for a solution. If you have found anything please let me know. for the others what I want to do is to be able to open form in treeview witch have editable="bottom/top". I think it's a bug in V8 because this still possible in V6.1.

Regards.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/15/13, 6:39 AM
Seen: 5084 times
Last updated: 1/11/16, 1:45 AM