refactor(View): public function.

This commit is contained in:
Mono Mono 2025-03-02 23:15:52 -05:00
parent 2364583952
commit 0e38255a9d

View File

@ -163,7 +163,7 @@ def handle_import_customers_file(csv_file):
}
)
def _sales_to_tryton_csv(sales):
def sales_to_tryton_csv(sales):
tryton_sales_header = [
"Tercero",
"Dirección de facturación",
@ -225,7 +225,7 @@ def exportar_ventas_para_tryton(request):
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = "attachment; filename=sales.csv"
sales = Sale.objects.all()
csv_data = _sales_to_tryton_csv(sales)
csv_data = sales_to_tryton_csv(sales)
writer = csv.writer(response)
for row in csv_data:
writer.writerow(row)