Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
3970 Näkymät

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 !

Avatar
Hylkää
Tekijä Paras vastaus

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

Avatar
Hylkää
Paras vastaus

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.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
3
heinäk. 24
1352
0
marrask. 21
1925
1
marrask. 24
1616
5
heinäk. 24
92867
1
jouluk. 23
3034