تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
3226 أدوات العرض

I am trying to decorate list view of CRM opportunities based on stage_id. Kind of: 


tree string="Opportunities" decoration-success="stage_id == 'PAID'"


But it´s not working because it does not recognize PAID as a value of stage_id. 

However, if I include in the list:


 field name="stage_id" optional="show" decoration-bf="1"/


PAID is shown


Any idea what I am doing badly?

Thanks


Javier

الصورة الرمزية
إهمال
أفضل إجابة

Use stage_id.name like so

<tree string="Opportunities" decoration-success="stage_id.name == 'PAID'"/>
الصورة الرمزية
إهمال
الكاتب

thanks Paresh. I tried, but return to me error as stage_id.name invalid

الكاتب

and if i decorate based on "other than" !=, it will work with stage_id. so, the problem is that the default value is not name.

Are you sure this view is based on the crm.lead model?

الكاتب

well, is crm.lead.tree.opportunity, so, I would say yes

Hi Javier: You're right. Looks like composed fields are not supported in the expression. You can use "stage_id == RECORD_ID" where RECORD_ID is the id of the "PAID" stage in crm.stage. For example, "stage_id == 4". That should work.

أفضل إجابة

hi 

can you clarify your issue more , i got that when you grouping the CRM leads by stage not shown 

it is your problem 

الصورة الرمزية
إهمال
الكاتب

sorry, part of the message was missing. i have rewritten it.
Thanks

hi
are you suffering a problem to change the Stage ID ?

الكاتب

i am suffering a problem to chage decoration based on stage ID. I does not recognice strings.

الكاتب

all i want is define a color in the list view based on the value of stage ID. Stage ID is in the view but I am not able to define decoration of the tree based on stage ID value. Green for all the win stages, grey for the pending stages...

unfortunate the decoration on only Kanban view not on list
to do that need a python developer

الكاتب

i can use decoration in list view for any other field, even for stage_id. If i select decoration for stage_id != 'PAID'. it will work. the problem is that not recognize as default value of one2many de stage name

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
ديسمبر 21
5918
1
يونيو 23
1773
1
مايو 25
4567
1
سبتمبر 22
8840
1
مايو 25
5431