到达发票报告中的字段
Reach field in invoice report
我需要用现场注释扩展发票报告。但我收到该字段不存在的错误。我被困住了,不知道如何到达那个领域。也尝试过 partner_id.note
但也出现错误。
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//div[@class='page']/*[last()]" position="after">
<div class="row">
<div class="col-xs-6">
<span t-esc="o.note"/><br/>
<div class="left_sign_block">
<span>Note</span>
</div>
</div>
</div>
</xpath>
</template>
</data>
</openerp>
class AccountInvoiceTax(models.Model):
_inherit = 'account.invoice.tax'
note = fields.Text(related='tax_id.note', string='Note')
QWebException: "'account.invoice' object has no attribute 'note'" while evaluating 'o.note'
您扩展了模型 account.invoice.tax
而不是 account.invoice
。错误信息是正确的。因此,您要么延长发票,要么必须使用发票税行 (tax_line_ids
) 中的 note
。
我需要用现场注释扩展发票报告。但我收到该字段不存在的错误。我被困住了,不知道如何到达那个领域。也尝试过 partner_id.note
但也出现错误。
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//div[@class='page']/*[last()]" position="after">
<div class="row">
<div class="col-xs-6">
<span t-esc="o.note"/><br/>
<div class="left_sign_block">
<span>Note</span>
</div>
</div>
</div>
</xpath>
</template>
</data>
</openerp>
class AccountInvoiceTax(models.Model):
_inherit = 'account.invoice.tax'
note = fields.Text(related='tax_id.note', string='Note')
QWebException: "'account.invoice' object has no attribute 'note'" while evaluating 'o.note'
您扩展了模型 account.invoice.tax
而不是 account.invoice
。错误信息是正确的。因此,您要么延长发票,要么必须使用发票税行 (tax_line_ids
) 中的 note
。