mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Remove variable partner_id since i changed the validation of partners number.
This commit is contained in:
committed by
Sergio Teruel
parent
473e2556d6
commit
385d60dca8
@@ -47,12 +47,10 @@ class AccountMoveMakeNetting(models.TransientModel):
|
||||
"operations on different accounts for the same partner.\n"
|
||||
"In this case all selected entries belong to the same "
|
||||
"account.\n Please use the 'Reconcile' function."))
|
||||
partner_id = None
|
||||
if len(move_lines.mapped('partner_id')) != 1:
|
||||
raise exceptions.ValidationError(
|
||||
_("All entries should have a partner and the partner must "
|
||||
"be the same for all."))
|
||||
partner_id = move_lines[0].partner_id
|
||||
res = super(AccountMoveMakeNetting, self).default_get(fields)
|
||||
res['move_line_ids'] = [(6, 0, move_lines.ids)]
|
||||
balance = (sum(move_lines.mapped('debit')) -
|
||||
|
||||
Reference in New Issue
Block a user