RuntimeError: maximum recursion depth exceeded while calling a Python object while using split() function in odoo
<p><strong>RuntimeError: maximum recursion depth exceeded while calling a Python object</strong> 
 I got this Error when I use split function of python for Selection field or Many2one field in odoo 9.</p>

<p>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..... </p>

<p>This is .py file</p>

<pre><code>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')])   
</code></pre>

<p>This is xml file</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;openerp&gt;
&lt;data&gt;
&lt;record id="erp_product_template_tree_view" model="ir.ui.view"&gt;
&lt;field name="inherit_id" ref="product.product_template_tree_view" /&gt; 
&lt;field name="model"&gt;product.template&lt;/field&gt;
&lt;field name="arch" type="xml"&gt;
&lt;field name="type" position="after"&gt; 
&lt;field name="erp_cats"/&gt;   
&lt;/field&gt;
&lt;/field&gt;
&lt;/record&gt;

&lt;record id="erp_product_template_only_form_view" model="ir.ui.view"&gt;
&lt;field name="inherit_id" ref="product.product_template_only_form_view" /&gt; 
&lt;field name="model"&gt;product.template&lt;/field&gt;
&lt;field name="arch" type="xml"&gt;
&lt;field name="type" position="after"&gt;   
&lt;field name="erp_cats"/&gt;  
&lt;field name="erp_sub"/&gt; 
&lt;/field&gt;
&lt;/field&gt;
&lt;/record&gt;
&lt;/data&gt;
&lt;/openerp&gt;
</code></pre>

<p>You can increase the recursion depth with</p>

<pre><code>import sys
sys.setrecursionlimit($)   # replace $ with any number greater than 1000
</code></pre>

<p>`</p>

python xml odoo-9