Skip to content

Commit

Permalink
Edit security of product employee to allow writes (in tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasley committed Jan 13, 2017
1 parent d9a2950 commit 3f8c107
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions product_multi_company/tests/test_product_multi_company.py
Expand Up @@ -11,6 +11,14 @@
class TestProductMultiCompany(common.TransactionCase):
def setUp(self):
super(TestProductMultiCompany, self).setUp()
self.access_product = self.env.ref('product.access_product_product_employee')
self.group_user = self.env.ref('base.group_user')
self.access_product.write({
'perm_write': True,
'perm_read': True,
'perm_create': True,
'perm_unlink': True,
})
self.company_1 = self.env['res.company'].create(
{'name': 'Test company 1'})
self.company_2 = self.env['res.company'].create(
Expand All @@ -31,14 +39,14 @@ def setUp(self):
{'name': 'User company 1',
'login': 'user_company_1',
'groups_id': [
(6, 0, self.env.ref('sales_team.group_sale_manager').ids)],
(6, 0, self.group_user.ids)],
'company_id': self.company_1.id,
'company_ids': [(6, 0, self.company_1.ids)]})
self.user_company_2 = self.env['res.users'].create(
{'name': 'User company 2',
'login': 'user_company_2',
'groups_id': [
(6, 0, self.env.ref('sales_team.group_sale_manager').ids)],
(6, 0, self.group_user.ids)],
'company_id': self.company_2.id,
'company_ids': [(6, 0, self.company_2.ids)]})

Expand Down

0 comments on commit 3f8c107

Please sign in to comment.