Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3793 Weergaven

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="Invoice"
        else:
            docm="Refunded Invoice"
        print docm
        return docm

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

Avatar
Annuleer
Beste antwoord

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

Avatar
Annuleer
Auteur

No it is my own method not inherited

Gerelateerde posts Antwoorden Weergaven Activiteit
11
sep. 16
25356
0
dec. 15
6767
5
nov. 15
5648
2
okt. 15
5614
1
jul. 15
7489