summaryrefslogtreecommitdiff
path: root/sales_report_product_image/tests
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-12-01 16:14:05 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-12-01 16:14:05 +0700
commit20533d3b27ad7429c4fc677a321f1504f0f60ef1 (patch)
tree9f42246c33b3ddb457e5c9c059be5bc04a163b6e /sales_report_product_image/tests
parent60fa89e3ecac883b6ccafd95d021d55d99a34085 (diff)
add product image in sales and quotation
Diffstat (limited to 'sales_report_product_image/tests')
-rw-r--r--sales_report_product_image/tests/__init__.py3
-rw-r--r--sales_report_product_image/tests/test_sales_report_product_image.py37
2 files changed, 40 insertions, 0 deletions
diff --git a/sales_report_product_image/tests/__init__.py b/sales_report_product_image/tests/__init__.py
new file mode 100644
index 0000000..86c9c33
--- /dev/null
+++ b/sales_report_product_image/tests/__init__.py
@@ -0,0 +1,3 @@
+# See LICENSE file for full copyright and licensing details.
+
+from . import test_sales_report_product_image
diff --git a/sales_report_product_image/tests/test_sales_report_product_image.py b/sales_report_product_image/tests/test_sales_report_product_image.py
new file mode 100644
index 0000000..b5e24af
--- /dev/null
+++ b/sales_report_product_image/tests/test_sales_report_product_image.py
@@ -0,0 +1,37 @@
+# Copyright 2016-TODAY Serpent Consulting Services Pvt. Ltd.
+# See LICENSE file for full copyright and licensing details.
+
+from odoo.tests import common
+
+
+class SaleReportProductImageTestCase(common.TransactionCase):
+
+ def setup(self):
+ super(SaleReportProductImageTestCase, self).setup()
+
+ def test_sale_report_product(self):
+ self.product = self.env.ref("product.product_product_7")
+ self.partner = self.env.ref("base.res_partner_2")
+
+ self.sale_order = self.env["sale.order"].create(
+ {
+ "partner_id": self.partner.id,
+ "partner_invoice_id": self.partner.id,
+ "partner_shipping_id": self.partner.id,
+ "pricelist_id": self.env.ref("product.list0").id,
+ "print_image": "True",
+ "image_sizes": "image_medium",
+ }
+ )
+ self.sale_order_line = self.env["sale.order.line"].create(
+ {
+ "name": self.product and self.product.name or " ",
+ "product_id": self.product and self.product.id or False,
+ "product_uom_qty": 2,
+ "product_uom": self.product.uom_id.id,
+ "price_unit": self.product.list_price,
+ "order_id": self.sale_order.id,
+ "tax_id": False,
+ "image_small": self.product.image_1920,
+ }
+ )