跳至内容
菜单
此问题已终结
1 回复
31624 查看
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
4346
1
3月 15
3744
2
3月 15
4326
0
1月 20
3628
0
6月 19
3311