콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
9281 화면

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
1월 24
58586
1
5월 16
3853
0
1월 25
1375
3
11월 24
4895
0
10월 24
1372