Merge pull request #12614 from rohitwaghchaure/removed_set_only_once_for_batch_serialno
Disabled property set only once for has serial no and has batch no field in item doctype
This commit is contained in:
commit
c8399fd093
@ -106,6 +106,13 @@ frappe.ui.form.on("Item", {
|
|||||||
frappe.set_route("Form", "Item Variant Settings");
|
frappe.set_route("Form", "Item Variant Settings");
|
||||||
}, __("View"));
|
}, __("View"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const stock_exists = (frm.doc.__onload
|
||||||
|
&& frm.doc.__onload.stock_exists) ? 1 : 0;
|
||||||
|
|
||||||
|
['has_serial_no', 'has_batch_no'].forEach((fieldname) => {
|
||||||
|
frm.set_df_property(fieldname, 'read_only', stock_exists);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
validate: function(frm){
|
validate: function(frm){
|
||||||
|
@ -1180,7 +1180,7 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 1,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1370,7 +1370,7 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 1,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3453,7 +3453,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 1,
|
"max_attachments": 1,
|
||||||
"modified": "2017-12-27 15:47:17.039337",
|
"modified": "2018-01-23 12:21:16.641517",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Item",
|
"name": "Item",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user