old_contents: # -*- coding: utf-8 -*-
  ##############################################################################
  #
  #    OpenERP, Open Source Management Solution
  #    Addons modules by CLEARCORP S.A.
  #    Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
  #
  #    This program is free software: you can redistribute it and/or modify
  #    it under the terms of the GNU Affero General Public License as
  #    published by the Free Software Foundation, either version 3 of the
  #    License, or (at your option) any later version.
  #
  #    This program is distributed in the hope that it will be useful,
  #    but WITHOUT ANY WARRANTY; without even the implied warranty of
  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  #    GNU Affero General Public License for more details.
  #
  #    You should have received a copy of the GNU Affero General Public License
  #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  #
  ##############################################################################
  from osv import fields, osv
  
  class hr_contract(osv.osv):
      _inherit = 'hr.contract'
      
      _columns = {
          'name': fields.char('Contract Reference', size=64, required=True, readonly=True),
      }
      
      _defaults = {
          'name': lambda self,cr,uid,ctx=None: self.pool.get('ir.sequence').get(cr, uid, 'hr.contract', context=ctx) or '/',
      }
  
  
new_contents: # -*- coding: utf-8 -*-
  ##############################################################################
  #
  #    OpenERP, Open Source Management Solution
  #    Addons modules by CLEARCORP S.A.
  #    Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
  #
  #    This program is free software: you can redistribute it and/or modify
  #    it under the terms of the GNU Affero General Public License as
  #    published by the Free Software Foundation, either version 3 of the
  #    License, or (at your option) any later version.
  #
  #    This program is distributed in the hope that it will be useful,
  #    but WITHOUT ANY WARRANTY; without even the implied warranty of
  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  #    GNU Affero General Public License for more details.
  #
  #    You should have received a copy of the GNU Affero General Public License
  #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  #
  ##############################################################################
  from osv import fields, osv
  
  class HrContract(osv.osv):
      _inherit = 'hr.contract'
      
      _columns = {
          'name': fields.char('Contract Reference', size=64, readonly=True),
      }
      
      def create(self, cr, uid, vals, context=None):
          nombre = self.pool.get('ir.sequence').get(cr, uid, 'hr.contract', context=context) or '/'
          vals['name'] = nombre
          result = super(HrContract, self).create(cr, uid, vals, context=context)
          return result
  
  
subject: Fix secuence in hr_contract_name