Close review gaps: gate fixes, cylinder register, roll tracking, costing, Uganda setup #1
Reference in New Issue
Block a user
Delete Branch "feat/review-backlog-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR addresses the blocker and major findings from the pre-implementation review against Makap Uganda ERP Review PRD v1.1. It does not change any data on the live site;
bench migrateadds fields, roles and permissions, and the company setup runs only by hand.Fixes to existing gates
evaluate_work_order_readiness,evaluate_material_availability,apply_quality_dispositionand the closurerecomputesaved withignore_permissions, so any desk user could mark a Work Order Ready or put a QI on Hold. They now require the right role plus write permission.New capability
setup_uganda.run: a dry-run-first script for a UGX company, VAT 18% templates, stage WIP, Quarantine and Returns Hold warehouses, and manufacturing settings. It never deletes; the Kenya company stays until someone removes it by hand.Rollout
developand deploy to a staging site first.bench migrate, thenbench --site <site> run-tests --app makap_backend.setup_uganda.runas a dry run, review the plan, then run it withconfirm=1.Testing
test_gates.py(11 cases, database reads mocked) passes locally against Frappe v15 source.test_print_cylinder.pyneeds a test site with ERPNext. Not run yet, because there was no bench to run it on.setup_uganda.py, the two reports and the migrate-time field moves are not yet run against a database. Staging is the first real check.Decisions Makap still owns
Roll identity (one batch per roll), cylinder ownership, consumption costing method, company name and fiscal year, and the EFRIS route. The current defaults are listed in the README.