Skip to Content
Menu
This question has been flagged
1 Reply
2279 Views

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
Discard
Best Answer

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
Discard

@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.

Related Posts Replies Views Activity
0
Dec 15
6759
0
Jan 24
1657
0
May 24
1760
0
Jun 21
1015
2
Aug 20
5324