Add Tryton synchronization for CatalogSale
- Add external_id field to CatalogSale model for tracking synced sales - Create migration 0047 for external_id field - Add TrytonCatalogSale and TrytonCatalogSaleLine classes for Tryton RPC format - Add send_catalog_sales_to_tryton() method to SaleTrytonService - Create CatalogSalesToTrytonView API endpoint (POST) - Register endpoint at /don_confiao/api/enviar_catalog_sales_a_tryton - Add test for external_id field functionality - Catalog sales sync to same Tryton model as Sale (model.sale.sale.create) - Differentiated by reference 'don_confiao_catalog X' and description 'Venta de catálogo' - Filters only catalog sales without external_id to avoid duplicates
This commit is contained in:
@@ -16,6 +16,7 @@ from .api import (
|
||||
CatalogSaleSummary,
|
||||
SalesForTrytonView,
|
||||
SalesToTrytonView,
|
||||
CatalogSalesToTrytonView,
|
||||
# Payments
|
||||
ReconciliateJarView,
|
||||
ReconciliateJarModelView,
|
||||
@@ -77,6 +78,11 @@ urlpatterns = [
|
||||
SalesToTrytonView.as_view(),
|
||||
name="send_tryton",
|
||||
),
|
||||
path(
|
||||
"api/enviar_catalog_sales_a_tryton",
|
||||
CatalogSalesToTrytonView.as_view(),
|
||||
name="send_catalog_sales_tryton",
|
||||
),
|
||||
path(
|
||||
"api/admin_code/validate/<code>",
|
||||
AdminCodeValidateView.as_view(),
|
||||
|
||||
Reference in New Issue
Block a user