Odoo Help


How to customize account invice line ,using onchange of tax field without click on update button? Need A help...

on 6/25/14, 2:27 PM 617 views

This is a one2many line from invoice line -Here i mentioned an example of sample product as service...

Product Service

Description xx

Account xx

Quantity- 1

Unit Price -10

Gross Amount -10(10*1)                             #This is a my own custom field[quantity*unitprice]

Taxes - 2

Amount  12(10+2)                               [Gross Amount+Taxes]


Above field values are from  customer invoice line from accounting  ,here I need one customization on invoice line  when onchage of taxes is change Amount should be changed ie(tax+gross amount) should populate in the Amount Field without pressing the update button .I need to change using tab (onchange of tax).How it is possible...Please need a help..........

Here I attached my code -----Please check


class account_new(osv.osv):

    def onchange_schemid(self,cr,uid,ids,price_unit,quantity,context=None):
            if price_unit:
                return {'value':{'new_total':amount_new}}
            return {}
    def onchange_tax_id(self,cr,uid,ids,new_total,invoice_line_tax_id,context=None):
        if invoice_line_tax_id:
                return {'value':{'new_with_tax':amount_with_tax}}
        return {}
              'new_total': fields.float('Gross Amount', required=True),


Jagdish Panchal

--Jagdish Panchal--
Jagdish Panchal
| 5 4 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 6/26/14, 1:28 AM


Refer following link may help you



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 platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/25/14, 2:27 PM
Seen: 617 times
Last updated: 3/16/15, 8:10 AM