openerp 7 ir.sequence increment by 2 bug.?

xblade2k6

New Member
In my case +1 sequence number shows when I open the form. But when I save the record, it incremented again by 1. That means my sequence numbers now look like this:
  • EMP0010
  • EMP0012
  • EMP0014
Is it an issue with openerp or am I missing something in my code?\[code\]'register_no': fields.char('Register No', size=32, help='Register No', readonly=True), # employer wise ,estate wise 'employer_no': fields.char('Employer No', type='char', readonly=True),_defaults = { 'register_no': lambda obj, cr, uid, context: '/', 'employer_no': lambda obj, cr, uid, context: '/', }\[/code\]You can have a look on my code herei commented \[code\] def create(self, cr, uid, values, context=None): values['register_no'] = self.pool.get('ir.sequence').get(cr, uid, 'bpl.worker') values['employer_no'] = self.pool.get('ir.sequence').get(cr, uid, 'bpl.employer') return super(bpl_worker_registration, self).create(cr, uid, values, context=context)\[/code\]
 
Back
Top