Odoo Help


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.


Function is not getting called in openerp

on 2/8/16, 9:03 AM 361 views

I am using openerp 7 api for my development.I want to inherit report of partner ledger.The function is not executing, I think the syntax is correct but I not getting where I have done mistake.

from openerp.osv import fields,osv
class report_partnerledger(osv.AbstractModel):
    _inherit = 'report.account.report_partnerledger'

    def _check_status(self, cr, uid, ids, context=None):
        print "Entering check status func"
        iscredit = self.cr.execute("SELECT l.credit FROM account_move_line AS l")
        if(iscredit == 0):
            docm="Refunded Invoice"
        print docm
        return docm

    _columns = {
        'doc_info': fields.function(_check_status,type='char'),

Samantha Cruz
On 2/8/16, 7:44 PM

Is '_check_status' is inherited method? If yes, try to super the original '_check_status' method if you added codes to it.

No it is my own method not inherited

on 2/9/16, 12:06 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

1 follower(s)


Asked: 2/8/16, 9:03 AM
Seen: 361 times
Last updated: 2/8/16, 7:44 PM