Skip to content

Commit

Permalink
fix: add company to workstation customizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Bansal committed Aug 20, 2024
1 parent 1d08015 commit f3189b6
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 18 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ repos:
hooks:
- id: black

- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args: [--remove-all-unused-imports, --in-place]

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
Expand Down
1 change: 0 additions & 1 deletion inventory_tools/hooks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) 2024, AgriTheory and contributors
# For license information, please see license.txt

from . import __version__ as app_version

app_name = "inventory_tools"
app_title = "Inventory Tools"
Expand Down
58 changes: 58 additions & 0 deletions inventory_tools/inventory_tools/custom/workstation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"custom_fields": [
{
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"creation": "2024-08-20 05:01:28.504010",
"default": null,
"docstatus": 0,
"dt": "Workstation",
"fetch_if_empty": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"hide_border": 0,
"hide_days": 0,
"hide_seconds": 0,
"idx": 5,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_preview": 0,
"in_standard_filter": 1,
"insert_after": "workstation_type",
"is_system_generated": 0,
"is_virtual": 0,
"label": "Company",
"length": 0,
"modified": "2024-08-20 05:01:28.504010",
"modified_by": "Administrator",
"name": "Workstation-company",
"no_copy": 0,
"non_negative": 0,
"options": "Company",
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"show_dashboard": 0,
"sort_options": 0,
"translatable": 0,
"unique": 0
}
],
"custom_perms": [],
"doctype": "Workstation",
"links": [],
"property_setters": [],
"sync_on_migrate": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"is_virtual": 0,
"label": "Shift Type",
"length": 0,
"modified": "2024-07-13 09:28:11.750725",
"modified": "2024-08-20 04:59:56.712644",
"modified_by": "Administrator",
"module": "Inventory Tools",
"name": "Workstation Working Hour-shift_type",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) 2024, AgriTheory and contributors
# For license information, please see license.txt

import frappe
from frappe.model.document import Document


Expand Down
1 change: 0 additions & 1 deletion inventory_tools/inventory_tools/faceted_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import frappe
from webshop.webshop.api import get_product_filter_data as webshop_get_product_filter_data
from webshop.webshop.product_data_engine.filters import ProductFiltersBuilder
from webshop.webshop.product_data_engine.query import ProductQuery
from webshop.webshop.doctype.override_doctype.item_group import get_child_groups_for_website
from frappe.utils.data import cint, flt, getdate

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# For license information, please see license.txt


import json

import frappe
from frappe import _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# See license.txt

import datetime
import json

import frappe
from erpnext.accounts.doctype.purchase_invoice.purchase_invoice import PurchaseInvoice
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) 2023, AgriTheory and Contributors
# See license.txt

import json

import frappe
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import PurchaseReceipt
Expand Down
1 change: 0 additions & 1 deletion inventory_tools/inventory_tools/overrides/uom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import frappe
from frappe.desk.reportview import execute
from frappe.desk.search import search_link


@frappe.whitelist()
Expand Down
2 changes: 0 additions & 2 deletions inventory_tools/inventory_tools/overrides/workstation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
# For license information, please see license.txt

import datetime
import json

import frappe
from erpnext.manufacturing.doctype.workstation.workstation import Workstation
from frappe.desk.reportview import execute
from frappe.desk.search import search_link
from frappe.utils.data import comma_and, flt, get_time, time_diff_in_hours


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import frappe
from erpnext.stock.doctype.item.item import get_last_purchase_details
from erpnext.stock.get_item_details import get_price_list_rate_for
from frappe import _
from frappe.query_builder import DocType
from frappe.query_builder.functions import Coalesce
from frappe.utils.data import fmt_money, getdate
Expand Down
6 changes: 0 additions & 6 deletions inventory_tools/tests/test_manufacturing_capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@

import frappe
import pytest
from erpnext.manufacturing.doctype.work_order.work_order import (
create_job_card,
make_stock_entry,
make_work_order,
)
from frappe.exceptions import ValidationError
from frappe.utils import getdate

from inventory_tools.inventory_tools.report.manufacturing_capacity.manufacturing_capacity import (
Expand Down
2 changes: 1 addition & 1 deletion inventory_tools/tests/test_overproduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytest
from erpnext.manufacturing.doctype.work_order.work_order import create_job_card, make_stock_entry
from frappe.exceptions import ValidationError
from frappe.utils import now, strip_html, get_datetime
from frappe.utils import strip_html, get_datetime

from inventory_tools.inventory_tools.overrides.work_order import get_allowance_percentage

Expand Down

0 comments on commit f3189b6

Please sign in to comment.