I want to send an email to the responsible person (user_id) of a Task (project.task) when it changes to a closed stage. I created an automated action and a mail template.
This mail is not necessary if the user who is changing the stage is the same who is going to receive the mail.
I tried with the condition ["write_uid","!=","user_id"], so if write_uid (the last user that modified the record) is not equal to user_id (the responsible of this task) the action have to be performed.
However, "user_id" does not contain what I expected (the id of the user), but the literal string "user_id".
Is it possible to compare 2 fields in the domains of an automated action?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
3904
أدوات العرض
Hi,
Try this, you can get the current user in domain using uid,
domain = "[('write_uid', '!=', uid)]"
Hope it helps,
Thanks
Open XML code in Odoo Studio and paste it there. It should work.
Sorry, but I do not find how to open XML code in Automated Action form within Studio to be able to paste my domain. Could you elaborate, please ?
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
1
فبراير 21
|
4416 | ||
|
3
يونيو 20
|
5081 | ||
|
0
يونيو 20
|
2661 | ||
|
0
فبراير 16
|
3777 | ||
Server actions in menuItem
تم الحل
|
|
2
سبتمبر 23
|
5663 |
Thanks for your help.
It doesn't work here. When I try to modify the domain the sistem raises the error "Domain not properly formed"
Hi Josep, did you manage to compare 2 fields in the domain?
Roberto, not yet.
:-(
Gracias Josep, igual es porque no se puede...