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

Hi,

I am using OpenOffice Designer to do my Invoices report. Do anyone know what is the code for the customer reference because i try to use [[ o.client_order_ref ]] but seem like not working

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

In invoice name field holds the customer reference. so you can use [[ o.name ]] to get the customer reference

อวตาร
ละทิ้ง
ผู้เขียน

hi i use the [[ o.name ]] but not working

คำตอบที่ดีที่สุด

You can not directly get client_order_ref, it is sale order field.

def _get_client_order_ref(self, data):

    ref = ''
    sale_obj = self.pool.get('sale.order')
    sale_ids = sale_obj.search(cr, uid, [('origin', '=', data.origin)]
    if sale_ids:
        ref = sale_obj.browse(cr, uid, sale_ids[0]).client_order_ref
    return ref

you have to do something like this

อวตาร
ละทิ้ง
ผู้เขียน

can i know this code put under python file?

I'm actually interested in something similar. I would like to display the customer reference on a task associated with the sales order. thanks!

Related Posts ตอบกลับ มุมมอง กิจกรรม
6
ม.ค. 24
58526
1
พ.ค. 16
3832
0
ม.ค. 25
1336
3
พ.ย. 24
4789
0
ต.ค. 24
1349