Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
31803 Visualizações
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
Cancelar

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

Melhor resposta

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
Cancelar
Autor

Thank you !

Publicações relacionadas Respostas Visualizações Atividade
1
jan. 24
4522
1
mar. 15
3835
2
mar. 15
4515
0
jan. 20
3784
0
jun. 19
3489