Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
31641 Vistas
def _reste(self, cr, uid, ids, context=None):
        data = self.pool.get('hr.line.echeancier').browse (cr, uid, ids, context=context)
        if data.move_check:
           res_obj=self.pool.get('hr.avance.pret').browse(cr, uid, ids)
           res_obj.reste_payer = res_obj.montant_credit - res_obj.montant 
           return res_obj.reste_payer

i have this ERROR: IndentationError: unindent does not match any outer indentation level BUT i can't understand what is the problem hier ?? help please :-)

Avatar
Descartar

i suggest you to check your code with a clever code editor. maybe there's a mix of spaces and tabs

Mejor respuesta

Hi, for each block indentation must be 4 spaces, see your corrected code (corrected just for indentation).

def _reste(self, cr, uid, ids, context=None):
    data = self.pool.get('hr.line.echeancier').browse (cr, uid, ids, context=context)
    if data.move_check:
        res_obj=self.pool.get('hr.avance.pret').browse(cr, uid, ids)
        res_obj.reste_payer = res_obj.montant_credit - res_obj.montant 
        return res_obj.reste_payer

Bye

Avatar
Descartar
Autor

Thank you !

Publicaciones relacionadas Respuestas Vistas Actividad
1
ene 24
4352
1
mar 15
3750
2
mar 15
4334
0
ene 20
3636
0
jun 19
3324