I created a boolean field. The boolean is showing but the label isn't.
class product_pricelist_inherit(models.Model):
_inherit = 'product.pricelist'
myfield= fields.Boolean(string="Is this Pricelist Eligible for Me?")
XML:
<odoo>
<record id="product_product_pricelist_view" model="ir.ui.view">
<field name="model">product.pricelist</field>
<field name="inherit_id" ref="product.product_pricelist_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="myfield"/>
</field>
</field>
</record>
</odoo>
It will not show your field label because you have added field in <div>
Try with following code.
Replace
<field name="myfield"/>
with
<label for="myfield"/>
<field name="myfield"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With