maharshi maharshi - 1 year ago 109
Python Question

Label Not Showing in Odoo-9

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?")


<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"/>

Answer Source

It will not show your field label because you have added field in <div>

Try with following code.


<field name="myfield"/>


<label for="myfield"/>
<field name="myfield"/>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download