From f0eedaafdcb7ad3249911fe1360b1ac819832ac6 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Fri, 19 Jan 2024 15:15:28 +0100 Subject: [PATCH] --amend --- grap_custom_import_product/models/product_product.py | 2 +- .../tests/templates/product.product/product.csv | 2 +- grap_custom_import_product/tests/test_module.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grap_custom_import_product/models/product_product.py b/grap_custom_import_product/models/product_product.py index 027df0a..67beed2 100644 --- a/grap_custom_import_product/models/product_product.py +++ b/grap_custom_import_product/models/product_product.py @@ -30,7 +30,7 @@ def _custom_import_prevent_duplicate_fields(self): string="Product Gross Price - Supplier (For import)", store=False ) - grap_import_supplier_uom_purchase_qty = fields.Float( + grap_import_supplier_invoice_qty = fields.Float( string="Invoice Qty - Supplier (For import)", store=False ) diff --git a/grap_custom_import_product/tests/templates/product.product/product.csv b/grap_custom_import_product/tests/templates/product.product/product.csv index 008a116..dbc12b6 100644 --- a/grap_custom_import_product/tests/templates/product.product/product.csv +++ b/grap_custom_import_product/tests/templates/product.product/product.csv @@ -1,4 +1,4 @@ -name,uom_id,categ_id,barcode,list_price,grap_import_supplier_name,grap_import_supplier_product_code,grap_import_supplier_product_name,grap_import_supplier_gross_price,grap_import_supplier_uom_purchase_qty +name,uom_id,categ_id,barcode,list_price,grap_import_supplier_name,grap_import_supplier_product_code,grap_import_supplier_product_name,grap_import_supplier_gross_price,grap_import_supplier_invoice_qty Coca Cola (Import),Units,All / Saleable / Office Furniture,5000112602791,4.12,Ready Mat,CC,BOTTLE 33CL,21.35,6 Produit B,Units,All / Saleable / Office Furniture,,8,,,,, Produit C,Units,All / Saleable,,2.30,,,,, diff --git a/grap_custom_import_product/tests/test_module.py b/grap_custom_import_product/tests/test_module.py index c6c8b91..aefaf5f 100644 --- a/grap_custom_import_product/tests/test_module.py +++ b/grap_custom_import_product/tests/test_module.py @@ -19,5 +19,5 @@ def test_01_import_product(self): "grap_custom_import_product", "product.product", "product.csv" ) self.assertFalse(messages) - self.assertEqual(len(products), 1) - self.assertEqual(products.name, "Coca Cola (Import)") + self.assertEqual(len(products), 3) + self.assertIn("Coca Cola (Import)", products.mapped("name"))