from openerp.osv import orm
from ..model.sync_typo3 import Sync_typo3


class end_sponsorship_wizard(orm.TransientModel):
    _inherit = 'end.sponsorship.wizard'

    def child_depart(self, cr, uid, ids, context=None):
        wizard = self.browse(cr, uid, ids[0], context)
        child = wizard.child_id

        res = True
        if child.state == 'I':
            res = child.child_remove_from_typo3()

        res = super(end_sponsorship_wizard, self).child_depart(
            cr, uid, ids, context) and res

        return res or Sync_typo3.typo3_index_error(cr, uid, self, context)

from openerp.osv import orm
from ..model.sync_typo3 import Sync_typo3


class child_depart_wizard(orm.TransientModel):
    _inherit = 'child.depart.wizard'

    def child_depart(self, cr, uid, ids, context=None):
        wizard = self.browse(cr, uid, ids[0], context)
        child = wizard.child_id

        res = True
        if child.state == 'I':
            res = child.child_remove_from_typo3()

        res = super(child_depart_wizard, self).child_depart(
            cr, uid, ids, context) and res

        return res or Sync_typo3.typo3_index_error(cr, uid, self, context)

Correct wrong inheritance on sponsorship_typo3 child_depart wizard.
Correct wrong inheritance on sponsorship_typo3 child_depart wizard.

  from openerp.osv import orm
  from ..model.sync_typo3 import Sync_typo3
  
  
- class end_sponsorship_wizard(orm.TransientModel):
+ class child_depart_wizard(orm.TransientModel):
-     _inherit = 'end.sponsorship.wizard'
+     _inherit = 'child.depart.wizard'
  
      def child_depart(self, cr, uid, ids, context=None):
          wizard = self.browse(cr, uid, ids[0], context)
          child = wizard.child_id
  
          res = True
          if child.state == 'I':
              res = child.child_remove_from_typo3()
  
-         res = super(end_sponsorship_wizard, self).child_depart(
+         res = super(child_depart_wizard, self).child_depart(
              cr, uid, ids, context) and res
  
          return res or Sync_typo3.typo3_index_error(cr, uid, self, context)
  
Correct wrong inheritance on sponsorship_typo3 child_depart wizard.
## Code Before:
from openerp.osv import orm
from ..model.sync_typo3 import Sync_typo3


class end_sponsorship_wizard(orm.TransientModel):
    _inherit = 'end.sponsorship.wizard'

    def child_depart(self, cr, uid, ids, context=None):
        wizard = self.browse(cr, uid, ids[0], context)
        child = wizard.child_id

        res = True
        if child.state == 'I':
            res = child.child_remove_from_typo3()

        res = super(end_sponsorship_wizard, self).child_depart(
            cr, uid, ids, context) and res

        return res or Sync_typo3.typo3_index_error(cr, uid, self, context)

## Instruction:
Correct wrong inheritance on sponsorship_typo3 child_depart wizard.
## Code After:
from openerp.osv import orm
from ..model.sync_typo3 import Sync_typo3


class child_depart_wizard(orm.TransientModel):
    _inherit = 'child.depart.wizard'

    def child_depart(self, cr, uid, ids, context=None):
        wizard = self.browse(cr, uid, ids[0], context)
        child = wizard.child_id

        res = True
        if child.state == 'I':
            res = child.child_remove_from_typo3()

        res = super(child_depart_wizard, self).child_depart(
            cr, uid, ids, context) and res

        return res or Sync_typo3.typo3_index_error(cr, uid, self, context)
