<commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
#    Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
#    Releasing children from poverty in Jesus' name
#    @author: <NAME> <<EMAIL>>
#
#    The licence is in the file __openerp__.py
#
##############################################################################
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)<commit_msg>Correct wrong inheritance on sponsorship_typo3 child_depart wizard.<commit_after># -*- encoding: utf-8 -*-
##############################################################################
#
#    Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
#    Releasing children from poverty in Jesus' name
#    @author: <NAME> <<EMAIL>>
#
#    The licence is in the file __openerp__.py
#
##############################################################################
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)
{'fraction_non_alphanumeric': 0.24743777452415813, 'fraction_numerical': 0.011224987798926306, 'mean_word_length': 3.7453703703703702, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3009195', 'n_tokens_mistral': 647, 'n_tokens_neox': 598, 'n_words': 153}