fix: use old serial / batch fields to make serial batch bundle

(cherry picked from commit 9fafc83632)
This commit is contained in:
Rohit Waghchaure
2024-02-04 10:42:31 +05:30
committed by Mergify
parent 53992deb10
commit 282c19e7e1
43 changed files with 652 additions and 370 deletions

View File

@@ -149,6 +149,7 @@ class SubcontractingReceipt(SubcontractingController):
self.update_prevdoc_status()
self.set_subcontracting_order_status()
self.set_consumed_qty_in_subcontract_order()
self.make_bundle_using_old_serial_batch_fields()
self.update_stock_ledger()
self.make_gl_entries()
self.repost_future_sle_and_gle()

View File

@@ -48,11 +48,14 @@
"reference_name",
"section_break_45",
"serial_and_batch_bundle",
"serial_no",
"use_serial_batch_fields",
"col_break5",
"rejected_serial_and_batch_bundle",
"batch_no",
"section_break_jshh",
"serial_no",
"rejected_serial_no",
"column_break_henr",
"batch_no",
"manufacture_details",
"manufacturer",
"column_break_16",
@@ -311,22 +314,20 @@
"label": "Serial and Batch Details"
},
{
"depends_on": "eval:!doc.is_fixed_asset",
"depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1",
"fieldname": "serial_no",
"fieldtype": "Small Text",
"label": "Serial No",
"no_copy": 1,
"read_only": 1
"no_copy": 1
},
{
"depends_on": "eval:!doc.is_fixed_asset",
"depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1",
"fieldname": "batch_no",
"fieldtype": "Link",
"label": "Batch No",
"no_copy": 1,
"options": "Batch",
"print_hide": 1,
"read_only": 1
"print_hide": 1
},
{
"depends_on": "eval: !parent.is_return",
@@ -478,6 +479,7 @@
"label": "Accounting Details"
},
{
"depends_on": "eval:doc.use_serial_batch_fields === 0",
"fieldname": "serial_and_batch_bundle",
"fieldtype": "Link",
"label": "Serial and Batch Bundle",
@@ -486,6 +488,7 @@
"print_hide": 1
},
{
"depends_on": "eval:doc.use_serial_batch_fields === 0",
"fieldname": "rejected_serial_and_batch_bundle",
"fieldtype": "Link",
"label": "Rejected Serial and Batch Bundle",
@@ -546,12 +549,27 @@
"fieldtype": "Check",
"label": "Include Exploded Items",
"print_hide": 1
},
{
"default": "0",
"fieldname": "use_serial_batch_fields",
"fieldtype": "Check",
"label": "Use Serial No / Batch Fields"
},
{
"depends_on": "eval:doc.use_serial_batch_fields === 1",
"fieldname": "section_break_jshh",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_henr",
"fieldtype": "Column Break"
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2023-11-30 12:05:51.920705",
"modified": "2024-02-04 16:23:30.374865",
"modified_by": "Administrator",
"module": "Subcontracting",
"name": "Subcontracting Receipt Item",

View File

@@ -58,6 +58,7 @@ class SubcontractingReceiptItem(Document):
subcontracting_order: DF.Link | None
subcontracting_order_item: DF.Data | None
subcontracting_receipt_item: DF.Data | None
use_serial_batch_fields: DF.Check
warehouse: DF.Link | None
# end: auto-generated types

View File

@@ -26,10 +26,13 @@
"current_stock",
"secbreak_3",
"serial_and_batch_bundle",
"batch_no",
"use_serial_batch_fields",
"col_break4",
"subcontracting_order",
"section_break_zwnh",
"serial_no",
"subcontracting_order"
"column_break_qibi",
"batch_no"
],
"fields": [
{
@@ -60,19 +63,19 @@
"width": "300px"
},
{
"depends_on": "eval:doc.use_serial_batch_fields === 1",
"fieldname": "batch_no",
"fieldtype": "Link",
"label": "Batch No",
"no_copy": 1,
"options": "Batch",
"read_only": 1
"options": "Batch"
},
{
"depends_on": "eval:doc.use_serial_batch_fields === 1",
"fieldname": "serial_no",
"fieldtype": "Text",
"label": "Serial No",
"no_copy": 1,
"read_only": 1
"no_copy": 1
},
{
"fieldname": "col_break1",
@@ -198,6 +201,7 @@
},
{
"columns": 2,
"depends_on": "eval:doc.use_serial_batch_fields === 0",
"fieldname": "serial_and_batch_bundle",
"fieldtype": "Link",
"in_list_view": 1,
@@ -205,12 +209,27 @@
"no_copy": 1,
"options": "Serial and Batch Bundle",
"print_hide": 1
},
{
"default": "0",
"fieldname": "use_serial_batch_fields",
"fieldtype": "Check",
"label": "Use Serial No / Batch Fields"
},
{
"depends_on": "eval:doc.use_serial_batch_fields === 1",
"fieldname": "section_break_zwnh",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_qibi",
"fieldtype": "Column Break"
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2023-03-15 13:55:08.132626",
"modified": "2024-02-04 16:32:17.534162",
"modified_by": "Administrator",
"module": "Subcontracting",
"name": "Subcontracting Receipt Supplied Item",

View File

@@ -35,6 +35,7 @@ class SubcontractingReceiptSuppliedItem(Document):
serial_no: DF.Text | None
stock_uom: DF.Link | None
subcontracting_order: DF.Link | None
use_serial_batch_fields: DF.Check
# end: auto-generated types
pass