Holger Brunn
8 years ago
No known key found for this signature in database
GPG Key ID: 1C9760FECA3AE18
3 changed files with
21 additions and
7 deletions
-
field_rrule/__init__.py
-
field_rrule/__openerp__.py
-
field_rrule/hooks.py
|
|
@ -1,7 +1,5 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
import socket |
|
|
|
from .field_rrule import FieldRRule |
|
|
|
if socket.getfqdn().endswith('odoo-community.org'): |
|
|
|
import demo |
|
|
|
from .hooks import post_load_hook |
|
|
@ -1,8 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
import socket |
|
|
|
|
|
|
|
{ |
|
|
|
"name": "Repetition Rules", |
|
|
|
"version": "8.0.1.0.0", |
|
|
@ -16,10 +14,12 @@ import socket |
|
|
|
"data": [ |
|
|
|
'views/templates.xml', |
|
|
|
], |
|
|
|
"demo": [] if not socket.getfqdn().endswith('odoo-community.org') |
|
|
|
else [ |
|
|
|
# this will be activated in the module's post_load_hook if we run on oca's |
|
|
|
# runbot |
|
|
|
"demo_deactivated": [ |
|
|
|
'demo/res_partner.xml' |
|
|
|
], |
|
|
|
"post_load": "post_load_hook", |
|
|
|
"qweb": [ |
|
|
|
'static/src/xml/field_rrule.xml', |
|
|
|
], |
|
|
|
|
|
@ -0,0 +1,16 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
import socket |
|
|
|
import inspect |
|
|
|
|
|
|
|
|
|
|
|
def post_load_hook(): |
|
|
|
"""do some trickery to have demo data/model on runbot, but nowhere else""" |
|
|
|
if socket.getfqdn().endswith('odoo-community.org'): # pragma: nocover |
|
|
|
from . import demo |
|
|
|
for frame, filename, lineno, funcname, line, index in inspect.stack(): |
|
|
|
if 'package' in frame.f_locals: |
|
|
|
frame.f_locals['package'].info['demo'] =\ |
|
|
|
frame.f_locals['package'].info['demo_deactivated'] |
|
|
|
continue |