Files
westech-r2/westech_r2/hooks.py
T
Westech Admin 750141827b Serial No: warehousing pricing + grading + hardware failure routing
- Grade options: High/Med/Low/Flagged (replaces A/B/C/D/F)
- assigned_price label → Recommended Price
- Client script: grade→price mapping (High→market_high, Med→market_median, Low→market_low)
- Flagged grade shows FLAGGED, no price, Dismantle status
- New fields: cpu_test (Pass/Fail), ram_test (Pass/Fail)
- CPU/RAM Fail → auto Flagged grade, Dismantle status, route to Dismantle warehouse
- Server-side validation prevents pricing on failed hardware
- pricing_status options updated: Needs Pricing/Priced/Flagged/Dismantle/Manual Override/Expired/Error
2026-05-19 15:33:34 +00:00

34 lines
799 B
Python

app_name = "westech_r2"
app_title = "Westech R2"
app_publisher = "Westech"
app_description = "R2 Tracking for Westech Recyclers"
app_email = ""
app_license = "MIT"
# Fixtures - these will be exported/imported
fixtures = [
"DocType",
"Custom Field",
"Client Script",
"Workspace",
]
# Required apps
required_apps = ["erpnext"]
# DocType event hooks
doc_events = {
"Pallet": {
"before_save": "westech_r2.doctype.pallet.pallet.update_serial_nos",
},
"Scheduled Pickup": {
"before_save": "westech_r2.doctype.scheduled_pickup.scheduled_pickup.set_title",
},
"Serial No": {
"validate": "westech_r2.api.serial_hooks.validate_hardware_tests",
},
"Load": {
"before_save": "westech_r2.doctype.load.load.calculate_totals",
},
}