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)
This commit is contained in:
@@ -8,6 +8,9 @@ app_name = "don_confiao"
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register(r"sales", api_views.SaleView, basename="sale")
|
||||
router.register(
|
||||
r"catalog_sales", api_views.CatalogSaleView, basename="catalog_sale"
|
||||
)
|
||||
router.register(r"customers", api_views.CustomerView, basename="customer")
|
||||
router.register(r"products", api_views.ProductView, basename="product")
|
||||
router.register(
|
||||
@@ -23,6 +26,17 @@ urlpatterns = [
|
||||
api_views.SaleSummary.as_view(),
|
||||
name="purchase_json_summary",
|
||||
),
|
||||
path(
|
||||
"payment_methods/all/select_format",
|
||||
api_views.PaymentMethodView.as_view(),
|
||||
name="payment_methods_to_select",
|
||||
),
|
||||
path(
|
||||
"purchases/for_reconciliation",
|
||||
api_views.SalesForReconciliationView.as_view(),
|
||||
name="sales_for_reconciliation",
|
||||
),
|
||||
path("reconciliate_jar", api_views.ReconciliateJarView.as_view()),
|
||||
path("api/", include(router.urls)),
|
||||
path(
|
||||
"api/importar_productos_de_tryton",
|
||||
@@ -39,17 +53,6 @@ urlpatterns = [
|
||||
api_views.SalesToTrytonView.as_view(),
|
||||
name="send_tryton",
|
||||
),
|
||||
path(
|
||||
"payment_methods/all/select_format",
|
||||
api_views.PaymentMethodView.as_view(),
|
||||
name="payment_methods_to_select",
|
||||
),
|
||||
path(
|
||||
"purchases/for_reconciliation",
|
||||
api_views.SalesForReconciliationView.as_view(),
|
||||
name="sales_for_reconciliation",
|
||||
),
|
||||
path("reconciliate_jar", api_views.ReconciliateJarView.as_view()),
|
||||
path(
|
||||
"api/admin_code/validate/<code>",
|
||||
api_views.AdminCodeValidateView.as_view(),
|
||||
|
||||
Reference in New Issue
Block a user