mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-11 02:45:08 +00:00
Co-authored-by: Nishka Gosalia <58264710+nishkagosalia@users.noreply.github.com>
This commit is contained in:
@@ -74,10 +74,6 @@
|
||||
"auto_indent",
|
||||
"column_break_27",
|
||||
"reorder_email_notify",
|
||||
"inter_warehouse_transfer_settings_section",
|
||||
"allow_from_dn",
|
||||
"column_break_31",
|
||||
"allow_from_pr",
|
||||
"stock_closing_tab",
|
||||
"control_historical_stock_transactions_section",
|
||||
"stock_frozen_upto",
|
||||
@@ -225,23 +221,6 @@
|
||||
"fieldtype": "Data",
|
||||
"label": "Naming Series Prefix"
|
||||
},
|
||||
{
|
||||
"fieldname": "inter_warehouse_transfer_settings_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Inter Warehouse Transfer Settings"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "allow_from_dn",
|
||||
"fieldtype": "Check",
|
||||
"label": "Allow Material Transfer from Delivery Note to Sales Invoice"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "allow_from_pr",
|
||||
"fieldtype": "Check",
|
||||
"label": "Allow Material Transfer from Purchase Receipt to Purchase Invoice"
|
||||
},
|
||||
{
|
||||
"description": "If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.",
|
||||
"fieldname": "role_allowed_to_create_edit_back_dated_transactions",
|
||||
@@ -289,10 +268,6 @@
|
||||
"fieldname": "column_break_27",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_31",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "quality_inspection_settings_section",
|
||||
"fieldtype": "Section Break",
|
||||
@@ -564,7 +539,7 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2026-03-16 13:28:19.254641",
|
||||
"modified": "2026-03-27 22:39:16.812184",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Stock Settings",
|
||||
|
||||
@@ -26,8 +26,6 @@ class StockSettings(Document):
|
||||
action_if_quality_inspection_is_not_submitted: DF.Literal["Stop", "Warn"]
|
||||
action_if_quality_inspection_is_rejected: DF.Literal["Stop", "Warn"]
|
||||
allow_existing_serial_no: DF.Check
|
||||
allow_from_dn: DF.Check
|
||||
allow_from_pr: DF.Check
|
||||
allow_internal_transfer_at_arms_length_price: DF.Check
|
||||
allow_negative_stock: DF.Check
|
||||
allow_negative_stock_for_batch: DF.Check
|
||||
@@ -261,9 +259,6 @@ class StockSettings(Document):
|
||||
)
|
||||
)
|
||||
|
||||
def on_update(self):
|
||||
self.toggle_warehouse_field_for_inter_warehouse_transfer()
|
||||
|
||||
def change_precision_for_for_sales(self):
|
||||
doc_before_save = self.get_doc_before_save()
|
||||
if doc_before_save and (
|
||||
@@ -314,40 +309,6 @@ class StockSettings(Document):
|
||||
validate_fields_for_doctype=False,
|
||||
)
|
||||
|
||||
def toggle_warehouse_field_for_inter_warehouse_transfer(self):
|
||||
make_property_setter(
|
||||
"Sales Invoice Item",
|
||||
"target_warehouse",
|
||||
"hidden",
|
||||
1 - cint(self.allow_from_dn),
|
||||
"Check",
|
||||
validate_fields_for_doctype=False,
|
||||
)
|
||||
make_property_setter(
|
||||
"Delivery Note Item",
|
||||
"target_warehouse",
|
||||
"hidden",
|
||||
1 - cint(self.allow_from_dn),
|
||||
"Check",
|
||||
validate_fields_for_doctype=False,
|
||||
)
|
||||
make_property_setter(
|
||||
"Purchase Invoice Item",
|
||||
"from_warehouse",
|
||||
"hidden",
|
||||
1 - cint(self.allow_from_pr),
|
||||
"Check",
|
||||
validate_fields_for_doctype=False,
|
||||
)
|
||||
make_property_setter(
|
||||
"Purchase Receipt Item",
|
||||
"from_warehouse",
|
||||
"hidden",
|
||||
1 - cint(self.allow_from_pr),
|
||||
"Check",
|
||||
validate_fields_for_doctype=False,
|
||||
)
|
||||
|
||||
|
||||
def clean_all_descriptions():
|
||||
for item in frappe.get_all("Item", ["name", "description"]):
|
||||
|
||||
Reference in New Issue
Block a user