|
|
@@ -16,6 +16,8 @@ from .filters import DataFilter, DataMsFilter, TbFgPressFilter, LotSummaryFilter
|
|
16
|
16
|
from django.urls import reverse
|
|
17
|
17
|
from django.contrib import messages
|
|
18
|
18
|
from pprint import pprint
|
|
|
19
|
+from core.models import VMasterView, MgMasterView, BelMasterView, EMasterView
|
|
|
20
|
+from core.filters import VMasterViewFilter, MgMasterViewFilter, BelMasterViewFilter, EMasterViewFilter
|
|
19
|
21
|
|
|
20
|
22
|
from core.utils import ConfigurableCRUDView
|
|
21
|
23
|
|
|
|
@@ -170,4 +172,132 @@ class LotSummaryCRUDView(ConfigurableCRUDView):
|
|
170
|
172
|
config_readonly_fields = ["lot_no"]
|
|
171
|
173
|
# config_edit_fields = ["lot_no", "code"]
|
|
172
|
174
|
ordering = ["-created_at", "-id",]
|
|
|
175
|
+
|
|
|
176
|
+class VMasterViewCRUDView(ConfigurableCRUDView):
|
|
|
177
|
+ """
|
|
|
178
|
+ CRUD view for managing VMasterView objects.
|
|
|
179
|
+ """
|
|
|
180
|
+ model = VMasterView
|
|
|
181
|
+ list_template_name = 'legacy/datacrud_list.html'
|
|
|
182
|
+ detail_template_name = 'legacy/datacrud_detail.html'
|
|
|
183
|
+ form_template_name = 'legacy/datacrud_form.html'
|
|
|
184
|
+ confirm_delete_template_name = 'legacy/datacrud_confirm_delete.html'
|
|
|
185
|
+ filterset_class = VMasterViewFilter # Replace with the appropriate filter class if needed
|
|
|
186
|
+
|
|
|
187
|
+ # Page title and URL mappings
|
|
|
188
|
+ page_title = "VMaster View"
|
|
|
189
|
+ list_url_name = 'legacy:vm-list'
|
|
|
190
|
+ create_url_name = 'legacy:vm-create'
|
|
|
191
|
+ update_url_name = 'legacy:vm-update'
|
|
|
192
|
+ delete_url_name = 'legacy:vm-delete'
|
|
|
193
|
+
|
|
|
194
|
+ # Configuration for fields
|
|
|
195
|
+ # config_fields = ["id", "code", "description", "created_at", "updated_at"]
|
|
|
196
|
+ # config_field_orders = ["id", "code", "description", "created_at", "updated_at"]
|
|
|
197
|
+ # config_readonly_fields = ["id", "created_at"]
|
|
|
198
|
+
|
|
|
199
|
+ # Default ordering
|
|
|
200
|
+ # ordering = ["-created_at", "-id"]
|
|
|
201
|
+
|
|
|
202
|
+class MgMasterViewCRUDView(ConfigurableCRUDView):
|
|
|
203
|
+ """
|
|
|
204
|
+ CRUD view for managing MgMasterView objects.
|
|
|
205
|
+ """
|
|
|
206
|
+ model = MgMasterView
|
|
|
207
|
+ list_template_name = 'legacy/datacrud_list.html'
|
|
|
208
|
+ detail_template_name = 'legacy/datacrud_detail.html'
|
|
|
209
|
+ form_template_name = 'legacy/datacrud_form.html'
|
|
|
210
|
+ confirm_delete_template_name = 'legacy/datacrud_confirm_delete.html'
|
|
|
211
|
+ filterset_class = MgMasterViewFilter # Replace with the appropriate filter class if needed
|
|
|
212
|
+
|
|
|
213
|
+ # Page title and URL mappings
|
|
|
214
|
+ page_title = "MgMaster View"
|
|
|
215
|
+ list_url_name = 'legacy:mg-list'
|
|
|
216
|
+ create_url_name = 'legacy:mg-create'
|
|
|
217
|
+ update_url_name = 'legacy:mg-update'
|
|
|
218
|
+ delete_url_name = 'legacy:mg-delete'
|
|
|
219
|
+
|
|
|
220
|
+ # Configuration for fields
|
|
|
221
|
+ # config_fields = [
|
|
|
222
|
+ # "id", "PRO0", "PRO1", "PRO1C", "PRO2", "PRO5",
|
|
|
223
|
+ # "PRO8", "PRO9", "PRO10", "PRO11", "PRO12"
|
|
|
224
|
+ # ]
|
|
|
225
|
+ # config_field_orders = [
|
|
|
226
|
+ # "id", "PRO0", "PRO1", "PRO1C", "PRO2", "PRO5",
|
|
|
227
|
+ # "PRO8", "PRO9", "PRO10", "PRO11", "PRO12"
|
|
|
228
|
+ # ]
|
|
|
229
|
+ # config_readonly_fields = ["id"]
|
|
|
230
|
+
|
|
|
231
|
+ # Default ordering
|
|
|
232
|
+ # ordering = ["-id", "PRO2"]
|
|
|
233
|
+
|
|
|
234
|
+class BelMasterViewCRUDView(ConfigurableCRUDView):
|
|
|
235
|
+ """
|
|
|
236
|
+ CRUD view for managing BelMasterView objects.
|
|
|
237
|
+ """
|
|
|
238
|
+ model = BelMasterView
|
|
|
239
|
+ list_template_name = 'legacy/datacrud_list.html'
|
|
|
240
|
+ detail_template_name = 'legacy/datacrud_detail.html'
|
|
|
241
|
+ form_template_name = 'legacy/datacrud_form.html'
|
|
|
242
|
+ confirm_delete_template_name = 'legacy/datacrud_confirm_delete.html'
|
|
|
243
|
+ filterset_class = BelMasterViewFilter # Replace with the appropriate filter class if needed
|
|
|
244
|
+
|
|
|
245
|
+ # Page title and URL mappings
|
|
|
246
|
+ page_title = "BelMaster View"
|
|
|
247
|
+ list_url_name = 'legacy:bel-list'
|
|
|
248
|
+ create_url_name = 'legacy:bel-create'
|
|
|
249
|
+ update_url_name = 'legacy:bel-update'
|
|
|
250
|
+ delete_url_name = 'legacy:bel-delete'
|
|
|
251
|
+
|
|
|
252
|
+ # Configuration for fields
|
|
|
253
|
+ # config_fields = [
|
|
|
254
|
+ # "id", "PRO0", "PRO1", "PRO1C", "PRO2", "PRO5",
|
|
|
255
|
+ # "PRO8", "PRO9", "PRO10", "PRO11", "PRO12", "MC11",
|
|
|
256
|
+ # "MC12", "MC14", "MC15", "MC16", "MC19", "MC20", "MC21"
|
|
|
257
|
+ # ]
|
|
|
258
|
+ # config_field_orders = [
|
|
|
259
|
+ # "id", "PRO0", "PRO1", "PRO1C", "PRO2", "PRO5",
|
|
|
260
|
+ # "PRO8", "PRO9", "PRO10", "PRO11", "PRO12", "MC11",
|
|
|
261
|
+ # "MC12", "MC14", "MC15", "MC16", "MC19", "MC20", "MC21"
|
|
|
262
|
+ # ]
|
|
|
263
|
+ # config_readonly_fields = ["id"]
|
|
|
264
|
+
|
|
|
265
|
+ # Default ordering
|
|
|
266
|
+ # ordering = ["-id", "PRO2"]
|
|
|
267
|
+
|
|
|
268
|
+class EMasterViewCRUDView(ConfigurableCRUDView):
|
|
|
269
|
+ """
|
|
|
270
|
+ CRUD view for managing EMasterView objects.
|
|
|
271
|
+ """
|
|
|
272
|
+ model = EMasterView
|
|
|
273
|
+ list_template_name = 'legacy/datacrud_list.html'
|
|
|
274
|
+ detail_template_name = 'legacy/datacrud_detail.html'
|
|
|
275
|
+ form_template_name = 'legacy/datacrud_form.html'
|
|
|
276
|
+ confirm_delete_template_name = 'legacy/datacrud_confirm_delete.html'
|
|
|
277
|
+ filterset_class = EMasterViewFilter # Replace with the appropriate filter class
|
|
|
278
|
+
|
|
|
279
|
+ # Page title and URL mappings
|
|
|
280
|
+ page_title = "EMaster View"
|
|
|
281
|
+ list_url_name = 'legacy:em-list'
|
|
|
282
|
+ create_url_name = 'legacy:em-create'
|
|
|
283
|
+ update_url_name = 'legacy:em-update'
|
|
|
284
|
+ delete_url_name = 'legacy:em-delete'
|
|
|
285
|
+
|
|
|
286
|
+ # Configuration for fields
|
|
|
287
|
+ # config_fields = [
|
|
|
288
|
+ # "id", "PRO0", "PRO1", "PRO1C", "PRO2", "PRO5",
|
|
|
289
|
+ # "PRO8", "PRO9", "PRO10", "PRO11", "PRO12", "PRO13",
|
|
|
290
|
+ # "PRO14", "PRO15", "PRO16", "PRO17", "PRO18", "PRO21",
|
|
|
291
|
+ # "PRO25", "PRO27"
|
|
|
292
|
+ # ]
|
|
|
293
|
+ # config_field_orders = [
|
|
|
294
|
+ # "id", "PRO0", "PRO1", "PRO1C", "PRO2", "PRO5",
|
|
|
295
|
+ # "PRO8", "PRO9", "PRO10", "PRO11", "PRO12", "PRO13",
|
|
|
296
|
+ # "PRO14", "PRO15", "PRO16", "PRO17", "PRO18", "PRO21",
|
|
|
297
|
+ # "PRO25", "PRO27"
|
|
|
298
|
+ # ]
|
|
|
299
|
+ # config_readonly_fields = ["id"]
|
|
|
300
|
+
|
|
|
301
|
+ # Default ordering
|
|
|
302
|
+ # ordering = ["-id", "PRO2"]
|
|
173
|
303
|
|