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.

0

How to modify 'kanban' element via inheritance?

By
Andrius Laukavičius
on 1/2/14, 10:31 AM 2,732 views

I tried to modify kanban element adding more attributes to it, but it gives me this error:

2014-01-02 14:22:23,653 23604 ERROR test2 openerp.addons.base.ir.ir_ui_view: <string>:1:0:ERROR:RELAXNGV:RELAXNG_ERR_NOELEM: Expecting an element , got nothing

My view:

    <record model="ir.ui.view" id="crm_case_kanban_view_leads_inherit">
        <field name="name">CRM - Leads Kanban Inherit</field>
        <field name="model">crm.lead</field>
        <field name="inherit_id" ref="crm.crm_case_kanban_view_leads"/>
        <field name="arch" type="xml">
            <kanban default_group_by="stage_id" position="replace">
                <kanban default_group_by="stage_id" edit="false" quick_create="false"/>
            </kanban>
        </field>
    </record>
1
Timo Talvitie
On 1/2/14, 7:08 PM

Hello Andrius, you can access the attributes of an element by using the position="attributes" syntax. See if the following works for you:

    <record model="ir.ui.view" id="crm_case_kanban_view_leads_inherit">
        <field name="name">CRM - Leads Kanban Inherit</field>
        <field name="model">crm.lead</field>
        <field name="inherit_id" ref="crm.crm_case_kanban_view_leads"/>
        <field name="arch" type="xml">
            <kanban position="attributes">
                <attribute name="edit">false</attribute>
                <attribute name="quick_create">false</attribute>
            </kanban>
        </field>
    </record>

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

0 follower(s)

Stats

Asked: 1/2/14, 10:31 AM
Seen: 2732 times
Last updated: 3/16/15, 8:10 AM