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

Hi all,

I'm trying to add two new columns to the Quotation and SO list view on my v7 of openERP on windows. I would like to add the sale margin and the margin percent to the view. I know that I must add some lines in the sale_margin.xml. What I have right now is:

<record model="ir.ui.view" id="sale_margin_quotation_tree">
  <field name="name">sale.quotation.margin.view.tree</field>
  <field name="model">sale.order</field>
  <field name="inherit_id" ref="sale.view_quotation_tree"/>
  <field name="arch" type="xml">   
    <xpath expr="//field[@name='partner_id']" position="after">
      <field name="margin_percent" string="Margin Percent"/>
      <field name="margin" />
    </xpath>
  </field>
</record>

I also know that I must add some lines in the sale_margin.py or the sale.py, but I don't know what to add.

Any help is appreciated.

頭像
捨棄
最佳答案

Only You need to add the module name "sale_margin" in the manifest - depends


 'depends': [ 'base', 'sale_margin', ]


 Thank You!

頭像
捨棄
最佳答案

Hi,

That fields are already added in sale_margin, so in the module which you are inheriting the list view just give the sale_margin module as depends as following.

'depends': [ 'base', 'sale_margin', ] 

Regards

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
4月 16
8379
4
1月 24
12656
1
3月 15
4553
3
10月 24
43630
1
8月 16
8055