Skip to content

Commit 1a38f7c

Browse files
committed
Merge PR #596 into 16.0
Signed-off-by sbidoul
2 parents 83e8888 + c221650 commit 1a38f7c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: mis_builder/models/mis_report_instance.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,11 @@ def _compute_allowed_cmpcol_ids(self):
330330
def _check_source_aml_model_id(self):
331331
for record in self:
332332
if record.source_aml_model_id:
333-
record_model = record.source_aml_model_id.field_id.filtered(
334-
lambda r: r.name == "account_id"
335-
).relation
333+
record_model = (
334+
record.source_aml_model_id.sudo()
335+
.field_id.filtered(lambda r: r.name == "account_id")
336+
.relation
337+
)
336338
report_account_model = record.report_id.account_model
337339
if record_model != report_account_model:
338340
raise ValidationError(

Diff for: mis_builder/readme/newsfragments/596.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Resolve a permission issue when creating report periods with a user without admin rights.

0 commit comments

Comments
 (0)