flectra/addons/account/tests/test_branch_moves.py

12 lines
452 B
Python
Raw Normal View History

2018-01-17 11:23:19 +01:00
# -*- coding: utf-8 -*-
from . import test_account_branch
class TestBranchJournalEntries(test_account_branch.TestAccountBranch):
def test_branch_security_move_line(self):
move_ids = self.env['account.move.line'].sudo(self.user_2.id).\
search([('branch_id', '=', self.branch_2.id)])
self.assertFalse(move_ids, 'USer 2 should not have access to move lines with Branch %s'
% self.branch_2.name)