runbot/runbot_merge/models/utils.py

11 lines
206 B
Python
Raw Normal View History

from typing import Tuple
def enum(model: str, field: str) -> Tuple[str, str]:
n = f'{model.replace(".", "_")}_{field}_type'
return n, n
def readonly(_):
raise TypeError("Field is readonly")