Skip to content

Commit

Permalink
Merge PR #1264 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by max3903
  • Loading branch information
OCA-git-bot committed Nov 26, 2024
2 parents 694d8b9 + ff29f47 commit 8e02d28
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion fieldservice_stage_validation/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"author": "Brian McMaster, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/field-service",
"depends": ["fieldservice"],
"data": ["views/fsm_stage.xml"],
"data": [
"security/ir.model.access.csv",
"views/fsm_stage.xml",
],
"license": "AGPL-3",
"development_status": "Beta",
"maintainers": ["brian10048", "max3903"],
Expand Down
1 change: 0 additions & 1 deletion fieldservice_stage_validation/models/fsm_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class FSMStage(models.Model):
string="Fields to Validate",
help="Select fields which must be set on the document in this stage",
)

stage_type_model_id = fields.Many2one(
"ir.model",
compute="_compute_stage_model",
Expand Down
2 changes: 1 addition & 1 deletion fieldservice_stage_validation/models/validate_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def validate_stage_fields(records):
for rec in records:
stage = rec.stage_id
field_ids = stage.validate_field_ids
field_ids = stage.sudo().validate_field_ids
field_names = [x.name for x in field_ids]
values = rec.read(field_names)

Expand Down
2 changes: 2 additions & 0 deletions fieldservice_stage_validation/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_ir_model_field,ir_model_fields fsm,base.model_ir_model_fields,fieldservice.group_fsm_user_own,1,0,0,0

0 comments on commit 8e02d28

Please sign in to comment.