Commit Graph

19 Commits

Author SHA1 Message Date
f526330f9e feat: add product activation/deactivation and filtering by active status
- Add 'active' boolean field to Product model with default=True
- Implement ProductView.get_queryset() to filter products by active status
  - Default behavior: return only active products
  - Support query params: ?active=true|false|all
  - Support variations: 1/0, yes/no for true/false
  - Detail operations (GET/PATCH/DELETE by ID) work with all products
- Update ProductSerializer to include 'active' field
- Add comprehensive test suite (11 new tests):
  - Test filtering by active/inactive/all products
  - Test parameter variations (1, yes, 0, no)
  - Test PATCH to activate/deactivate products
  - Test default list behavior after status changes
- Update API documentation in doc/requests.org with examples
- All tests passing (13 product tests + 8 API tests)
2026-05-29 00:01:29 -05:00
7fe336b0ce chore: Improve style code 2026-05-28 20:28:25 -05:00
dde6f7329f fix: catalog sale lines not being created due to wrong field name and missing read_only config
- Changed test payload from 'saleline_set' to 'catalogsaleline_set'
- Removed extraneous fields 'payment_method' and 'catalog_sale' from test data
- Made 'catalog_sale' read_only in CatalogSaleLineSerializer to allow nested creation
2026-05-28 18:56:40 -05:00
47c18c760d feat: add CatalogSale model with abstract base classes for Sale/SaleLine
- Introduced SaleAbstractModel and SaleLineAbstractModel as abstract bases
- Added CatalogSale and CatalogSaleLine models inheriting from them
- Created migration 0045 for new models
- Added CatalogSaleView, CatalogSaleSerializer with nested line creation
- Registered new models in admin
- Added catalog_sales router endpoint to URLs
- Removed placeholder api/ package (now redundant)
2026-05-28 16:38:45 -05:00
f97b47081c refactor: split models into modules, remove template-based views, and clean up code style
- Split monolithic models.py into models/ package (customers, products, sales, payments, admin)
- Removed forms.py, all HTML templates, and associated template-based views
- Added api/ package with CatalogSaleView placeholder
- Updated all imports across project to use new model paths
- Removed obsolete tests (form, export, purchase, summary tests)
- Removed template-based URL patterns, kept only API endpoints
- Standardized string quotes (single to double) and reformatted code
2026-05-28 15:25:27 -05:00
1e16e6e983 feat: Add exernal_id to serializer issue #34 2026-03-14 18:07:44 -05:00
604bbd3ab9 #17 feat(API): add external id to sales on api. 2025-08-30 15:28:50 -05:00
e3f571afc5 #17 feat(API): add external id to customers on api. 2025-08-30 15:24:42 -05:00
2fcf884cce #90 feat(api): add payment method to sales. 2025-01-28 09:17:48 -05:00
432b7dad74 #84 refactor(SaleSummary): rename saleline_set to lines at serializer. 2024-12-31 14:30:20 -05:00
69d8b1d2ad #84 refactor(SaleSummary): move to apiview. 2024-12-31 13:51:11 -05:00
8b7c2efcb3 #84 refactor(SalesForReconciliation): move to apiview. 2024-12-31 13:26:47 -05:00
5dff7565f4 #84 refactor(paymentMethods): move to apiview. 2024-12-31 13:09:16 -05:00
1b425542b3 #69 feat(ReconciliationJar): send reconciliation jar from frontend 2024-12-14 19:42:59 -05:00
2ed8b5b3a5 Feat: Datos de contacto customer #46 2024-11-02 12:18:39 -05:00
0c065beb30 view(Purchase): generate purchase from vuetify. 2024-09-28 17:23:50 -05:00
19a618a671 fix(api): remove SaleWithLinesViewSet. 2024-09-08 22:33:41 -05:00
5adf9a9ce7 feat(api): implement endpoints to products, customer and sales. 2024-09-08 21:42:35 -05:00
eaa856e9da feat(api): implemented create sale as api endpoint. 2024-09-07 21:33:49 -05:00