跳至內容
選單
此問題已被標幟
2 回覆
11071 瀏覽次數

Hi,

Sorry if this question is already answered on the forum but I could not find it... How do I add the VAT number of the customer (BTW number for Belgium) to my invoices? I think this is located here: res.partner.vat but when adding it to in OpenOffice it does not show on a new invoice. This is my data:

[[ (o.partner_invoice_id and o.partner_invoice_id.title and o.partner_invoice_id.title.name) or '' ]] [[ (o.partner_invoice_id and o.partner_invoice_id.name) or '' ]] [[ o.partner_invoice_id and display_address(o.partner_invoice_id) ]] [[ o.partner.vat_id ]]

頭像
捨棄

Hi Kenny, I mean, there is an option of marking/tagging the question as solved. That allwos you to choose, why it is solved, and has an option to appoint the correct answer.

最佳答案

Try o.partner_invoice.vat instead of o.partner.vat_id

The field is called vat, in the table/model res.partner.

o.partner_invoice is the reference to the partner who will get the invoice, I can imagine you want to use the VAT from this account (if the VAT exists).

You want to use o.partner, which does not exist on the object/model sale.order. If you want to use the customer, not the invoice_partner, use o.partner_id.vat

So use o.partner_invoice.vat or o.partner_id.vat

頭像
捨棄
作者

Thank you very much!

作者 最佳答案

Answer by Patrick is working.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
12月 20
5493
3
7月 19
17130
1
4月 16
3678
0
3月 15
3997
0
3月 15
4135