flectra/addons/sale/tests/test_sale_common.py

38 lines
1.5 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2018-01-16 11:34:37 +01:00
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from collections import OrderedDict
2018-01-16 11:34:37 +01:00
from flectra.addons.account.tests.account_test_classes import AccountingTestCase
class TestSale(AccountingTestCase):
def setUp(self):
super(TestSale, self).setUp()
# some users
group_manager = self.env.ref('sales_team.group_sale_manager')
group_user = self.env.ref('sales_team.group_sale_salesman')
self.manager = self.env['res.users'].create({
'name': 'Andrew Manager',
'login': 'manager',
'email': 'a.m@example.com',
'signature': '--\nAndreww',
'notification_type': 'email',
'groups_id': [(6, 0, [group_manager.id])]
})
self.user = self.env['res.users'].create({
'name': 'Mark User',
'login': 'user',
'email': 'm.u@example.com',
'signature': '--\nMark',
'notification_type': 'email',
'groups_id': [(6, 0, [group_user.id])]
})
# create quotation with differend kinds of products (all possible combinations)
self.products = OrderedDict([
('prod_order', self.env.ref('product.product_order_01')),
('serv_del', self.env.ref('product.service_delivery')),
('serv_order', self.env.ref('product.service_order_01')),
('prod_del', self.env.ref('product.product_delivery_01')),
])
self.partner = self.env.ref('base.res_partner_1')