I am developing a module which applies a discount for total value of invoices.
Module works fine for the invoices but now I have to modify the code which generates journal entries to reflect that global discount.
Where could I find which routine is used in Odoo v8 to generate the journal entries when an invoice is validated?
Thanks