This commit is contained in:
gsinghpal
2026-03-13 12:38:28 -04:00
parent db4b9aa278
commit fc3c966484
2975 changed files with 1614 additions and 498 deletions

View File

@@ -0,0 +1 @@
from . import test_print_product_label

View File

@@ -0,0 +1,31 @@
from odoo.tests.common import TransactionCase
from odoo.tools import test_reports
from odoo.tests import tagged
@tagged('post_install', '-at_install', 'garazd_product_label')
class TestPrintProductLabel(TransactionCase):
def setUp(self):
super(TestPrintProductLabel, self).setUp()
self.product_chair = self.env.ref('product.product_product_12')
self.product_drawer = self.env.ref('product.product_product_27')
def test_print_wizard(self):
ctx = {
'active_model': 'product.product',
'default_product_product_ids': [
self.product_chair.id,
self.product_drawer.id,
],
}
wizard = self.env['print.product.label'].with_context(**ctx).create({})
self.assertEqual(len(wizard.label_ids), 2)
test_reports.try_report(
self.env.cr,
self.env.uid,
'garazd_product_label.report_product_label_57x35_template',
ids=wizard.label_ids.ids,
our_module='garazd_product_label'
)