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

Edit residual field in account_invoice

By
Jihen BEN ALI
on 3/16/16, 5:16 AM 322 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

Jihen BEN ALI
on 3/16/16, 9:45 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: 3/16/16, 5:16 AM
Seen: 322 times
Last updated: 3/16/16, 9:31 AM