Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How can I find where journal entries are generated when an invoice is validated?

By
E.M.
on 2/14/16, 3:30 PM 386 views

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

1

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 2/15/16, 1:55 AM

Hello,

There is a Hook method to modify the entries you can override this method and do your modifications ...

 line that calling the hook , check this method 

Hope this helps

Wow!, very impressive did not know there was provision for this. Anyway yesterday while I was checking I thought it was a better idea to implement the global discount directly into the subtotal price worked out in account invoice line. So if you apply a global discount of 5% and the subtotal price of the line is 100USD, the extended account invoice line will have a subtotal price of 95USD. By doing that you only modify account_invoice, account_invoice_line and account_invoice_tax and keep the accounting module untouched (which having seen the code is something tricky to modify). (If you want to give an opinion I will listen anyway, I guess there are several ways of doing it). Anyway it is great to know that there is a hook method you can modify. Thanks a lot I might still need it.

E.M.
on 2/15/16, 2:10 AM

Did you ever checked this module: https://apps.openerp.com/apps/modules/8.0/invoice_discount/ , check it; it may suit your needs ...

Ahmed M.Elmubarak
on 2/15/16, 2:30 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/14/16, 3:30 PM
Seen: 386 times
Last updated: 2/15/16, 2:10 AM