File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
d2h/doctype/purchase_receipt_item_duplicate Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 33
33
"label" : " Item Code" ,
34
34
"options" : " Item" ,
35
35
"print_width" : " 100px" ,
36
+ "read_only" : 1 ,
36
37
"reqd" : 1 ,
37
38
"search_index" : 1 ,
38
39
"width" : " 100px"
60
61
"fieldtype" : " Link" ,
61
62
"label" : " UOM" ,
62
63
"options" : " UOM" ,
64
+ "read_only" : 1 ,
63
65
"reqd" : 1
64
66
},
65
67
{
66
68
"fieldname" : " stock_uom" ,
67
69
"fieldtype" : " Link" ,
68
70
"label" : " Stock UOM" ,
69
71
"options" : " UOM" ,
72
+ "read_only" : 1 ,
70
73
"reqd" : 1
71
74
},
72
75
{
156
159
"index_web_pages_for_search" : 1 ,
157
160
"istable" : 1 ,
158
161
"links" : [],
159
- "modified" : " 2025-02-27 01:13:35.390383 " ,
162
+ "modified" : " 2025-03-16 21:18:58.738406 " ,
160
163
"modified_by" : " Administrator" ,
161
164
"module" : " D2H" ,
162
165
"name" : " Purchase Receipt Item Duplicate" ,
Original file line number Diff line number Diff line change 1
1
frappe . ui . form . on ( "Delivery Note" , {
2
+ refresh : function ( frm ) {
3
+ frm . doc . custom_delivery_note_item_duplicate = [ ] ;
4
+ frm . refresh_field ( "custom_delivery_note_item_duplicate" ) ;
5
+ frm . doc . items . map ( ( item ) => {
6
+ if ( item . item_code ) {
7
+ const new_item = frm . add_child ( "custom_delivery_note_item_duplicate" ) ;
8
+ new_item . item_code = item . item_code ;
9
+ new_item . qty = item . qty ;
10
+ new_item . uom = item . uom ;
11
+ new_item . stock_uom = item . stock_uom ;
12
+ new_item . conversion_factor = item . conversion_factor ;
13
+ new_item . stock_qty = item . stock_qty ;
14
+ new_item . serial_no = item . serial_no ;
15
+ new_item . serial_and_batch_bundle = item . serial_and_batch_bundle ;
16
+ new_item . use_serial_batch_fields = item . use_serial_batch_fields ;
17
+ }
18
+ } ) ;
19
+ frm . refresh_field ( "custom_delivery_note_item_duplicate" ) ;
20
+ } ,
2
21
onload : function ( frm ) {
3
22
if (
4
23
frappe . user_roles . includes ( "Store Dept" ) &&
You can’t perform that action at this time.
0 commit comments