Attach the Expenses object to Sales Order

Hi All,

Is there a way to attach / link an expense to a Sales Order?

Reason is that when a sales order is incurred, there are also internal expenses happening during the process. Of course we can create an expense report in HR module, but I guess it could be much better if an expense report can also be attached and only related to a particular ‘Sales Order’.

Something like another tab “Expenses” or a button beside the action list (Create invoice, Create shipment etc.) when I go to Sales Order.

Thanks!

Nevermind, I just coded this. Not sure if I am to contribute because it is not the best approach and user needs to manually add new attribute to Sales order and Purchase order object. I added a new tab on those pages like:
image