feat: serial and batch bundle for Subcontracting

This commit is contained in:
Rohit Waghchaure
2023-03-16 12:58:48 +05:30
parent e6143abb8a
commit 5ddd55a8ae
12 changed files with 320 additions and 89 deletions

View File

@@ -7,6 +7,7 @@ frappe.provide('erpnext.buying');
frappe.ui.form.on('Subcontracting Receipt', {
setup: (frm) => {
frm.ignore_doctypes_on_cancel_all = ['Serial and Batch Bundle'];
frm.get_field('supplied_items').grid.cannot_add_rows = true;
frm.get_field('supplied_items').grid.only_sortable();

View File

@@ -105,7 +105,12 @@ class SubcontractingReceipt(SubcontractingController):
self.update_status()
def on_cancel(self):
self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry", "Repost Item Valuation")
self.ignore_linked_doctypes = (
"GL Entry",
"Stock Ledger Entry",
"Repost Item Valuation",
"Serial and Batch Bundle",
)
self.update_status_updater_args()
self.update_prevdoc_status()
self.update_stock_ledger()

View File

@@ -33,6 +33,7 @@
],
"fields": [
{
"columns": 2,
"fieldname": "main_item_code",
"fieldtype": "Link",
"in_list_view": 1,
@@ -41,6 +42,7 @@
"read_only": 1
},
{
"columns": 2,
"fieldname": "rm_item_code",
"fieldtype": "Link",
"in_list_view": 1,
@@ -77,14 +79,16 @@
"fieldtype": "Column Break"
},
{
"columns": 1,
"fieldname": "required_qty",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Required Qty",
"print_hide": 1,
"read_only": 1
},
{
"columns": 2,
"columns": 1,
"fieldname": "consumed_qty",
"fieldtype": "Float",
"in_list_view": 1,
@@ -102,6 +106,7 @@
{
"fieldname": "rate",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Rate",
"options": "Company:company:default_currency",
"read_only": 1
@@ -124,7 +129,6 @@
{
"fieldname": "current_stock",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Current Stock",
"read_only": 1
},
@@ -188,25 +192,25 @@
"default": "0",
"fieldname": "available_qty_for_consumption",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Available Qty For Consumption",
"print_hide": 1,
"read_only": 1
},
{
"columns": 2,
"fieldname": "serial_and_batch_bundle",
"fieldtype": "Link",
"label": "Serial and Batch Bundle",
"in_list_view": 1,
"label": "Serial / Batch Bundle",
"no_copy": 1,
"options": "Serial and Batch Bundle",
"print_hide": 1,
"read_only": 1
"print_hide": 1
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2023-03-12 14:11:48.816699",
"modified": "2023-03-15 13:55:08.132626",
"modified_by": "Administrator",
"module": "Subcontracting",
"name": "Subcontracting Receipt Supplied Item",