Skip to content

Commit

Permalink
[IMP] punchout: add readonly to state fields
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbottemanne committed May 29, 2024
1 parent b30be1d commit 277cf75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion punchout/models/punchout_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ class PunchoutBackend(models.Model):
dtd_filename = fields.Char(
groups="base.group_system",
)
state = fields.Selection(selection="_selection_state", default="draft")
state = fields.Selection(
selection="_selection_state",
default="draft",
readonly=True,
)
session_duration = fields.Integer(
string="Maximum session duration",
default=7200,
Expand Down
1 change: 1 addition & 0 deletions punchout/models/punchout_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class PunchoutSession(models.Model):
selection="_selection_state",
default="draft",
tracking=True,
readonly=True,
)
action_process_allowed = fields.Boolean(compute="_compute_action_process_allowed")

Expand Down

0 comments on commit 277cf75

Please sign in to comment.