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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
1
Répondre
3597
Vues
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire
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.
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
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