Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2280 Vistas

Hi, I try to add a new field in  "Stock Moves" report (Inventory) but I can not find the .py file.

I suppose there should be the .py file with

def _select(self): "  ",    def _from(self): "  ",    def _group_by(self): "  ",    def init(self): "  "  etc.

but stock.move model has nothing like that.

the .xml part is the following:

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

            <field name="name">stock.move.pivot</field>

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

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

                <pivot string="Stock Moves Analysis">

                    <field name="product_id" type="row"/>

                    <field name="location_dest_id" groups="stock.group_stock_multi_locations" type="row"/>

                    <field name="product_uom_qty" type="measure"/>

                </pivot>

            </field>

        </record> 



Avatar
Descartar
Mejor respuesta

Hi Jakub Parcheta

Pivot "Stock Moves" report in the Inventory App is created from creating Pivot view of stock.move object

If you want to Add your new fields in that Stock Move pivot report then just Inherit view and add your field

Thank you!

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   

Avatar
Descartar

@Jainesh Shah(Aktiv Software) Thank you for your reply. I have created a related field in stock.move model and also added it in the form and pivot view of this model (stock.view_move_pivot). But issue is when I specify this field as row or col, then its working fine. But when I use type="measure" then field value is not showing in pivot view.

Any idea please.

Publicaciones relacionadas Respuestas Vistas Actividad
0
dic 15
6759
0
ene 24
1657
0
may 24
1760
0
jun 21
1015
2
ago 20
5324