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.

1

Show subtotal with taxes in each line of sale.order

By
José
on 9/29/15, 8:33 AM 802 views

Hello, I want to automatically calculate the subtotal with taxes in each line of sale.order. 

I added a column "subtotal_with_taxes" and then I define this method (the two things in sale.order.line model):

@api.onchange('WHAT?') 
def change_subtotal_with_taxes(self):
I want to execute this method every time when user presses "update" in the sale.order but I didn't see the way. How can I do this? I try with api.onchange('id') but not works, also I try api.onchange('price_subtotal') but not works because 'price_subtotal' is function field.   

1

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 9/29/15, 3:46 PM

In this case, that is easier, you inherit method button_dummy(), this will work the same way.

Yes, it works. But if the user presses "Save" without pressing "(update)" the method is not called. How can I solve this?

José
on 9/29/15, 8:07 PM
0
chirag jogi
On 9/30/15, 1:49 AM

Hello Jose,

Try below link module it will help you to solve your problem,

Module 


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: 9/29/15, 8:33 AM
Seen: 802 times
Last updated: 9/30/15, 1:49 AM