[FIX] account: avoid crashing when no active_ids
We should avoid crashing in case active_ids is not in the context X-original-commit: b528cf82d5144073cee112fb5cc5626243c51e96
This commit is contained in:
@@ -733,6 +733,8 @@ class payment_register(models.TransientModel):
|
||||
def default_get(self, fields):
|
||||
rec = super(payment_register, self).default_get(fields)
|
||||
active_ids = self._context.get('active_ids')
|
||||
if not active_ids:
|
||||
return rec
|
||||
invoices = self.env['account.move'].browse(active_ids)
|
||||
|
||||
# Check all invoices are open
|
||||
|
||||
Reference in New Issue
Block a user