Skip to Content
Menu
This question has been flagged
2 Replies
1354 Views

Hi All
    I'm new in Odoo development, I want to know when we press the "Create Refund" button in Sales then there is one row inserted in the "account_invoice" table so I want know the code path of that code base.   

Avatar
Discard
Author Best Answer

Thanks for the reply,
But I'm not able to find that method from where that values are inserted. 

Avatar
Discard
Best Answer

Hi,

You can activate the debug mode and mouse hover the corresponding button, then you will get some technical details about the button like the name, so if you place the mouse hover this button Create Refund , you can see the name of the button is invoice_refund , so using this you can search inside the code(you can directly search inside the code by using the string shown in the user interface.

In the code check line 43 of this file: https://github.com/odoo/odoo/blob/10.0/addons/account/wizard/account_invoice_refund_view.xml

As the above button type is object it will call the function in the given button name in corresponding model.

Set up a development environment using pycharm, which can make things easier: How to Configure Odoo With Pycharm

Thanks

Avatar
Discard