mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-01 20:48:27 +00:00
fix: hide feature flag controlled fields on install
(cherry picked from commit 889fdf2f11)
This commit is contained in:
@@ -38,6 +38,7 @@ def after_install():
|
|||||||
update_pegged_currencies()
|
update_pegged_currencies()
|
||||||
set_default_print_formats()
|
set_default_print_formats()
|
||||||
create_letter_head()
|
create_letter_head()
|
||||||
|
toggle_hidden_fields()
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
|
|
||||||
|
|
||||||
@@ -364,6 +365,21 @@ def create_letter_head():
|
|||||||
doc.insert(ignore_permissions=True)
|
doc.insert(ignore_permissions=True)
|
||||||
|
|
||||||
|
|
||||||
|
def toggle_hidden_fields():
|
||||||
|
from erpnext.accounts.doctype.accounts_settings.accounts_settings import (
|
||||||
|
toggle_accounting_dimension_sections,
|
||||||
|
toggle_loyalty_point_program_section,
|
||||||
|
toggle_sales_discount_section,
|
||||||
|
toggle_subscription_sections,
|
||||||
|
)
|
||||||
|
|
||||||
|
acc_settings = frappe.get_doc("Accounts Settings")
|
||||||
|
toggle_accounting_dimension_sections(not acc_settings.enable_accounting_dimensions)
|
||||||
|
toggle_sales_discount_section(not acc_settings.enable_discounts_and_margin)
|
||||||
|
toggle_subscription_sections(not acc_settings.enable_subscription)
|
||||||
|
toggle_loyalty_point_program_section(not acc_settings.enable_loyalty_point_program)
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_ROLE_PROFILES = {
|
DEFAULT_ROLE_PROFILES = {
|
||||||
_("Inventory"): [
|
_("Inventory"): [
|
||||||
"Stock User",
|
"Stock User",
|
||||||
|
|||||||
Reference in New Issue
Block a user