mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'imp/11.0/athene' into '11.0-test'
imp/11.0/athene into 11.0-test See merge request hibou-io/hibou-odoo/suite!1296
This commit is contained in:
57
.theia/launch.json
Normal file
57
.theia/launch.json
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: Current File",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Odoo: shell",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "/opt/odoo/hibou-suite/odoo-run.py",
|
||||||
|
"args": ["shell", "--no-xmlrpc"],
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Odoo: TEST 'sale'",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "/opt/odoo/hibou-suite/odoo-run.py",
|
||||||
|
"args": ["-i", "sale",
|
||||||
|
"-u", "sale",
|
||||||
|
"--test-enable", "--no-xmlrpc", "--stop-after-init"],
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Odoo: server",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "/opt/odoo/hibou-suite/odoo-run.py",
|
||||||
|
"args": [],
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Odoo: reload foreground server",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "/opt/odoo/hibou-suite/odoo-reload.py",
|
||||||
|
"args": [],
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Odoo: reload foreground server, Kill Others",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "/opt/odoo/hibou-suite/odoo-reload.py",
|
||||||
|
"args": ["KILL_OTHER"],
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
17
.theia/settings.json
Normal file
17
.theia/settings.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"workbench.colorTheme": "Hibou Dark",
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.git": true,
|
||||||
|
"**/.svn": true,
|
||||||
|
"**/.hg": true,
|
||||||
|
"**/CVS": true,
|
||||||
|
"**/.DS_Store": true,
|
||||||
|
"**/*.pyc": {"when": "$(basename).py"},
|
||||||
|
"**/__pycache__": true
|
||||||
|
},
|
||||||
|
"files.watcherExclude": {
|
||||||
|
"**/.git/objects/**": true,
|
||||||
|
"**/.git/subtree-cache/**": true,
|
||||||
|
"**/node_modules/**": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
FROM hibou/hibou-odoo:11.0
|
FROM hibou/hibou-odoo:11.0
|
||||||
|
|
||||||
|
USER odoo
|
||||||
|
COPY --from=registry.gitlab.com/hibou-io/athene /opt/athene /opt/athene
|
||||||
COPY --from=hibou/flow /flow /flow
|
COPY --from=hibou/flow /flow /flow
|
||||||
COPY --chown=104 entrypoint.sh /entrypoint.sh
|
COPY --chown=104 entrypoint.sh /entrypoint.sh
|
||||||
COPY --chown=104 . /opt/odoo/hibou-suite
|
COPY --chown=104 . /opt/odoo/hibou-suite
|
||||||
@@ -7,3 +9,8 @@ RUN rm /etc/odoo/odoo.conf \
|
|||||||
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
||||||
;
|
;
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
ENV SHELL=/bin/bash \
|
||||||
|
THEIA_DEFAULT_PLUGINS=local-dir:/opt/athene/plugins
|
||||||
|
ENV USE_LOCAL_GIT true
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
FROM registry.gitlab.com/hibou-io/hibou-odoo/odoo:RELEASE
|
FROM registry.gitlab.com/hibou-io/hibou-odoo/odoo:RELEASE
|
||||||
|
|
||||||
COPY --from=registry.gitlab.com/hibou-io/hibou-odoo/flow /flow /flow
|
USER odoo
|
||||||
|
COPY --from=registry.gitlab.com/hibou-io/athene /opt/athene /opt/athene
|
||||||
|
COPY --from=hibou/flow /flow /flow
|
||||||
COPY --chown=104 entrypoint.sh /entrypoint.sh
|
COPY --chown=104 entrypoint.sh /entrypoint.sh
|
||||||
COPY --chown=104 . /opt/odoo/hibou-suite
|
COPY --chown=104 . /opt/odoo/hibou-suite
|
||||||
RUN rm /etc/odoo/odoo.conf \
|
RUN rm /etc/odoo/odoo.conf \
|
||||||
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
||||||
;
|
;
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
ENV SHELL=/bin/bash \
|
||||||
|
THEIA_DEFAULT_PLUGINS=local-dir:/opt/athene/plugins
|
||||||
|
ENV USE_LOCAL_GIT true
|
||||||
|
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ class DeliveryFedex(models.Model):
|
|||||||
recipient = superself.get_recipient(picking=picking)
|
recipient = superself.get_recipient(picking=picking)
|
||||||
acc_number = superself._get_fedex_account_number(picking=picking)
|
acc_number = superself._get_fedex_account_number(picking=picking)
|
||||||
meter_number = superself._get_fedex_meter_number(picking=picking)
|
meter_number = superself._get_fedex_meter_number(picking=picking)
|
||||||
payment_acc_number = superself._get_fedex_payment_account_number()
|
payment_acc_number = superself._get_fedex_payment_account_number(picking=picking)
|
||||||
order_name = superself.get_order_name(picking=picking)
|
order_name = superself.get_order_name(picking=picking)
|
||||||
attn = superself.get_attn(picking=picking)
|
attn = superself.get_attn(picking=picking)
|
||||||
residential = self._get_fedex_recipient_is_residential(recipient)
|
residential = self._get_fedex_recipient_is_residential(recipient)
|
||||||
|
|||||||
@@ -2,6 +2,29 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# DEV_MODE=exclusive
|
||||||
|
# Will start the Theia IDE in the foreground, you can then start Odoo from a terminal.
|
||||||
|
# DEV_MODE=1
|
||||||
|
# Will start the Theia IDE in the background, regular Odoo commands will still work.
|
||||||
|
# Note that in Theia you can re-start Odoo e.g.
|
||||||
|
# `kill -s SIGHUP 1` to reload/restart Odoo
|
||||||
|
# `kill -s SIGQUIT 1` to cause Odoo to dump stacktrace in standard out
|
||||||
|
# Note that with Odoo running in the foreground, killing Odoo will kill the container.
|
||||||
|
# DEV_MODE=
|
||||||
|
# Unset to not use Theia at all.
|
||||||
|
#
|
||||||
|
# DEV_MODE_PATH=/opt/odoo/addons
|
||||||
|
# To change the path to start Theia in, useful to get git working.
|
||||||
|
|
||||||
|
if [ "$DEV_MODE_PATH" == "" ]
|
||||||
|
then
|
||||||
|
export DEV_MODE_PATH=/opt/odoo/hibou-suite
|
||||||
|
fi
|
||||||
|
if [[ -x "/opt/athene/entrypoint.sh" ]]
|
||||||
|
then
|
||||||
|
/opt/athene/entrypoint.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# set the postgres database host, port, user and password according to the environment
|
# set the postgres database host, port, user and password according to the environment
|
||||||
# and pass them as arguments to the odoo process if not present in the config file
|
# and pass them as arguments to the odoo process if not present in the config file
|
||||||
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
||||||
|
|||||||
38
odoo-reload.py
Executable file
38
odoo-reload.py
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||||
|
|
||||||
|
import psutil
|
||||||
|
import os
|
||||||
|
import signal
|
||||||
|
import sys
|
||||||
|
|
||||||
|
PID = 1
|
||||||
|
PNAME = 'odoo'
|
||||||
|
PNAME_PYTHON = ['python']
|
||||||
|
PNAME_KILL_OTHER = [PNAME] + PNAME_PYTHON
|
||||||
|
KILL_OTHER = sys.argv[1] == 'KILL_OTHER' if len(sys.argv) >= 2 else False
|
||||||
|
if KILL_OTHER:
|
||||||
|
print('Will find other Odoo Processes and Kill them.')
|
||||||
|
|
||||||
|
is_foreground = False
|
||||||
|
for proc in psutil.process_iter():
|
||||||
|
try:
|
||||||
|
process_name = proc.name()
|
||||||
|
process_id = proc.pid
|
||||||
|
print('Inspecting %s:%s' % (process_id, process_name))
|
||||||
|
if process_id == PID:
|
||||||
|
is_foreground = process_name == PNAME
|
||||||
|
if not KILL_OTHER:
|
||||||
|
break
|
||||||
|
if process_id != PID and KILL_OTHER and process_name in PNAME_KILL_OTHER:
|
||||||
|
print('Killing %s:%s' % (process_id, process_name))
|
||||||
|
os.kill(process_id, signal.SIGKILL)
|
||||||
|
except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
|
||||||
|
pass
|
||||||
|
|
||||||
|
if not is_foreground:
|
||||||
|
print('Odoo is not the foreground process.')
|
||||||
|
exit(-1)
|
||||||
|
|
||||||
|
print('Signalling reload to Odoo')
|
||||||
|
os.kill(PID, signal.SIGHUP)
|
||||||
|
|
||||||
5
odoo-run.py
Executable file
5
odoo-run.py
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
__import__('os').environ['TZ'] = 'UTC'
|
||||||
|
import odoo
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
odoo.cli.main()
|
||||||
Reference in New Issue
Block a user