diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ad32f63..0413663 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,8 +36,12 @@ repos: - id: flake8 additional_dependencies: ['flake8-bugbear'] + - repo: https://github.com/agritheory/test_utils rev: v0.14.1 + + - repo: https://github.com/agritheory/test_utils + rev: v0.14.0 hooks: - id: update_pre_commit_config - id: mypy diff --git a/inventory_tools/customize.py b/inventory_tools/customize.py index ab5ecb9..06a0b32 100644 --- a/inventory_tools/customize.py +++ b/inventory_tools/customize.py @@ -10,6 +10,7 @@ def load_customizations(): customizations_directory = ( Path().cwd().parent / "apps" / "inventory_tools" / "inventory_tools" / "inventory_tools" / "custom" + ) files = list(customizations_directory.glob("**/*.json")) for file in files: diff --git a/inventory_tools/inventory_tools/doctype/inventory_tools_settings/inventory_tools_settings.json b/inventory_tools/inventory_tools/doctype/inventory_tools_settings/inventory_tools_settings.json index d66e38f..c714e59 100644 --- a/inventory_tools/inventory_tools/doctype/inventory_tools_settings/inventory_tools_settings.json +++ b/inventory_tools/inventory_tools/doctype/inventory_tools_settings/inventory_tools_settings.json @@ -33,6 +33,7 @@ "faceted_search_tab", "show_on_website", "show_in_listview" + ], "fields": [ { diff --git a/inventory_tools/inventory_tools/overrides/production_plan.py b/inventory_tools/inventory_tools/overrides/production_plan.py index f575ae5..46472b9 100644 --- a/inventory_tools/inventory_tools/overrides/production_plan.py +++ b/inventory_tools/inventory_tools/overrides/production_plan.py @@ -1,6 +1,7 @@ # Copyright (c) 2024, AgriTheory and contributors # For license information, please see license.txt + import json import frappe @@ -9,6 +10,7 @@ from erpnext.manufacturing.doctype.work_order.work_order import get_default_warehouse + class InventoryToolsProductionPlan(ProductionPlan): @frappe.whitelist() def make_work_order(self): diff --git a/inventory_tools/inventory_tools/overrides/stock_entry.py b/inventory_tools/inventory_tools/overrides/stock_entry.py index 6852018..cc005c2 100644 --- a/inventory_tools/inventory_tools/overrides/stock_entry.py +++ b/inventory_tools/inventory_tools/overrides/stock_entry.py @@ -54,18 +54,14 @@ def check_if_operations_completed(self): def validate_finished_goods(self): """ - <<<<<<< HEAD - HASH: 153e0ba81b62acc170a951a289363fff5579edc7 - ======= - HASH: 54791e938bd56eb81f7d8d923381a006998919fe - >>>>>>> 12d5afa2ce39627719b130a5ed0e5ce879c818f6 - REPO: https://github.com/frappe/erpnext/ - PATH: erpnext/stock/doctype/stock_entry/stock_entry.py - METHOD: validate_finished_goods - - 1. Check if FG exists (mfg, repack) - 2. Check if Multiple FG Items are present (mfg) - 3. Check FG Item and Qty against WO if present (mfg) + HASH: 54791e938bd56eb81f7d8d923381a006998919fe + REPO: https://github.com/frappe/erpnext/ + PATH: erpnext/stock/doctype/stock_entry/stock_entry.py + METHOD: validate_finished_goods + + 1. Check if FG exists (mfg, repack) + 2. Check if Multiple FG Items are present (mfg) + 3. Check FG Item and Qty against WO if present (mfg) """ production_item, wo_qty, finished_items = None, 0, [] @@ -124,17 +120,13 @@ def validate_finished_goods(self): def get_pending_raw_materials(self, backflush_based_on=None): """ - <<<<<<< HEAD - HASH: 153e0ba81b62acc170a951a289363fff5579edc7 - ======= - HASH: 54791e938bd56eb81f7d8d923381a006998919fe - >>>>>>> 12d5afa2ce39627719b130a5ed0e5ce879c818f6 - REPO: https://github.com/frappe/erpnext/ - PATH: erpnext/stock/doctype/stock_entry/stock_entry.py - METHOD: get_pending_raw_materials - - issue (item quantity) that is pending to issue or desire to transfer, - whichever is less + HASH: 54791e938bd56eb81f7d8d923381a006998919fe + REPO: https://github.com/frappe/erpnext/ + PATH: erpnext/stock/doctype/stock_entry/stock_entry.py + METHOD: get_pending_raw_materials + + issue (item quantity) that is pending to issue or desire to transfer, + whichever is less """ item_dict = self.get_pro_order_required_items(backflush_based_on) diff --git a/pyproject.toml b/pyproject.toml index b7cef68..c22a854 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,8 +18,8 @@ mypy = "^1.10.0" requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" -# [tool.pytest.ini_options] -# addopts = "--cov=inventory_tools --cov-report term-missing" +[tool.pytest.ini_options] +addopts = "--cov=inventory_tools --cov-report term-missing" [tool.black] line-length = 99