Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1385 Lượt xem

Hello,


I’m having a really difficult time getting a field added to the pricelist rule form. I am needing to add a field called “purchase_fixed_price” that I’ve added to the model product.pricelist.item 


Can someone please help? I would like to add it below “price”


Thank you



Ảnh đại diện
Huỷ bỏ

is that the sales pricelist view or the vendor pricelist view?

Câu trả lời hay nhất

Hi,
You can refer the below code to add the ‘purchase_fixed_price’ field in to product.pricelist.item form view.

< record id="product_pricelist_item_form_view" model="" rel="ugc">ir.ui.view">
   < field name="name">product.pricelist.item.form
   < field name="model">product.pricelist.item
   < field name="inherit_id" ref="product.product_pricelist_item_form_view"/>
   < field name="arch" type="xml">
< xpath expr="//field[@name='product_tmpl_id']" position="after">
               < field name="‘purchase_fixed_price’"/>
< /xpath>
    < /field>
< /record>

Regards

Ảnh đại diện
Huỷ bỏ
Tác giả

Wow that was a lot better than traversing the groups and sheets. Thank you Cybrosys. You’re a huge positive to the Odoo community.