mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[FIX] runbot_merge: Odoo 15.0 + Py3.10 compat
Turns out I was running "15.0" except just on the runbot, enterprise and community were still the 14.0 repos, so some of the changes were missing. While at it, bundle fixes for 3.10, as that's what Jammy needs, and the mergebot/15.0 will be running on that.
This commit is contained in:
parent
2ca7a3de6e
commit
57162547e0
@ -1075,7 +1075,7 @@ class Environment:
|
|||||||
for xid in crons:
|
for xid in crons:
|
||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
print('\trunning cron', xid, '...', file=sys.stderr)
|
print('\trunning cron', xid, '...', file=sys.stderr)
|
||||||
_, model, cron_id = self('ir.model.data', 'xmlid_lookup', xid)
|
model, cron_id = self('ir.model.data', 'check_object_reference', *xid.split('.', 1))
|
||||||
assert model == 'ir.cron', "Expected {} to be a cron, got {}".format(xid, model)
|
assert model == 'ir.cron', "Expected {} to be a cron, got {}".format(xid, model)
|
||||||
self('ir.cron', 'method_direct_trigger', [cron_id], **kw)
|
self('ir.cron', 'method_direct_trigger', [cron_id], **kw)
|
||||||
print('\tdone %.3fs' % (time.time() - t0), file=sys.stderr)
|
print('\tdone %.3fs' % (time.time() - t0), file=sys.stderr)
|
||||||
|
@ -15,6 +15,14 @@
|
|||||||
'views/templates.xml',
|
'views/templates.xml',
|
||||||
'models/project_freeze/views.xml',
|
'models/project_freeze/views.xml',
|
||||||
],
|
],
|
||||||
|
'assets': {
|
||||||
|
'web.assets_frontend': [
|
||||||
|
'runbot_merge/static/scss/runbot_merge.scss',
|
||||||
|
],
|
||||||
|
'web.assets_backend': [
|
||||||
|
'runbot_merge/static/project_freeze/index.js',
|
||||||
|
],
|
||||||
|
},
|
||||||
'post_load': 'enable_sentry',
|
'post_load': 'enable_sentry',
|
||||||
'pre_init_hook': '_check_citext',
|
'pre_init_hook': '_check_citext',
|
||||||
'license': 'LGPL-3',
|
'license': 'LGPL-3',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import collections
|
import collections.abc
|
||||||
import itertools
|
import itertools
|
||||||
import json as json_
|
import json as json_
|
||||||
import logging
|
import logging
|
||||||
@ -8,7 +8,6 @@ import pathlib
|
|||||||
import pprint
|
import pprint
|
||||||
import textwrap
|
import textwrap
|
||||||
import unicodedata
|
import unicodedata
|
||||||
from datetime import datetime, timezone
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import werkzeug.urls
|
import werkzeug.urls
|
||||||
@ -114,7 +113,7 @@ class GH(object):
|
|||||||
)
|
)
|
||||||
self._log_gh(_gh, method, path, params, json, r)
|
self._log_gh(_gh, method, path, params, json, r)
|
||||||
if check:
|
if check:
|
||||||
if isinstance(check, collections.Mapping):
|
if isinstance(check, collections.abc.Mapping):
|
||||||
exc = check.get(r.status_code)
|
exc = check.get(r.status_code)
|
||||||
if exc:
|
if exc:
|
||||||
raise exc(r.text)
|
raise exc(r.text)
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
<template id="runbot_merge_freeze_assets" inherit_id="web.assets_backend" active="True">
|
|
||||||
<xpath expr="." position="inside">
|
|
||||||
<script type="text/javascript" src="/runbot_merge/static/project_freeze/index.js"></script>
|
|
||||||
</xpath>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<record id="runbot_merge_project_freeze_form" model="ir.ui.view">
|
<record id="runbot_merge_project_freeze_form" model="ir.ui.view">
|
||||||
<field name="name">Freeze Wizard Configuration Screen</field>
|
<field name="name">Freeze Wizard Configuration Screen</field>
|
||||||
<field name="model">runbot_merge.project.freeze</field>
|
<field name="model">runbot_merge.project.freeze</field>
|
||||||
|
@ -4,12 +4,6 @@
|
|||||||
<value eval="{'active': False}"/>
|
<value eval="{'active': False}"/>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<template id="assets_frontend" inherit_id="web.assets_frontend">
|
|
||||||
<xpath expr="link[last()]" position="after">
|
|
||||||
<link rel="stylesheet" type="text/scss" href="/runbot_merge/static/scss/runbot_merge.scss"/>
|
|
||||||
</xpath>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template id="link-pr" name="create a link to `pr`">
|
<template id="link-pr" name="create a link to `pr`">
|
||||||
<t t-set="title">
|
<t t-set="title">
|
||||||
<t t-if="pr.repository.group_id <= env.user.groups_id">
|
<t t-if="pr.repository.group_id <= env.user.groups_id">
|
||||||
|
Loading…
Reference in New Issue
Block a user