[FIX] account: Register payment
Steps to reproduce: - Create a customer invoice I for a total of 1000€ - Confirm I - Register a payment Bug: The default amout in the wizard was 0€ instead of 1000€ The default amount is computed by _get_wizard_values_from_batch with the sum of amount_residual of all the lines. But in function _compute_amount_residual, it checked line.id and this case, all the lines were in cache with NewId opw:2413064 closes odoo/odoo#63050 X-original-commit: f734b1cdc2780107ce690306aa1bc0acb9f13161 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -140,7 +140,7 @@ class AccountPaymentRegister(models.TransientModel):
|
||||
'''
|
||||
self.ensure_one()
|
||||
|
||||
lines = self.line_ids
|
||||
lines = self.line_ids._origin
|
||||
|
||||
if len(lines.company_id) > 1:
|
||||
raise UserError(_("You can't create payments for entries belonging to different companies."))
|
||||
|
||||
Reference in New Issue
Block a user