跳至內容
選單
此問題已被標幟
3 回覆
2852 瀏覽次數
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
8月 24
1301
0
4月 24
2023
1
7月 24
2180
1
3月 22
4951
1
6月 21
3303