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

i am creating an automated action in odoo 13.

Objective:

To Create a New Subscription.


Process:

i have a custom date filed on customer screen "Possession Date".

i would like to create a new subscription when ever i set this field.


Problem:

i have an automated action working fine but it always create subscription with same customer and price list and other data no matter on which customer i select this date.


 i want two things to be customer specific.


1. Price List (Property_Product_Pricelist)

2. Customer Name (Partner_id)


Here is the screen shot of my automate action


i think i need some kind of python expression to achieve the results i want, unfortunately i am not good at python, please help...!!!  

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

Hi Muhammad:

Change the settings of the following fields in the Data to Write tab (Assuming the Contact that is being updated is the customer):

Company : Python expression : env.company.id

Customer : Python expression : record.id

Pricelist : Python expression : record.property_product_pricelist.id

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

Thanks Bro. it worked,,,,!!!

ผู้เขียน คำตอบที่ดีที่สุด

hi paresh,

thanks for the reply, i tried your method but now i am getting following errors






อวตาร
ละทิ้ง

I have edited my earlier response. The company id needs to be retrieved from the env variable and .id needs to be added to the other 2 so that the value is retrieved from the "id" field.

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
เม.ย. 24
2089
1
ก.ย. 23
1963
0
มี.ค. 17
3068
1
ก.ย. 24
1316
0
ต.ค. 21
1873