Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
5601 Lượt xem

I am developing a module which adds fields to stock picking view.

However, fields appear outside the fields/sheet frame.

Any ideas on why this could be happening? Thanks


Ảnh đại diện
Huỷ bỏ

can you paste part of the code ?

Câu trả lời hay nhất

Hello EM,

Please Try this. In this code, field will appear after the Source document(Origin).


<record id="stock_picking_form_view_inherit" model="ir.ui.view">

    <field name="name">stock.picking.form.view.inherit</field>

    <field name="model">stock.picking</field>

    <field name="inherit_id" ref="stock.view_picking_form"/>

    <field name="arch" type="xml">

        <xpath expr="/form/sheet/group/group/field[@name='origin']" position="after">

            <field name="custom_field"/>

        </xpath>

    </field>

</record>


Hope this will helps you.

Thanks,


Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

It was actually a mistake I made in the xpath expression.

It is as easy as always:    

<xpath expr="//group[@string='Locations']" position="before">

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 16
3721
4
thg 5 23
10513
1
thg 1 19
9601
0
thg 10 17
3424
3
thg 7 17
10545