Browse Source

Merge 079d4e4164 into 3eeca19e1c

pull/380/merge
Gerlin Matos 2 days ago
committed by GitHub
parent
commit
cb5425ec52
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 15
      base_account_budget/models/account_budget.py

15
base_account_budget/models/account_budget.py

@ -40,14 +40,13 @@ class AccountBudgetPost(models.Model):
'account.budget.post')) 'account.budget.post'))
def _check_account_ids(self, vals): def _check_account_ids(self, vals):
for val in vals: if 'account_ids' in vals:
if 'account_ids' in val: account_ids = vals['account_ids']
account_ids = val['account_ids'] else:
else: account_ids = self.account_ids
account_ids = self.account_ids if not account_ids:
if not account_ids: raise ValidationError(
raise ValidationError( _('The budget must have at least one account.'))
_('The budget must have at least one account.'))
@api.model_create_multi @api.model_create_multi
def create(self, vals): def create(self, vals):

Loading…
Cancel
Save