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

I am trying to create a task from a new quotation which copies its products as text to task description automatically.

I have a server action setup that is triggered by an automated action.

The automated action is triggered when a Quotation gets created.

The server action Base is set to "Sales Order" and I have it set to "Create or Copy a new Record" and Creation Policy is set to "Create a new record in another model".

My Target Model is set to "Task"

Value mapping is set as:

FieldEvaluation TypeValue
Task TitlePython expression'FW order - '+object.partner_id.name
DescriptionPython expressionobject.product_id.name
ProjectPython expression34


Everything is working so far except the Description part. Python expression: object.product_id.name is only getting the first product value of the quotation. I want it to get every product. How can this be done?

아바타
취소

Did you succeed in solving your problem?

베스트 답변

All the products data you can get from the Sales Order Line and not from the Sales Order. You would have to extract the description/name from the lines.

# Get the Description of all the Order Lines
object.order_line.mapped('name') # this will give you a list of the descriptions


아바타
취소
관련 게시물 답글 화면 활동
0
3월 24
2064
0
11월 22
2556
0
8월 20
4290
2
3월 15
11764
0
10월 24
1622