RuntimeError: maximum recursion depth exceeded while calling a Python object I got this Error when I use split function of python for Selection field or Many2one field in odoo 9.
I want to to split string and concate with other string but first I've to split it other one. but it showing above error for split(). Please help me to get out of it.....
This is .py file
from openerp import models, fields, api
import sys
sys.setrecursionlimit(1500)
class erp_product_template(models.Model):
_name='product.template'
_inherit='product.template'
erp_sub=fields.Many2one("product.sub11",string="Sub Category")
erp_cats=fields.Many2one("product.maincats",string="Main Category")
temp1=fields.Char("Testing Char Field")
temp1=erp_sub.split("/")
class erp_MainModal(models.Model):
_name="product.maincats"
name=fields.Selection([('SL0','SL0'),('SL1','SL1'),('SL2','SL2'),('SL3','SL3'),('SL4','SL4'),('SL5','SL5'),('SL6','SL6'),('SL7','SL7'),('SL8','SL8')])
class erp_sub11(models.Model):
_name="product.sub11"
name=fields.Selection([('ECDS0','SL0/ECDS0'),('ECDS1','SL0/ECDS1'),('ECDS2','SL0/ECDS2'),('ECDS3','SL0/ECDS3')])
class erp_sub_sub1(models.Model):
_name="product.sub_sub1"
name=fields.Selection([('08','ECDS0/08'),('09','ECDS0/09'),('10','ECDS2/10'),('11','ECDS3/11')])
This is xml file
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="erp_product_template_tree_view" model="ir.ui.view">
<field name="inherit_id" ref="product.product_template_tree_view" />
<field name="model">product.template</field>
<field name="arch" type="xml">
<field name="type" position="after">
<field name="erp_cats"/>
</field>
</field>
</record>
<record id="erp_product_template_only_form_view" model="ir.ui.view">
<field name="inherit_id" ref="product.product_template_only_form_view" />
<field name="model">product.template</field>
<field name="arch" type="xml">
<field name="type" position="after">
<field name="erp_cats"/>
<field name="erp_sub"/>
</field>
</field>
</record>
</data>
</openerp>