Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3947 มุมมอง

Hi !


I'm trying to add a custom field from product_template in sales analyse pivot view.

I wrote in view/ xml files :
< record model="ir.ui.view" id="AH_sale_report_view_pivot">
  < field name="name">sale_enterprise.sale_report_view_pivot.inherit
  < field name="model">sale.report
  < field name="inherit_id" ref="sale_enterprise.sale_report_view_pivot"/>
  < field name="arch" type="xml">
      < xpath expr="//field[@name='categ_id']" position="after">
          < field name="product.product.x_studio_categorie_libelle" type="row"/>
      < /xpath>
   < /field>
< /record>

But updating answer unknown field


How to link to this field ?

Thanks a lot !

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

hum ok thanks !

This will make the DB bubble up......

So I went in Sale / quotation / Order line aka sale.order.line

I added related fields I needed...

Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Florent:

The field needs to be on the same model. From your example, it looks like your field is based on sale.report but the custom field is defined in product.product. You will need to add a related/computed field to sale.report and use that in your pivot view.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Pivot view in contacts แก้ไขแล้ว
3
ก.ค. 24
1348
0
พ.ย. 21
1914
1
พ.ย. 24
1594
Change the Position of field in Xpath แก้ไขแล้ว
5
ก.ค. 24
92848
1
ธ.ค. 23
3019