Skip to content

Commit

Permalink
[FIX] _journal_security: show inactive users on journal
Browse files Browse the repository at this point in the history
Antes de esto. Si, por ej, tenía dos usuarios asignados a un journal. Archivaba uno y luego sacaba desde el journal al otro usuario. Quedaba aparentemente sin restricción (de hecho se mostraba ninguno). El tema es que de fondo seguía asignado el usuario archivado y la busqueda ('modification_user_ids', '=', False) traducida a query no termina funcionando. Porque en la tabla sigue habiendo registros vinculados a ese usuario archivado.
Con este cambio sencillo se mantiene visible ese otro usuario

closes #489

X-original-commit: 6d820a5
Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar>
Signed-off-by: Juan José Scarafía <jjs@adhoc.com.ar>
  • Loading branch information
jjscarafia committed Jan 24, 2024
1 parent 3a7d71b commit 70d6b1d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions account_journal_security/models/account_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class AccountJournal(models.Model):
help='If choose some users, then this journal and the information'
' related to it will be only visible for those users.',
copy=False,
context={'active_test': False}
)

modification_user_ids = fields.Many2many(
Expand All @@ -31,6 +32,7 @@ class AccountJournal(models.Model):
' create, write or delete accounting data related of this journal. '
'Information will still be visible for other users.',
copy=False,
context={'active_test': False}
)

journal_restriction = fields.Selection(
Expand Down

0 comments on commit 70d6b1d

Please sign in to comment.