(0, 0, { values })
link to a new record that needs to be created with the given values dictionary
(1, ID, { values })
update the linked record with id = ID (write values on it)
(2, ID)
remove and delete the linked record with id = ID (calls unlink on ID, that will delete the object completely, and the link to it as well)
(3, ID)
cut the link to the linked record with id = ID (delete the relationship between the two objects but does not delete the target object itself)
(4, ID)
link to existing record with id = ID (adds a relationship)
(5)
unlink all (like using (3,ID) for all linked records)
(6, 0, [IDs])
replace the list of linked IDs (like using (5) then (4,ID) for each ID in the list of IDs)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For my issue. adding alias is solved | |
$ docker inspect YOUR-CONTAINER | |
get the IP and add to alias | |
$ sudo ifconfig lo0 alias IP | |
$ sudo ifconfig lo0 alias 172.17.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
"""Install, Uninstall, Upgrade a module""" | |
import xmlrpclib | |
import argparse | |
import getpass | |
import time | |
parser = argparse.ArgumentParser() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_selection_name(models, fields, value): | |
""" Get text value of Selection fields | |
:param models: models of fields | |
:param fields: fields name to get | |
:param value: fields value | |
:return text: Text value of the fields or '' | |
""" | |
res = dict(models.fields_get(allfields=[fields])[fields]['selection'])[value] if value else '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place this ini /etc/hosts | |
151.101.129.140 reddit.com | |
151.101.49.140 www.reddit.com | |
151.101.49.140 i.redditmedia.com | |
151.101.49.140 m.reddit.com | |
151.101.49.140 g.redditmedia.com | |
151.101.49.140 a.thumbs.redditmedia.com | |
151.101.193.140 redditgifts.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
volumes: | |
odoo-web-data: | |
driver: local | |
odoo-db-data: | |
driver: local | |
runbot-builds: | |
driver: local | |
runbot-ssh: | |
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WSGI Handler sample configuration file. | |
# | |
# Change the appropriate settings below, in order to provide the parameters | |
# that would normally be passed in the command-line. | |
# (at least conf['addons_path']) | |
# | |
# For generic wsgi handlers a global application is defined. | |
# For uwsgi this should work: | |
# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo adduser --system --quiet --shell=/bin/bash --home=/opt/odoo --gecos 'odoo' --group odoo | |
sudo mkdir /etc/odoo && mkdir /var/log/odoo/ | |
sudo apt-get update | |
sudo apt-get install postgresql postgresql-server-dev-9.3 -y | |
sudo apt-get install build-essential python-imaging python-lxml python-ldap python-dev libldap2-dev libsasl2-dev npm nodejs git python-setuptools libxml2-dev libxslt1-dev libjpeg-dev python-pip gdebi -y | |
git clone --depth=1 --branch=9.0 https://github.com/odoo/odoo.git /opt/odoo/odoo | |
sudo chown odoo:odoo /opt/odoo/ -R && sudo chown odoo:odoo /var/log/odoo/ -R && cd /opt/odoo/odoo && sudo pip install -r requirements.txt | |
sudo npm install -g less@3.0.4 less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node | |
cd /tmp && wget -c https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb && sudo gdebi -n wkhtmltox_0.12.5-1.bionic_amd64.deb && rm wkhtmltox_0.12.5-1.bionic_amd64.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter { | |
if [type] == "odoo" { | |
grok { | |
match => { "message" => "%{ODOOLOG}" } | |
} | |
date { | |
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS" ] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Quick and (very) dirty script to send emails when a user gets a message and is away from HUD | |
from base64 import b64decode | |
from hashlib import sha256 | |
import sqlite3 | |
import datetime | |
import itertools | |
import os |