Merge pull request 'Se arregla fecha en formato csv para tryton para que se pueda exportar ' () from fix_csv_to_tryton_#7 into main

Reviewed-on: 
This commit is contained in:
mono 2025-04-12 12:14:07 -05:00
commit f8ff6b7905
3 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ class TestAPI(APITestCase):
expected_rows = [
[self.customer.name, self.customer.name, self.customer.name, "",
"", "2024-09-02 00:00:00+00:00", "Contado", "Almacén",
"", "2024-09-02", "Contado", "Almacén",
"Peso colombiano", self.product.name, "2.00", "3000.00", "Unidad",
"TIENDA LA ILUSIÓN", "Tienda La Ilusion", "La Ilusion", "True", ""
],

View File

@ -65,7 +65,7 @@ class TestExportarVentasParaTryton(TestCase):
self.assertEqual(next(csv_reader), expected_header)
expected_rows = [
["Camilo", "Camilo", "Camilo", "", "", "2024-09-02 00:00:00+00:00", "Contado", "Almacén", "Peso colombiano", "Panela", "2.00", "3000.00", "Unidad", "TIENDA LA ILUSIÓN", "Tienda La Ilusion", "La Ilusion", "True", ""],
["Camilo", "Camilo", "Camilo", "", "", "2024-09-02", "Contado", "Almacén", "Peso colombiano", "Panela", "2.00", "3000.00", "Unidad", "TIENDA LA ILUSIÓN", "Tienda La Ilusion", "La Ilusion", "True", ""],
["", "", "", "", "", "", "", "", "", "Panela", "3.00", "5000.00", "Unidad", "", "", "", "", ""],
]
csv_rows = list(csv_reader)

View File

@ -194,7 +194,7 @@ def sales_to_tryton_csv(sales):
first_sale_line = sale_lines[0]
customer_info = [sale.customer.name] * 3 + [sale.description] * 2
first_line = customer_info + [
sale.date,
sale.date.strftime('%Y-%m-%d'),
"Contado",
"Almacén",
"Peso colombiano",