Skip to Content
Menu
This question has been flagged
1 Reply
30162 Views
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
Discard

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

Best Answer

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
Discard
Author

Thank you !

Related Posts Replies Views Activity
1
Jan 24
3392
1
Mar 15
3102
2
Mar 15
3226
0
Jan 20
2564
0
Jun 19
2341