[FIX] sale_timesheet: not use demo data in unit test

Before this commit, we use the 'product.product_category_3'
external_xmlid to find the 'Services' category but this record is in
fact a demo data.

This commit removes this using to create a new category called
'Services' for the product created in this test.

Related PR: #65146

closes odoo/odoo#70869

X-original-commit: dd68808fd074ba776f4a9f6b3218df99b887ae9b
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
This commit is contained in:
Xavier BOL (xbo)
2021-05-17 11:45:26 +00:00
parent e0f0732ab8
commit 45fb9641b1
@@ -11,10 +11,15 @@ class TestUi(HttpCase):
def setUpClass(cls):
super().setUpClass()
service_category_id = cls.env['product.category'].create({
'name': 'Services',
'parent_id': cls.env.ref('product.product_category_1').id,
}).id
uom_hour_id = cls.env.ref('uom.product_uom_hour').id
cls.prepaid_service_product = cls.env['product.product'].create({
'name': 'Service Product (Prepaid Hours)',
'categ_id': cls.env.ref('product.product_category_3').id,
'categ_id': service_category_id,
'type': 'service',
'list_price': 250.00,
'standard_price': 190.00,