Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

IndentationError: unindent does not match any outer indentation level

By
myriam
on 5/27/13, 1:40 PM 7,252 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 :-)

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

Davide Corio
on 5/27/13, 4:45 PM
1

Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--
4136
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 5/27/13, 5:33 PM

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 !

myriam
on 5/28/13, 6:59 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 5/27/13, 1:40 PM
Seen: 7252 times
Last updated: 3/16/15, 8:10 AM