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

Adding fields to stock picking view: how to ensure they are contained within the sheet area

By
E.M.
on 2/16/16, 5:45 AM 377 views

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


can you paste part of the code ?

Ahmed M.Elmubarak
on 2/16/16, 6:24 AM
1

Jignesh Mehta

--Jignesh Mehta--
2087
| 6 4 8
Surat, India
--Jignesh Mehta--


Jignesh Mehta
On 2/16/16, 7:10 AM

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,


0
E.M.
On 2/16/16, 8:44 AM

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

It is as easy as always:    

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

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: 2/16/16, 5:45 AM
Seen: 377 times
Last updated: 2/16/16, 8:44 AM