Skip to content

Commit 8e02d28

Browse files
committed
Merge PR #1264 into 17.0
Signed-off-by max3903
2 parents 694d8b9 + ff29f47 commit 8e02d28

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

fieldservice_stage_validation/__manifest__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
"author": "Brian McMaster, Odoo Community Association (OCA)",
99
"website": "https://github.com/OCA/field-service",
1010
"depends": ["fieldservice"],
11-
"data": ["views/fsm_stage.xml"],
11+
"data": [
12+
"security/ir.model.access.csv",
13+
"views/fsm_stage.xml",
14+
],
1215
"license": "AGPL-3",
1316
"development_status": "Beta",
1417
"maintainers": ["brian10048", "max3903"],

fieldservice_stage_validation/models/fsm_stage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class FSMStage(models.Model):
1111
string="Fields to Validate",
1212
help="Select fields which must be set on the document in this stage",
1313
)
14-
1514
stage_type_model_id = fields.Many2one(
1615
"ir.model",
1716
compute="_compute_stage_model",

fieldservice_stage_validation/models/validate_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def validate_stage_fields(records):
99
for rec in records:
1010
stage = rec.stage_id
11-
field_ids = stage.validate_field_ids
11+
field_ids = stage.sudo().validate_field_ids
1212
field_names = [x.name for x in field_ids]
1313
values = rec.read(field_names)
1414

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2+
access_ir_model_field,ir_model_fields fsm,base.model_ir_model_fields,fieldservice.group_fsm_user_own,1,0,0,0

0 commit comments

Comments
 (0)