feature/bitacora-correccion-por-tenant
This commit is contained in:
@@ -76,6 +76,10 @@ class AuditMapper:
|
||||
# Invoices
|
||||
"invoice_header": "IMPORT INVOICE BROWSE", # BROWSEOFACIMP
|
||||
"invoice_sales_details": "IMPORT INVOICE UPDATE", # UPDATEOFACIMP
|
||||
"invoice_compliance_mx": "IMPORT INVOICE UPDATE",
|
||||
"invoice_financials": "IMPORT INVOICE UPDATE",
|
||||
"invoice_logistics": "IMPORT INVOICE UPDATE",
|
||||
"invoice_collections": "IMPORT INVOICE UPDATE",
|
||||
|
||||
# Exports would be similar but we start with general
|
||||
|
||||
@@ -88,9 +92,11 @@ class AuditMapper:
|
||||
|
||||
# General fallbacks
|
||||
"clients_and_providers": "CATALOGS",
|
||||
"clients_and_providers": "CATALOGS",
|
||||
"clients_and_providers": "CATALOGS",
|
||||
"items": "CATALOGS",
|
||||
"parts": "CATALOGS",
|
||||
"customs_brokers": "CATALOGS",
|
||||
"customs_brokers_vu": "CATALOGS",
|
||||
"customs_brokers_personnel": "CATALOGS",
|
||||
"classes": "CATALOGS",
|
||||
"classification_concepts": "CATALOGS",
|
||||
"concepts": "CATALOGS",
|
||||
@@ -107,6 +113,7 @@ class AuditMapper:
|
||||
"ports": "CATALOGS",
|
||||
"prevalidators": "CATALOGS",
|
||||
"seal": "CATALOGS",
|
||||
"seals": "CATALOGS",
|
||||
"signatures": "CATALOGS",
|
||||
"tariff_fractions": "CATALOGS",
|
||||
"unit_conversions": "CATALOGS",
|
||||
@@ -127,6 +134,18 @@ class AuditMapper:
|
||||
("invoice_sales_details", "CREATE"): "ADD IMPORT_INVOICE_ITEM",
|
||||
("invoice_sales_details", "UPDATE"): "EDIT IMPORT_INVOICE_ITEM",
|
||||
("invoice_sales_details", "DELETE"): "DELETE IMPORT_INVOICE_ITEM",
|
||||
("invoice_compliance_mx", "CREATE"): "ADD IMPORT_INVOICE",
|
||||
("invoice_compliance_mx", "UPDATE"): "EDIT IMPORT_INVOICE",
|
||||
("invoice_compliance_mx", "DELETE"): "DELETE IMPORT_INVOICE",
|
||||
("invoice_financials", "CREATE"): "ADD IMPORT_INVOICE",
|
||||
("invoice_financials", "UPDATE"): "EDIT IMPORT_INVOICE",
|
||||
("invoice_financials", "DELETE"): "DELETE IMPORT_INVOICE",
|
||||
("invoice_logistics", "CREATE"): "ADD IMPORT_INVOICE",
|
||||
("invoice_logistics", "UPDATE"): "EDIT IMPORT_INVOICE",
|
||||
("invoice_logistics", "DELETE"): "DELETE IMPORT_INVOICE",
|
||||
("invoice_collections", "CREATE"): "ADD IMPORT_INVOICE",
|
||||
("invoice_collections", "UPDATE"): "EDIT IMPORT_INVOICE",
|
||||
("invoice_collections", "DELETE"): "DELETE IMPORT_INVOICE",
|
||||
|
||||
("pedimentos", "CREATE"): "ADD PEDIMENTO",
|
||||
("pedimentos", "UPDATE"): "EDIT PEDIMENTO",
|
||||
@@ -146,6 +165,9 @@ class AuditMapper:
|
||||
("company", "CREATE"): "ADD COMPANY",
|
||||
("company", "UPDATE"): "EDIT COMPANY",
|
||||
("company", "DELETE"): "DELETE COMPANY",
|
||||
("companies", "CREATE"): "ADD COMPANY",
|
||||
("companies", "UPDATE"): "EDIT COMPANY",
|
||||
("companies", "DELETE"): "DELETE COMPANY",
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -153,7 +153,7 @@ class AuditService:
|
||||
elif table_name == "parts":
|
||||
reference = record_data.get("part_number") or reference
|
||||
|
||||
elif table_name == "companies":
|
||||
elif table_name in {"companies", "company"}:
|
||||
reference = record_data.get("rfc") or reference
|
||||
|
||||
elif table_name == "classes":
|
||||
|
||||
Reference in New Issue
Block a user