跳至内容
菜单
此问题已终结
5 回复
5816 查看

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.

相关帖文 回复 查看 活动
3
4月 24
2023
1
9月 23
1919
0
3月 17
3024
1
9月 24
1267
0
10月 21
1851