تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
9235 أدوات العرض

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!

المنشورات ذات الصلة الردود أدوات العرض النشاط
6
يناير 24
58514
1
مايو 16
3826
0
يناير 25
1332
3
نوفمبر 24
4773
0
أكتوبر 24
1339