[FIX] sale_coupon: fix test

Following https://github.com/odoo/odoo/commit/87c09b8ebcea950b628e5c7adfe847b9f8b6c031
the default COA taxes are not used as sale/purchase default taxes.
This commit is contained in:
Nicolas Martinelli
2018-03-16 08:31:03 +01:00
committed by Nicolas Martinelli
parent abfa3a0ae2
commit 08dc1fc268
+19 -9
View File
@@ -25,17 +25,34 @@ class TestSaleCouponCommon(common.TransactionCase):
self.uom_unit = self.env.ref('product.product_uom_unit')
# Taxes
self.tax_15pc_excl = self.env['account.tax'].create({
'name': "Tax 15%",
'amount_type': 'percent',
'amount': 15,
'type_tax_use': 'sale',
})
self.tax_10pc_incl = self.env['account.tax'].create({
'name': "10% Tax incl",
'amount_type': 'percent',
'amount': 10,
'price_include': True,
})
#products
self.product_A = self.env['product.product'].create({
'name': 'Product A',
'list_price': 100,
'sale_ok': True
'sale_ok': True,
'taxes_id': [(6, 0, [self.tax_15pc_excl.id])],
})
self.product_B = self.env['product.product'].create({
'name': 'Product B',
'list_price': 5,
'sale_ok': True
'sale_ok': True,
'taxes_id': [(6, 0, [self.tax_15pc_excl.id])],
})
# Immediate Program By A + B: get B free
@@ -57,10 +74,3 @@ class TestSaleCouponCommon(common.TransactionCase):
'rule_products_domain': "[('id', 'in', [%s])]" % (self.product_A.id),
'active': True,
})
self.tax_10pc_incl = self.env['account.tax'].create({
'name': "10% Tax incl",
'amount_type': 'percent',
'amount': 10,
'price_include': True,
})