Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2289 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit

@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 Odpovědi Zobrazení Aktivita
0
pro 15
6781
0
led 24
1668
0
kvě 24
1764
0
čvn 21
1022
2
srp 20
5348