Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2336 Vues

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
Ignorer
Meilleure réponse

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
Ignorer

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

Publications associées Réponses Vues Activité
0
déc. 15
6849
0
janv. 24
1748
0
mai 24
1853
0
juin 21
1085
2
août 20
5400