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

Everything are described in Question. 

الصورة الرمزية
إهمال
الكاتب أفضل إجابة
You can use below condition.
if u'estimation_id' in vals and rec.estimation_id:


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

Hello Kiran,

First of all, let me explain you concept

1) Any model has only one write method (any model does not contain same name of method)

2) write method always get called when record modified (not at the time of record creation because at the time of record creation, create method call)

So in your case when kanban stage change or when record modified by other way write method always call.

When  you change the stage through the drag, there is a many2one field (stage_is something) will change.

so if you want to differenciate then do one thing:

check in write method that stage_id is in vals or not. If stage_id is in vals then it means that stage is changed. otherwise record updated normally.

I hope it will helpful for you.

Let me know anything that can i help you.


thanks and regards

Haresh Kansara

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

Thanks @Haresh for your reply

I made one custom stage that name is Estimation and i also made custom module for this stage. only estimation stage's record are show in this module. for that i use "<field name="domain">[('stage_id.name', '=', 'Estimation')]</field>" in the "<record model="ir.actions.act_window">" . when i remove the "domain" field at that records does not show in estimation module. so i want to display estimation stage's data into estimation module for that what i do please let me @Haresh.

المنشورات ذات الصلة الردود أدوات العرض النشاط
3
ديسمبر 19
6075
0
أكتوبر 19
4311
1
مارس 20
9711
3
نوفمبر 19
7739
0
نوفمبر 19
60