Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
2879 Lượt xem
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


Ảnh đại diện
Huỷ bỏ

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.


Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 24
1317
0
thg 4 24
2064
1
thg 7 24
2206
1
thg 3 22
4962
1
thg 6 21
3310