mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-15 23:48:38 +00:00
fix(company): ignore user permissions for link fields having link to Account and Cost Center (backport #56748) (#56795)
* fix(company): ignore user permissions for link fields having link to `Account` and `Cost Center` (#56748)
(cherry picked from commit 9cea43b006)
# Conflicts:
# erpnext/setup/doctype/company/company.json
* chore: resolves conflict
---------
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
@@ -346,33 +346,48 @@
|
|||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "round_off_account",
|
"fieldname": "round_off_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Round Off Account",
|
"label": "Round Off Account",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "round_off_cost_center",
|
"fieldname": "round_off_cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Round Off Cost Center",
|
"label": "Round Off Cost Center",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Cost Center"
|
"options": "Cost Center"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "write_off_account",
|
"fieldname": "write_off_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Write Off Account",
|
"label": "Write Off Account",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "exchange_gain_loss_account",
|
"fieldname": "exchange_gain_loss_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Exchange Gain / Loss Account",
|
"label": "Exchange Gain / Loss Account",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "unrealized_exchange_gain_loss_account",
|
"fieldname": "unrealized_exchange_gain_loss_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Unrealized Exchange Gain/Loss Account",
|
"label": "Unrealized Exchange Gain/Loss Account",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -499,15 +514,19 @@
|
|||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "accumulated_depreciation_account",
|
"fieldname": "accumulated_depreciation_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Accumulated Depreciation Account",
|
"label": "Accumulated Depreciation Account",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "depreciation_expense_account",
|
"fieldname": "depreciation_expense_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Depreciation Expense Account",
|
"label": "Depreciation Expense Account",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
@@ -522,29 +541,39 @@
|
|||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "disposal_account",
|
"fieldname": "disposal_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Gain/Loss Account on Asset Disposal",
|
"label": "Gain/Loss Account on Asset Disposal",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "depreciation_cost_center",
|
"fieldname": "depreciation_cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Asset Depreciation Cost Center",
|
"label": "Asset Depreciation Cost Center",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Cost Center"
|
"options": "Cost Center"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "capital_work_in_progress_account",
|
"fieldname": "capital_work_in_progress_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Capital Work In Progress Account",
|
"label": "Capital Work In Progress Account",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "asset_received_but_not_billed",
|
"fieldname": "asset_received_but_not_billed",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Asset Received But Not Billed",
|
"label": "Asset Received But Not Billed",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -676,15 +705,21 @@
|
|||||||
"options": "Warehouse"
|
"options": "Warehouse"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "unrealized_profit_loss_account",
|
"fieldname": "unrealized_profit_loss_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Unrealized Profit / Loss Account",
|
"label": "Unrealized Profit / Loss Account",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "default_discount_account",
|
"fieldname": "default_discount_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Default Payment Discount Account",
|
"label": "Default Payment Discount Account",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -726,8 +761,10 @@
|
|||||||
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/advance-in-separate-party-account",
|
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/advance-in-separate-party-account",
|
||||||
"fieldname": "default_advance_received_account",
|
"fieldname": "default_advance_received_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Default Advance Received Account",
|
"label": "Default Advance Received Account",
|
||||||
"mandatory_depends_on": "book_advance_payments_as_liability",
|
"mandatory_depends_on": "book_advance_payments_as_liability",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -736,8 +773,10 @@
|
|||||||
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/advance-in-separate-party-account",
|
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/advance-in-separate-party-account",
|
||||||
"fieldname": "default_advance_paid_account",
|
"fieldname": "default_advance_paid_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Default Advance Paid Account",
|
"label": "Default Advance Paid Account",
|
||||||
"mandatory_depends_on": "book_advance_payments_as_liability",
|
"mandatory_depends_on": "book_advance_payments_as_liability",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -817,9 +856,12 @@
|
|||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "round_off_for_opening",
|
"fieldname": "round_off_for_opening",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
"label": "Round Off for Opening",
|
"label": "Round Off for Opening",
|
||||||
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -970,7 +1012,7 @@
|
|||||||
"image_field": "company_logo",
|
"image_field": "company_logo",
|
||||||
"is_tree": 1,
|
"is_tree": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2026-04-17 17:11:46.586135",
|
"modified": "2026-07-02 07:21:21.794533",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Setup",
|
"module": "Setup",
|
||||||
"name": "Company",
|
"name": "Company",
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ class Company(NestedSet):
|
|||||||
default_operating_cost_account: DF.Link | None
|
default_operating_cost_account: DF.Link | None
|
||||||
default_payable_account: DF.Link | None
|
default_payable_account: DF.Link | None
|
||||||
default_provisional_account: DF.Link | None
|
default_provisional_account: DF.Link | None
|
||||||
|
default_purchase_price_variance_account: DF.Link | None
|
||||||
default_receivable_account: DF.Link | None
|
default_receivable_account: DF.Link | None
|
||||||
default_sales_contact: DF.Link | None
|
default_sales_contact: DF.Link | None
|
||||||
default_scrap_warehouse: DF.Link | None
|
default_scrap_warehouse: DF.Link | None
|
||||||
|
|||||||
Reference in New Issue
Block a user