This question has been flagged
3 Replies
3447 Views

<button name="action_invoice_sent" string="Send &amp; Print" type="object"/> -- object is written under python file where can i find it ?

<button name="148" id="account_invoice_payment_btn" type="action"/> -- this is action i can find it under actions

C:\Program Files (x86)\Odoo 12.0\server\odoo\addons\account\models -- i check under models or under account folder but no luck can find then code which is behind "action_invoice_sent" is object 

where can i find the source code 

kindly guide

Avatar
Discard
Author Best Answer

thank you so much

Avatar
Discard
Best Answer

Hello Good Noon 

You can find the function "action_invoice_sent" in the account module
and you can find from this path = addons/account/models/account_invoice.py


Thanks

Avatar
Discard
Best Answer

Hi Daniyal,

The actions that you link to can indeed be found in the Python code. The easiest way to find them is to do either a search on Github or with a custom tool such as pycharm.
You can find the function action_invoice_sent in the account module. The path is addons/account/models/account_invoice.py See https://github.com/odoo/odoo/blob/1868713dbd07e0b518f91dffe73e62d85e6ab9a6/addons/account/models/account_invoice.py#L589-L616 

The action account_invoice_payment_btn comes from addons/account/views/account_invoice_view.xml where the button triggers an action for a wizard. You can see it at https://github.com/odoo/odoo/blob/1868713dbd07e0b518f91dffe73e62d85e6ab9a6/addons/account/views/account_invoice_view.xml#L407 which links to https://github.com/odoo/odoo/blob/1868713dbd07e0b518f91dffe73e62d85e6ab9a6/addons/account/views/account_payment_view.xml#L296-L304

Regards,
Yenthe

Avatar
Discard