Skip to content

Commit

Permalink
Merge PR OCA#596 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by sbidoul
  • Loading branch information
OCA-git-bot committed Feb 8, 2024
2 parents 83e8888 + c221650 commit 1a38f7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mis_builder/models/mis_report_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,11 @@ def _compute_allowed_cmpcol_ids(self):
def _check_source_aml_model_id(self):
for record in self:
if record.source_aml_model_id:
record_model = record.source_aml_model_id.field_id.filtered(
lambda r: r.name == "account_id"
).relation
record_model = (
record.source_aml_model_id.sudo()
.field_id.filtered(lambda r: r.name == "account_id")
.relation
)
report_account_model = record.report_id.account_model
if record_model != report_account_model:
raise ValidationError(
Expand Down
1 change: 1 addition & 0 deletions mis_builder/readme/newsfragments/596.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Resolve a permission issue when creating report periods with a user without admin rights.

0 comments on commit 1a38f7c

Please sign in to comment.