跳至內容
選單
此問題已被標幟
1 回覆
31613 瀏覽次數
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 :-)

頭像
捨棄

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

最佳答案

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

頭像
捨棄
作者

Thank you !

相關帖文 回覆 瀏覽次數 活動
1
1月 24
4342
1
3月 15
3739
2
3月 15
4317
0
1月 20
3626
0
6月 19
3303