Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3967 มุมมอง

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'),
    }

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
How to convert number to word in oddo? แก้ไขแล้ว
11
ก.ย. 16
25572
0
ธ.ค. 15
6932
5
พ.ย. 15
5795
2
ต.ค. 15
5749
1
ก.ค. 15
7630