Hello, i would like to add a discount field to the model pricelist.partnerinfo, but this model hasn't got any related view. I tryed it with the view product.product_supplierinfo_form_view but id doesn't work. Any one knows wich is the correct view to use for this? Thanks.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
Solved using in my view the model product.supplier, inheriting the view product.product_supplierinfo_form_view, and making a new class on my addon based on pricelist.partnerinfo with a new field for the discount.
My class:
class pricelist_partnerinfo(osv.osv):
_name = "pricelist.partnerinfo"
_inherit = "pricelist.partnerinfo"
_columns = {
'discount': fields.float('Discount (%)', digits=(16,2)),
}
pricelist_partnerinfo()
My view:
<record model="ir.ui.view" id="purchase_discount_product_supplierinfo">
<field name="name">purchase_discount.product.supplierinfo</field>
<field name="model">product.supplierinfo</field>
<field name="inherit_id" ref="product.product_supplierinfo_form_view"/>
<field name="arch" type="xml">
<field name="price" position="after">
<field name="discount"/>
</field>
</field>
</record>
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
1
Nov. 24
|
1388 | ||
|
4
Mai 18
|
17638 |