lundi 16 décembre 2019

How can i show checkbox in Odoo 12?

I want to show checkbox in Odoo 12. I try with my code but it's not working Please help me. Here is my code of module.

class ProductTemplate(models.Model):
    _inherit = 'product.template'
    field_name1 = fields.Boolean(string="Product Barcode Generator")

Here is view Code:

   <record id="product_template_form_parent_inherit" model="ir.ui.view">
        <field name="name">product.template.form.parent.inherit</field>
        <field name="model">product.template</field>
        <field name="inherit_id" ref="product.product_template_form_view"/>
        <field name="arch" type="xml">
            <xpath expr="//notebook" position="inside">
                <page string="Product Barcode Generator">
                    <label for="field_name1"/>
                    <field name="field_name1" />
                </page>
            </xpath>
        </field>
    </record>



Aucun commentaire:

Enregistrer un commentaire