Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4615 Zobrazení

Hello, I am trying to create a custom form view to stock.picking module. The view have the following structure:

<record id="raizs_stock_picking_form_view" model="ir.ui.view">
    <field name="name">raizs.stock.picking.form.view</field>
    <field name="model">stock.picking</field>
    <field name="priority" eval="20"/>
    <field name="arch" type="xml">
        <form string="Movimentos">
            <sheet>
                <group>
                    <field name="name"></field>
                    <field name="partner_id"></field>
                    <field name="state"></field>
                    <field name="scheduled_date"></field>
                </group>
                <notebook>
                    <page string="Produtos" >
                        <field name="id" invisible="1"/>
                        <field name="move_lines">
                            <tree>
                                ...tree content...
                            </tree>
                        </field>
                    </page>
                </notebook>
            </sheet>
        </form>
    </field>
</record>


I can load the view correctly on desktop, but when I try to do so on the odoo app, odoo uses a kanban view instead of the tree view I defined for the "move_lines" field. 

Is there a way I can prevent odoo from loading the kanban view and make it load the tree view I defined instead? 

Thank you!

Avatar
Zrušit
Nejlepší odpověď

U use mode="tree"

<record id="raizs_stock_picking_form_view" model="ir.ui.view">
    <field name="name">raizs.stock.picking.form.view</field>
    <field name="model">stock.picking</field>
    <field name="inherit_id" ref="stock_picking.form_view(To be stock_picking_form_id)"/>
    <field name="priority" eval="20"/>
    <field name="arch" type="xml">
                        <field name="move_lines" position="attributes">
                            <attribute name="mode">tree</attribute>
                        </field>
    </field>
</record>


<field name="move_lines" mode="tree">
<tree>
<field
name="display_name"/>
</tree>
</field>
Avatar
Zrušit
Autor

It did the job! Thank you

thank you so much,it's still useful

Related Posts Odpovědi Zobrazení Aktivita
0
led 24
4429
1
bře 15
4168
0
bře 15
3354
0
bře 24
2765
5
kvě 20
17297