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

Reviewed-on: #8
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 = [ expected_rows = [
[self.customer.name, self.customer.name, self.customer.name, "", [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", "Peso colombiano", self.product.name, "2.00", "3000.00", "Unidad",
"TIENDA LA ILUSIÓN", "Tienda La Ilusion", "La Ilusion", "True", "" "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) self.assertEqual(next(csv_reader), expected_header)
expected_rows = [ 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", "", "", "", "", ""], ["", "", "", "", "", "", "", "", "", "Panela", "3.00", "5000.00", "Unidad", "", "", "", "", ""],
] ]
csv_rows = list(csv_reader) csv_rows = list(csv_reader)

View File

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