Skip to content

Commit

Permalink
fix: disable editable account heads
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Mar 3, 2024
1 parent 6230bbc commit c55c0f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
13 changes: 3 additions & 10 deletions erpnext/accounts/doctype/journal_entry/journal_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,6 @@ def validate(self):
if not self.title:
self.title = self.get_title()

def validate_for_repost(self):
self.validate_party()
self.validate_multi_currency()
if not frappe.flags.is_reverse_depr_entry:
self.validate_against_jv()
self.validate_stock_accounts()

def submit(self):
if len(self.accounts) > 100:
msgprint(_("The task has been enqueued as a background job."), alert=True)
Expand All @@ -181,9 +174,9 @@ def on_submit(self):

def on_update_after_submit(self):
if hasattr(self, "repost_required"):
child_tables = {"accounts": ("account", "account_type", "bank_account")}
self.needs_repost = self.check_if_fields_updated([], child_tables)
self.validate_for_repost()
self.needs_repost = self.check_if_fields_updated(
fields_to_check=[], child_tables={"accounts": []}
)
self.db_set("repost_required", self.needs_repost)

def on_cancel(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
],
"fields": [
{
"allow_on_submit": 1,
"bold": 1,
"columns": 2,
"fieldname": "account",
Expand All @@ -56,7 +55,6 @@
"width": "250px"
},
{
"allow_on_submit": 1,
"fieldname": "account_type",
"fieldtype": "Data",
"hidden": 1,
Expand Down Expand Up @@ -253,7 +251,6 @@
"fieldtype": "Column Break"
},
{
"allow_on_submit": 1,
"fieldname": "bank_account",
"fieldtype": "Link",
"label": "Bank Account",
Expand All @@ -271,7 +268,7 @@
"idx": 1,
"istable": 1,
"links": [],
"modified": "2023-11-23 11:44:25.841187",
"modified": "2024-02-05 01:10:50.224840",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",
Expand Down

0 comments on commit c55c0f7

Please sign in to comment.