计算时Qweb报表错误非类型“对象不可调用”

2024-05-16 22:08:51 发布

您现在位置:Python中文网/ 问答频道 /正文

全部 我知道这要求的不仅仅是时间,但我有太多的时间来解决这个问题。在

class swiss_customs_invoice_report(report_sxw.rml_parse):

  def __init__(self, cr, uid, name, context):
    super(swiss_customs_invoice_report, self).__init__(cr, uid, name, context)
    self.localcontext.update({

        'get_nw_total':self.get_nw_total,
    })

    self.nw_total=0.0

  def get_nw_total(self):
    return self.nw_total



class swiss_customs_invoice(osv.AbstractModel):
_name = 'report.account_invoice_ept.report_invoice_document_ept_b2c'
_inherit = 'report.abstract_report'
_template = 'account_invoice_ept.report_invoice_document_ept_b2c'
_wrapped_report_class = swiss_customs_invoice_report

这是我的类来描述那个和其他我的XML

^{pr2}$

那么,如何解决这个问题,一直给我错误,即非类型'对象不可调用',而在计算和使用

o.get_nw_total() docs.get_nw_total()

其他所有的灵魂都在堆栈中。在


Tags: nameselfreportgetinitdef时间invoice