fix issue with multipe account in fix budget
This commit is contained in:
parent
659321b7c6
commit
cf63e91165
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -633,6 +633,9 @@ class PurchaseOrderCustom(models.Model):
|
|||
raise ValidationError(
|
||||
_("This product has no expense account") + ': {}'.format(rec.product_id.name))
|
||||
budget_post = self.env['account.budget.post'].search([]).filtered(lambda x: account_id in x.account_ids)
|
||||
if len(budget_post.ids) > 1:
|
||||
raise ValidationError(
|
||||
_("The Expense account %s is assigned to more than one budget position %s")%(account_id.name,[x.name for x in budget_post]))
|
||||
if analytic_account:
|
||||
budget_lines = self.env['crossovered.budget.lines'].search(
|
||||
[('analytic_account_id', '=', analytic_account.id),
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue