【发布时间】:2017-08-02 06:11:57
【问题描述】:
我在 odoo9 中创建了一个自定义发票报告。在那我想显示客户送货地址。我将它显示在 odoo10 中,如下所示:
<b> Name: </b><t t-esc="o.partner_shipping_id.name"/><br/>
<b> Address: </b><t t-esc="o.partner_shipping_id.street"/><br/>
但是在 Odoo9 中使用它时,它会抛出错误。
QWebException: "'account.invoice' object has no attribute 'partner_shipping_id'" while evaluating
'o.partner_shipping_id.name'
有人可以帮我解决这个问题吗?
【问题讨论】:
-
在odoo 8中,模型
account.invoice没有这样的字段 -
在odoo 8中,添加
<address t-field="o.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}"/> -
感谢您的回复。但它只显示客户地址。我也想显示收货地址。不知道Odoo8和Odoo9有没有类似的字段,但是我用的是Odoo9。还有其他建议吗??