feat/49-provenance Implementa trazabilidad de proveedores #49 #50

Merged
mono merged 6 commits from feat/49-provenance into main 2026-08-16 22:17:35 -05:00

6 Commits

Author SHA1 Message Date
b5d057bd1a Merge branch 'main' into feat/49-provenance 2026-08-16 22:15:11 -05:00
792ac4367c chore(#49): track seed script and geography CSV in git
Allowlist scripts/ in .gitignore (was caught by [Ss]cripts venv rule)
so seed_geography.py and colombia_municipios.csv can be committed.
This simplifies deployment since the files no longer need to be
copied separately to the server.
2026-08-16 21:58:12 -05:00
3a0c76ce69 feat(#49): add geolocation (latitude/longitude) to municipalities
- Municipality model with optional latitude/longitude decimal fields
- Municipality and brief serializers expose lat/lng (also in product_provenance of public/authenticated summaries for the Leaflet map)
- seed_geography endpoint reads lat/lng and updates existing municipalities on reseed (idempotent)
- TDD tests for model, serializers, summaries and seed
2026-08-16 04:10:45 -05:00
699983931e feat(#49): return FK details in department and municipality serializers
- DepartmentSerializer adds country_detail (nested country object)
- MunicipalitySerializer adds department_detail and country_detail
- Writable FK id fields kept for create/update
- Move geography brief serializers to serializers/geography.py
2026-08-16 03:23:56 -05:00
29d154e140 feat(#49): add product provenance (suppliers, organizations, geography)
- Country, Department, Municipality models (municipality unique per department)
- Organization and Supplier models, Supplier links to organization and municipality
- Product.suppliers M2M to link products to one or more suppliers
- Authenticated CRUD APIs for organizations, suppliers, countries, departments and municipalities (write only for administrators)
- product_provenance domain data embedded in sale/catalog summaries (public and authenticated)
- seed_geography endpoint (admin, idempotent) and scripts/seed_geography.py using pycountry + DANE municipalities CSV
- TDD tests for models, API permissions/CRUD and summary provenance data
2026-08-15 16:32:20 -05:00
b088794716 docs: agregar workflow TDD rojo/verde con confirmacion de fallos de tests 2026-08-15 14:56:09 -05:00