Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
31602 Tampilan
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
Buang

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

Jawaban Terbai

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
Buang
Penulis

Thank you !

Post Terkait Replies Tampilan Aktivitas
1
Jan 24
4334
1
Mar 15
3739
2
Mar 15
4306
0
Jan 20
3621
0
Jun 19
3297