Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
7 Trả lời
6323 Lượt xem

Hello, I have Odoo 8. I want to automate the process for creating an invoice, validating it and registering payment. So how can I know the list of all methods called when button press? So I can call this methods from Python code.

Thanks!       

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

Activate developer mode will help you to see the python method used for buttons in form view.

If you want to edit invoices check model with name "account.invoice".

Also "account.move" (for journal entries creation).


Ảnh đại diện
Huỷ bỏ
Tác giả

I have developer mode activated. For example I see that when I press "Validate" it calls invoice_validate(). But also it calls action_date_assign() , action_move_create()

when you validate an entry corresponding journal entries are created it is done using another method.

Tác giả

I understand. But how can I see ALL methods called when I click "Validate" button?

i'm not sure if there is a easy way to know all methods. what you should do is find the method which is called when you click 'validate' button from there you should find other methods calling inside that and so on..

Tác giả

The action for the button is only invoice_validate() . Inside that, not calls anything, but before calling invoice_validate() Odoo calls action_date_assign() ... and how can I determine that!?

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

Actually there is no a fast way to do that... But Pycharm can give you a Debug process... You can set breakpoints and there see what happened there... Step into lines and see the entire process... Of course it could be really hard sometimes, but it's the only way that I've found.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 4 16
2987
2
thg 4 15
5887
11
thg 9 21
32029
2
thg 1 24
14936
2
thg 12 17
4118