[FIX] website_sale{,_stock}: fix issue with tests
Multiple tests introduced in 16.0 created a product template and then a default product for that template, however a default product is already created by default in the product module when creating a template and it somecases triggered an unicity constraint. closes odoo/odoo#108523 X-original-commit: 3c9ff6e148cd0ee77442dd31079f0fec9c456b4c Related: odoo/enterprise#35180 Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit is contained in:
@@ -198,11 +198,7 @@ class TestWebsiteSaleCartAbandoned(TestWebsiteSaleCartAbandonedCommon):
|
||||
'list_price': 0.0,
|
||||
'name': 'free_product'
|
||||
})
|
||||
free_product_product = self.env['product.product'].create({
|
||||
'list_price': 0.0,
|
||||
'name': 'free_product',
|
||||
'product_tmpl_id': free_product_template.id
|
||||
})
|
||||
free_product_product = free_product_template.product_variant_id
|
||||
order_line = [[0, 0, {
|
||||
'name': 'The Product',
|
||||
'product_id': free_product_product.id,
|
||||
|
||||
@@ -20,10 +20,7 @@ class TestWebsiteSaleStockAbandonedCartEmail(TestWebsiteSaleCartAbandonedCommon)
|
||||
'type': 'product',
|
||||
'allow_out_of_stock_order': False
|
||||
})
|
||||
storable_product_product = self.env['product.product'].create({
|
||||
'name': 'storable_product_product',
|
||||
'product_tmpl_id': storable_product_template.id,
|
||||
})
|
||||
storable_product_product = storable_product_template.product_variant_id
|
||||
order_line = [[0, 0, {
|
||||
'name': 'The Product',
|
||||
'product_id': storable_product_product.id,
|
||||
|
||||
Reference in New Issue
Block a user