Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2623 มุมมอง

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.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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:


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
odoo use custom fields in address layout แก้ไขแล้ว
1
มิ.ย. 23
3459
1
เม.ย. 22
2267
1
ก.ย. 25
2195
1
มิ.ย. 25
2240
3
ก.ค. 25
3759