Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] account_journal_security: Migration to 18.0 #579

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions account_journal_security/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Journal Security',
'version': "17.0.1.0.0",
'version': "18.0.1.0.0",
'category': 'Accounting',
'sequence': 14,
'summary': 'Restrict the use of certain journals to certain users',
Expand All @@ -39,7 +39,7 @@
],
'test': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
6 changes: 3 additions & 3 deletions account_journal_security/models/account_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _check_journal_users_restriction(self, field):
self.env.registry.clear_cache()

@api.model
def _search(self, domain, offset=0, limit=None, order=None, access_rights_uid=None):
def _search(self, domain, offset=0, limit=None, order=None):
"""
Para que usuarios los usuarios no puedan elegir diarios donde no puedan
escribir, modificamos la funcion search. No lo hacemos por regla de
Expand All @@ -109,8 +109,8 @@ def _search(self, domain, offset=0, limit=None, order=None, access_rights_uid=No
if not self.env.is_superuser():
domain += [
'|', ('modification_user_ids', '=', False),
('id', 'in', user.modification_journal_ids.ids)]
return super()._search(domain, offset, limit, order, access_rights_uid=access_rights_uid)
('id', 'not in', user.journal_ids.ids)]
return super()._search(domain, offset, limit, order)

@api.onchange('journal_restriction')
def unset_modification_user_ids(self):
Expand Down