Hi,
Me again.  I have updated both py and xml to do the sequence, and the thing is 
not working.  
xml view

<?xml version="1.0" encoding="utf-8"?> 
<openerp> 
<data> 
&nbsp; &nbsp; <record id="crm_case_form_inherit" model="ir.ui.view"> 
&nbsp; &nbsp; &nbsp; &nbsp; <field name="name">crm.case.form.inherit</field> 
&nbsp; &nbsp; &nbsp; &nbsp; <field name="model">crm.case</field> 
&nbsp; &nbsp; &nbsp; &nbsp; <field name="type">form</field> 
&nbsp; &nbsp; &nbsp; &nbsp; <field name="inherit_id" ref="crm.crm_case-view"/> 
&nbsp; &nbsp; &nbsp; &nbsp; <field name="arch" type="xml"> 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <field colspan="4" 
name="name" select="1" position="after"> 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <field 
name="inq_name"/>&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </field>
&nbsp; &nbsp; &nbsp; &nbsp; </field> 
&nbsp; &nbsp; </record> 
&nbsp; &nbsp; <!--sequence for case.crm-->
&nbsp; &nbsp; <record id="crm_case_form_inherit" model="ir.sequence.type">
&nbsp; &nbsp; &nbsp; &nbsp; <field name="name">Enquiry Number</field>
&nbsp; &nbsp; &nbsp; &nbsp; <field name="code">crm.case</field>
&nbsp; &nbsp; </record>
&nbsp; &nbsp; &nbsp; &nbsp; <record id="crm_case_form_inherit" 
model="ir.sequence">
&nbsp; &nbsp; &nbsp; &nbsp; <field name="name">Enquiry Number</field>
&nbsp; &nbsp; &nbsp; &nbsp; <field name="code">crm.case</field>
&nbsp; &nbsp; &nbsp; &nbsp; <field name="prefix">EOQ\</field>
&nbsp; &nbsp; &nbsp; &nbsp; <field name="padding">5</field>
&nbsp; &nbsp; </record>
&nbsp; &nbsp; <!-- Sequences for case.crm-->
</data> 
</openerp>


py file

from osv import fields
from osv import osv

class crm_case&#40;osv.osv&#41;&#58;
&nbsp; &nbsp; _name='crm.case'
&nbsp; &nbsp; _inherit='crm.case'
&nbsp; &nbsp; _columns=&#123;'inq_name'&#58;fields.char&#40;'Enquiry 
Number',size=16&#41;,&#125;
&nbsp; &nbsp; _defaults=&#123;'inq_name'&#58; 
self.pool.get&#40;'ir.sequence'&#41;.get&#40;cr, uid, 'crm.case'&#41;,&#125;
crm_case&#40;&#41;


BTW the ir_sequence is populated with the xml values, but when creating a new 
case the field is not filed with EOQ\0001.

Thanks
s




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=35110#35110

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to