تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
2854 أدوات العرض
As I can intercept all the create of the system, 
that is to say a module that allows me to do something whenever a creat is executed


الصورة الرمزية
إهمال

You could do a module that does not have to play the core of odoo for that, that is, if there is any way to inherit model to affect all the system's create.


أفضل إجابة

You can also define an automated action for this. Activate developer mode and go to Settings > Technical > Automated Actions (under Automation). You can define an automated action with a Trigger Condition of On Creation for any model in the system. One of the actions that can be performed (Action To Do) is Execute Python Code. This feature comes very handy for simple requirements.

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

you can intercept all the create at def _create of models.py
https://github.com/odoo/odoo/blob/12.0/odoo/models.py#L3618

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 24
1303
0
أبريل 24
2036
1
يوليو 24
2189
1
مارس 22
4955
1
يونيو 21
3303