Code review comment for lp:~initos.com/account-invoice-report/7.0-fix_lang_for_draft

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Katja,

You're right that current code doesn't work, but this is because the line that made the work is incorrect:

try :
    lang = self.browse(cr, uid, inv_id).partner_id.lang

inv_id is an id, not a list of ids, so you don't need to put index 0 to access browse_record.

I think it's better to simply fix this instead of changing all the code you put.

Regards.

review: Needs Fixing (code review)

« Back to merge proposal