Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: accounting dimenstion field not visible in asset depriciation #54

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"options": "Journal Entry",
"label": "Journal Entry",
"module": "asset_modification",
"allow_on_submit": 1,
"read_only": 1,
"depends_on": "eval:doc.docstatus==1;"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
AccountingDimension,
get_accounting_dimensions,
get_doctypes_with_dimensions
get_accounting_dimensions
)

class CustomAccountingDimension(AccountingDimension):
Expand Down Expand Up @@ -189,3 +188,7 @@ def toggle_disabling(doc):
custom_field_duplicate.save()

frappe.clear_cache(doctype=doctype)


def get_doctypes_with_dimensions():
return frappe.get_hooks("accounting_dimension_doctypes_for_asset")
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def set_draft_asset_depr_schedule_details(self, asset_doc, row):
fields = frappe.get_list("Accounting Dimension", pluck="fieldname")

self.asset = asset_doc.name
# self.cost_center = asset_doc.cost_center
self.finance_book = row.finance_book
self.finance_book_id = row.idx
self.opening_accumulated_depreciation = asset_doc.opening_accumulated_depreciation or 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import frappe
from frappe.model.document import Document
from erpnext.accounts.utils import get_fiscal_year
from frappe.utils import today


class AssetComponentCapitalization(Document):
def on_submit(self):
Expand Down
Loading