summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-03-23 16:21:58 +0100
committerChristophe Simonis <chs@odoo.com>2018-03-23 16:21:58 +0100
commit7b5b3ea96daee84d29098cf9c1905a5df1a57258 (patch)
tree7c4da2677d20a892b9423edbdb3fbc353351e952 /tests
parent3e8443b5de2f4806839c35653ee77d66b37595d4 (diff)
parente06f3b0b3b1fc3eeffb6170a7ac04ee4c88d4877 (diff)
[MERGE] forward port branch saas-11.2 up to e1a2b299b23
Diffstat (limited to 'tests')
-rw-r--r--tests/common.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/tests/common.py b/tests/common.py
index 87f21a0d52a..03820578f64 100644
--- a/tests/common.py
+++ b/tests/common.py
@@ -25,17 +25,34 @@ class TestSaleCouponCommon(common.TransactionCase):
self.uom_unit = self.env.ref('uom.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,
- })