i'm using odoo 9 and i have created a custom module for product barcode generation. Everytime when i press the button 'generate the ean13 ' this error shows and i don't know what to do .
Any help please this is my code
_______________________________________________________________________________________________
product_view.xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_product_category_simple_ean_form" model="ir.ui.view">
<field name="name">product.category.form</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view" />
<field name="arch" type="xml">
<field name="type" position="after">
<field name="ean_sequence_id" domain="[('barcode_sequence', '=', 1)]"
context="{'default_name': name and 'EAN ' + name or 'EAN', 'default_barcode_sequence': 1}" />
<newline />
</field>
</field>
</record>
<record id="view_product_simple_ean_form" model="ir.ui.view">
<field name="name">product.template.product.form.barcode</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view" />
<field name="arch" type="xml">
<field name="barcode" position="after">
<button string="Generate the EAN13" name="generate_ean13"
attrs="{'invisible': [('barcode', '!=', False)]}"
type="object" colspan="2" />
</field>
</field>
</record>
</odoo>
__________________________________________________________________________________________
product.py
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_product_category_simple_ean_form" model="ir.ui.view">
<field name="name">product.category.form</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view" />
<field name="arch" type="xml">
<field name="type" position="after">
<field name="ean_sequence_id" domain="[('barcode_sequence', '=', 1)]"
context="{'default_name': name and 'EAN ' + name or 'EAN', 'default_barcode_sequence': 1}" />
<newline />
</field>
</field>
</record>
<record id="view_product_simple_ean_form" model="ir.ui.view">
<field name="name">product.template.product.form.barcode</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view" />
<field name="arch" type="xml">
<field name="barcode" position="after">
<button string="Generate the EAN13" name="generate_ean13"
attrs="{'invisible': [('barcode', '!=', False)]}"
type="object" colspan="2" />
</field>
</field>
</record>
</odoo>