Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to get multiple values with Python expression in a Server Action

By
Randall Risser
on 6/29/16, 8:49 AM 290 views

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?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/29/16, 8:49 AM
Seen: 290 times
Last updated: 6/29/16, 10:24 AM