Skip to content

Commit 1c52070

Browse files
committed
[IMP] stachechat_mixin: make it possible to ignore some events in the has_allowed_event compute
1 parent a6e1d81 commit 1c52070

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

statechart/models/statechart_mixin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ class can override the statechart with another one adding new events,
316316

317317
@api.model
318318
def _get_sc_event_allowed_field_names(self):
319-
event_names = self._statechart.events_for()
319+
ignore_for_has_allowed_events = self.env.context.get("ignore_for_has_allowed_events", [])
320+
event_names = [name for name in self._statechart.events_for() if name not in ignore_for_has_allowed_events]
320321
return [
321322
_sc_make_event_allowed_field_name(event_name) for event_name in event_names
322323
]

0 commit comments

Comments
 (0)