mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 07:01:56 +00:00
fix(stock): validate over delivery/receipt allowance in stock settings
(cherry picked from commit 446ec6030a)
# Conflicts:
# erpnext/stock/doctype/stock_settings/stock_settings.json
# erpnext/stock/doctype/stock_settings/stock_settings.py
This commit is contained in:
committed by
Sudharsanan11
parent
ebdc0cdf7f
commit
7be8a99a23
@@ -131,7 +131,8 @@
|
|||||||
"description": "The percentage you are allowed to receive or deliver more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed to receive 110 units.",
|
"description": "The percentage you are allowed to receive or deliver more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed to receive 110 units.",
|
||||||
"fieldname": "over_delivery_receipt_allowance",
|
"fieldname": "over_delivery_receipt_allowance",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"label": "Over Delivery/Receipt Allowance (%)"
|
"label": "Over Delivery/Receipt Allowance (%)",
|
||||||
|
"non_negative": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "Stop",
|
"default": "Stop",
|
||||||
@@ -282,7 +283,12 @@
|
|||||||
"description": "The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units.",
|
"description": "The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units.",
|
||||||
"fieldname": "mr_qty_allowance",
|
"fieldname": "mr_qty_allowance",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
|
<<<<<<< HEAD
|
||||||
"label": "Over Transfer Allowance"
|
"label": "Over Transfer Allowance"
|
||||||
|
=======
|
||||||
|
"label": "Over Transfer Allowance (%)",
|
||||||
|
"non_negative": 1
|
||||||
|
>>>>>>> 446ec6030a (fix(stock): validate over delivery/receipt allowance in stock settings)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
@@ -446,7 +452,12 @@
|
|||||||
"description": "The percentage you are allowed to pick more items in the pick list than the ordered quantity.",
|
"description": "The percentage you are allowed to pick more items in the pick list than the ordered quantity.",
|
||||||
"fieldname": "over_picking_allowance",
|
"fieldname": "over_picking_allowance",
|
||||||
"fieldtype": "Percent",
|
"fieldtype": "Percent",
|
||||||
|
<<<<<<< HEAD
|
||||||
"label": "Over Picking Allowance"
|
"label": "Over Picking Allowance"
|
||||||
|
=======
|
||||||
|
"label": "Over Picking Allowance (%)",
|
||||||
|
"non_negative": 1
|
||||||
|
>>>>>>> 446ec6030a (fix(stock): validate over delivery/receipt allowance in stock settings)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "1",
|
"default": "1",
|
||||||
@@ -528,7 +539,11 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
|
<<<<<<< HEAD
|
||||||
"modified": "2026-03-27 22:39:16.812184",
|
"modified": "2026-03-27 22:39:16.812184",
|
||||||
|
=======
|
||||||
|
"modified": "2026-08-01 23:35:02.896836",
|
||||||
|
>>>>>>> 446ec6030a (fix(stock): validate over delivery/receipt allowance in stock settings)
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Stock Settings",
|
"name": "Stock Settings",
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class StockSettings(Document):
|
|||||||
use_naming_series: DF.Check
|
use_naming_series: DF.Check
|
||||||
use_serial_batch_fields: DF.Check
|
use_serial_batch_fields: DF.Check
|
||||||
validate_material_transfer_warehouses: DF.Check
|
validate_material_transfer_warehouses: DF.Check
|
||||||
valuation_method: DF.Literal["FIFO", "Moving Average", "LIFO"]
|
valuation_method: DF.Literal["FIFO", "Moving Average", "LIFO", "Standard Cost"]
|
||||||
# end: auto-generated types
|
# end: auto-generated types
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
@@ -100,7 +100,12 @@ class StockSettings(Document):
|
|||||||
validate_fields_for_doctype=False,
|
validate_fields_for_doctype=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
self.validate_warehouses()
|
self.validate_warehouses()
|
||||||
|
=======
|
||||||
|
self.validate_over_delivery_receipt_allowance()
|
||||||
|
self.validate_serial_and_batch_no_settings()
|
||||||
|
>>>>>>> 446ec6030a (fix(stock): validate over delivery/receipt allowance in stock settings)
|
||||||
self.cant_change_valuation_method()
|
self.cant_change_valuation_method()
|
||||||
self.validate_clean_description_html()
|
self.validate_clean_description_html()
|
||||||
self.validate_pending_reposts()
|
self.validate_pending_reposts()
|
||||||
@@ -110,6 +115,10 @@ class StockSettings(Document):
|
|||||||
self.change_precision_for_purchase()
|
self.change_precision_for_purchase()
|
||||||
self.validate_do_not_use_batchwise_valuation()
|
self.validate_do_not_use_batchwise_valuation()
|
||||||
|
|
||||||
|
def validate_over_delivery_receipt_allowance(self):
|
||||||
|
if not self.over_delivery_receipt_allowance:
|
||||||
|
self.role_allowed_to_over_deliver_receive = None
|
||||||
|
|
||||||
def validate_do_not_use_batchwise_valuation(self):
|
def validate_do_not_use_batchwise_valuation(self):
|
||||||
doc_before_save = self.get_doc_before_save()
|
doc_before_save = self.get_doc_before_save()
|
||||||
if not doc_before_save:
|
if not doc_before_save:
|
||||||
|
|||||||
Reference in New Issue
Block a user