mirror of
https://github.com/odoo/runbot.git
synced 2025-03-25 20:35:52 +07:00

Simplifies the `ready_prs` query a bit and allows it to be converted to an ORM search, by moving the priority check outside. This also allows the caller to not need to post-process the records list anywhere near the previous state of affairs. `ready_prs` now returns *either* the "alone" batches, or the non-alone batches, rather than mixing both into a single sequence. This requires correctly applying the search filters to not retrieve priority of batches in error or targeting other branches.
7 lines
146 B
Python
7 lines
146 B
Python
from typing import Tuple
|
|
|
|
|
|
def enum(model: str, field: str) -> Tuple[str, str]:
|
|
n = f'{model.replace(".", "_")}_{field}_type'
|
|
return n, n
|