Odoo Help


Edit residual field in account_invoice

on 3/16/16, 5:16 AM 990 views

We have edit the account_invoice code inorder that the user could edit the invoice even when he validate the invoice evrything is well the only pb is how to update the residual field after making some change could you help me in this please.

Residual field is a function field I suppose based on full and partial reconcile payments. Editing invoice residual field is not a good idea. If you could elaborate what are you trying to achieve then probably I try to help you. 

Kinner Vachhani
on 3/16/16, 6:54 AM

When you edit quantity the amount total and residual amount both should be automatically updated unless you have overridden the function method which resist the update. For e.g Invoice: INV001 Product 1: 1 X£10 = £10 Tax(20%) = £2 Total = £12 Overdue = £12 Amended invoice Product 1: 2X£10 = £20 Tax(20%) = £4 Total = £24 Overdue = £24 When you pay invoice INV001 it should have value £24. Just curious to know, how are you updating the quantity odoo? Do you use odoo frontend or database query or erppeek? Regards, Kinner

Kinner Vachhani
on 3/16/16, 9:41 AM

I had inherit the module account_invoice and I Had edit it like this invoice_line = fields.One2many('account.invoice.line', 'invoice_id', string='Invoice Lines', readonly=True, states={'draft': [('readonly', False)],'open': [('readonly', False)],'paid': [('readonly', False)]}, copy=True) tax_line = fields.One2many('account.invoice.tax', 'invoice_id', string='Tax Lines', readonly=True, states={'draft': [('readonly', False)],'open': [('readonly', False)],'paid': [('readonly', False)]}, copy=True) and by editing invoice_line I would change the quantity even that the invoice is open

on 3/16/16, 9:45 AM

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: 3/16/16, 5:16 AM
Seen: 990 times
Last updated: 3/16/16, 9:31 AM