accounts table should be mandatory in budget (#15386)

This commit is contained in:
Zarrar 2018-09-12 11:14:24 +05:30 committed by Nabin Hait
parent ce6a09ca54
commit 2b6584a296
2 changed files with 6 additions and 5 deletions

View File

@ -735,7 +735,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
@ -752,7 +752,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-06-15 17:09:01.430292",
"modified": "2018-09-12 11:02:41.825923",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget",
@ -785,6 +785,7 @@
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}

View File

@ -36,7 +36,7 @@ class Budget(Document):
b.name, ba.account from `tabBudget` b, `tabBudget Account` ba
where
ba.parent = b.name and b.docstatus < 2 and b.company = %s and %s=%s and
b.fiscal_year=%s and b.name != %sand ba.account in (%s) """
b.fiscal_year=%s and b.name != %s and ba.account in (%s) """
% ('%s', budget_against_field, '%s', '%s', '%s', ','.join(['%s'] * len(accounts))),
(self.company, budget_against, self.fiscal_year, self.name) + tuple(accounts), as_dict=1)