Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ repos:
- tomli

- repo: https://github.com/agritheory/test_utils
rev: v1.0.0
rev: v1.7.1
hooks:
- id: update_pre_commit_config
- id: validate_copyright
Expand Down
8 changes: 0 additions & 8 deletions beam/beam/custom/bom_scrap_item.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"creation": "2023-08-22 15:23:16.272692",
"default": null,
"docstatus": 0,
"dt": "BOM Scrap Item",
"fetch_if_empty": 0,
"fieldname": "create_handling_unit",
Expand All @@ -29,15 +27,11 @@
"is_virtual": 0,
"label": "Create Handling Unit",
"length": 0,
"modified": "2023-08-22 15:23:52.267428",
"modified_by": "Administrator",
"module": "BEAM",
"name": "BOM Scrap Item-create_handling_unit",
"no_copy": 0,
"non_negative": 0,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
Expand All @@ -49,9 +43,7 @@
"unique": 0
}
],
"custom_perms": [],
"doctype": "BOM Scrap Item",
"links": [],
"property_setters": [],
"sync_on_migrate": 1
}
8 changes: 0 additions & 8 deletions beam/beam/custom/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"creation": "2024-02-26 23:52:53.051024",
"default": "1",
"docstatus": 0,
"dt": "Item",
"fetch_if_empty": 0,
"fieldname": "enable_handling_unit",
Expand All @@ -29,15 +27,11 @@
"is_virtual": 0,
"label": "Enable Handling Unit",
"length": 0,
"modified": "2024-02-26 23:52:53.051024",
"modified_by": "Administrator",
"module": "BEAM",
"name": "Item-enable_handling_unit",
"no_copy": 0,
"non_negative": 0,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
Expand All @@ -49,9 +43,7 @@
"unique": 0
}
],
"custom_perms": [],
"doctype": "Item",
"links": [],
"property_setters": [],
"sync_on_migrate": 1
}
6 changes: 0 additions & 6 deletions beam/beam/custom/item_barcode.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
{
"custom_fields": [],
"custom_perms": [],
"doctype": "Item Barcode",
"property_setters": [
{
"creation": "2022-06-16 09:40:22.875922",
"doc_type": "Item Barcode",
"docstatus": 0,
"doctype_or_field": "DocField",
"field_name": "barcode_type",
"idx": 0,
"modified": "2022-06-16 09:40:22.875922",
"modified_by": "Administrator",
"module": "BEAM",
"name": "Item Barcode-barcode_type-options",
"owner": "Administrator",
"property": "options",
"property_type": "Text",
"value": "\nEAN\nUPC-A\nCode128"
Expand Down
9 changes: 0 additions & 9 deletions beam/beam/custom/stock_entry_detail.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"creation": "2023-09-13 12:51:04.950175",
"default": null,
"depends_on": "",
"docstatus": 0,
"dt": "Stock Entry Detail",
"fetch_if_empty": 0,
"fieldname": "recombine_on_cancel",
Expand All @@ -30,15 +27,11 @@
"is_virtual": 0,
"label": "Recombine On Cancel",
"length": 0,
"modified": "2023-09-13 12:51:04.950175",
"modified_by": "Administrator",
"module": "BEAM",
"name": "Stock Entry Detail-recombine_on_cancel",
"no_copy": 1,
"non_negative": 0,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
Expand All @@ -50,9 +43,7 @@
"unique": 0
}
],
"custom_perms": [],
"doctype": "Stock Entry Detail",
"links": [],
"property_setters": [],
"sync_on_migrate": 1
}
14 changes: 0 additions & 14 deletions beam/beam/custom/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"creation": "2022-06-16 09:48:36.521275",
"default": null,
"docstatus": 0,
"dt": "User",
"fetch_if_empty": 0,
"fieldname": "barcode_section",
Expand All @@ -27,15 +25,11 @@
"insert_after": "mobile_no",
"label": "Barcodes",
"length": 0,
"modified": "2022-06-16 09:48:36.521275",
"modified_by": "Administrator",
"module": "BEAM",
"name": "User-barcode_section",
"no_copy": 0,
"non_negative": 0,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
Expand All @@ -51,9 +45,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"creation": "2022-06-16 09:48:36.701251",
"default": null,
"docstatus": 0,
"dt": "User",
"fetch_if_empty": 0,
"fieldname": "barcodes",
Expand All @@ -70,18 +62,13 @@
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "barcode_section",
"label": "",
"length": 0,
"modified": "2022-06-16 09:48:36.701251",
"modified_by": "Administrator",
"module": "BEAM",
"name": "User-barcodes",
"no_copy": 0,
"non_negative": 0,
"options": "Item Barcode",
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
Expand All @@ -92,7 +79,6 @@
"unique": 0
}
],
"custom_perms": [],
"doctype": "User",
"property_setters": [],
"sync_on_migrate": 1
Expand Down
14 changes: 0 additions & 14 deletions beam/beam/custom/warehouse.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"creation": "2022-06-16 09:48:36.521275",
"default": null,
"docstatus": 0,
"dt": "Warehouse",
"fetch_if_empty": 0,
"fieldname": "barcode_section",
Expand All @@ -27,15 +25,11 @@
"insert_after": "pin",
"label": "Barcodes",
"length": 0,
"modified": "2022-06-16 09:48:36.521275",
"modified_by": "Administrator",
"module": "BEAM",
"name": "Warehouse-barcode_section",
"no_copy": 0,
"non_negative": 0,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
Expand All @@ -51,9 +45,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"creation": "2022-06-16 09:48:36.701251",
"default": null,
"docstatus": 0,
"dt": "Warehouse",
"fetch_if_empty": 0,
"fieldname": "barcodes",
Expand All @@ -70,18 +62,13 @@
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "barcode_section",
"label": "",
"length": 0,
"modified": "2022-06-16 09:48:36.701251",
"modified_by": "Administrator",
"module": "BEAM",
"name": "Warehouse-barcodes",
"no_copy": 0,
"non_negative": 0,
"options": "Item Barcode",
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
Expand All @@ -92,7 +79,6 @@
"unique": 0
}
],
"custom_perms": [],
"doctype": "Warehouse",
"property_setters": [],
"sync_on_migrate": 1
Expand Down
11 changes: 11 additions & 0 deletions beam/beam/overrides/company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2026, AgriTheory and contributors
# For license information, please see license.txt

import frappe

from beam.beam.doctype.beam_settings.beam_settings import create_beam_settings


def create_company_beam_settings(doc, method=None):
if not frappe.db.exists("BEAM Settings", {"company": doc.name}):
create_beam_settings(doc.name)
3 changes: 2 additions & 1 deletion beam/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def load_customizations():
if existing_field
else frappe.new_doc("Custom Field")
)
field.pop("modified")
if "modified" in field:
field.pop("modified")
{custom_field.set(key, value) for key, value in field.items()}
custom_field.flags.ignore_permissions = True
custom_field.flags.ignore_version = True
Expand Down
3 changes: 3 additions & 0 deletions beam/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@
"beam.beam.demand.demand.modify_allocations",
],
},
"Company": {
"after_insert": "beam.beam.overrides.company.create_company_beam_settings",
},
}

# Types
Expand Down
Loading
Loading