Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2515 Visualizzazioni

In Odoo v15 I am trying to display customer address from Sales Order on delivery slip (report - printed document).

Customer and delivery address are not the same on sales order and on report when I print delivery slip by default it is showing me the same information for contact and delivery address. I tested this on runbot in v16 also - it is strange.

To solve this I inherited 'stock.report_delivery_document' and tried to replace div with name 'partner_header' inside of which should customer address display with this code:


The code is giving me info from delivery address, not from Customer that is on Sales Order.

Please help - sorry if creating module is not the way to do it.

Avatar
Abbandona
Autore Risposta migliore

I found solution - in inherited "stock.report_delivery_document" I accessed customer address from related Sales Order using o.sale_id.partner_id

Here is the code - used contact widget to format it:


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
giu 23
3372
1
apr 22
2213
1
set 25
1977
1
giu 25
2007
3
lug 25
3587