Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
6458 Weergaven

how can we remove /hide the kanban view button in the top-right corner of the product form in openerp v7.0.

Avatar
Annuleer
Beste antwoord

In OpenERP v7.0, the Kanban view button that appears in the top-right corner (alongside form and list view buttons) is controlled by the view_mode configuration of the corresponding action (window action) for the model. To remove or hide the Kanban view option for the Product form, you need to update the action definition and remove 'kanban' from the list of view modes.

Steps to remove the Kanban view button:


    Activate Developer Mode in your OpenERP instance.


    Navigate to:

    Settings → Technical → Actions → Window Actions


    Search for the window action associated with the Product model. This is usually named something like:


        Products (for product.template)


        Product Variants (for product.product)


    Open the relevant action record.


    In the View Modes field, you will typically see something like:

    tree,form,kanban


    Remove kanban so that it looks like:

    tree,form


    Save the changes.

    Once saved, the Kanban view button will no longer appear in the top-right corner of the Product view.

    Optional


    If you are developing a custom module and want to override the action programmatically using XML, you can redefine the view_mode like this:

    <record id="action_product_template" model="ir.actions.act_window">

        <field name="view_mode">tree,form</field>

    </record>

    Make sure the id matches the ID of the action you intend to override.


Hope it helps




Avatar
Annuleer
Beste antwoord

Hi,

In the product_view.xml file you need to change the code.

<record id="product_normal_action" model="ir.actions.act_window">

In this action you need to write:

<field name="view_mode">tree,form</field>

Instead of <field name="view_mode">tree,form,kanban</field>

<record id="product_normal_action_sell" model="ir.actions.act_window">

In this action you need to write:

<field name="view_mode">tree,form</field>

Instead of <field name="view_mode">kanban,tree,form</field>

Same for the this <record id="open_view_product_kanban1" model="ir.actions.act_window.view">

Also remove this code in this file:

<record id="open_view_product_kanban1" model="ir.actions.act_window.view">
            <field name="sequence" eval="1"/>
            <field name="view_mode">kanban</field>
            <field name="view_id" ref="product_kanban_view"/>
            <field name="act_window_id" ref="product_normal_action_sell"/>
        </record>

Thanks,
www.acespritech.com

Avatar
Annuleer
Auteur

hai. Thanks for the answer.

Auteur

by editing the the xml file this change will be refelected to all DB, How to make this change only for a particular database only.

In OpenERP UI go to Settings->Technical->Actions->Window Actions and then type product & it will give you some records & change in action in which view mode kanban is defined & also remove its kanban view reference.

Auteur

hi. remove kanban view from it . but nothing will be changed.