跳至內容
選單
此問題已被標幟
1 回覆
2335 瀏覽次數

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> 



頭像
捨棄
最佳答案

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

   

頭像
捨棄

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

相關帖文 回覆 瀏覽次數 活動
0
12月 15
6849
0
1月 24
1748
0
5月 24
1852
0
6月 21
1085
2
8月 20
5400