Skip to content

Commit

Permalink
Merge PR #599 into 15.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 c5cc9db + e0c6a3c commit 609b275
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 @@ -331,9 +331,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 609b275

Please sign in to comment.