Odoo 10: Difference between revisions
Jump to navigation
Jump to search
Line 31: | Line 31: | ||
</pre> | </pre> | ||
===Download from Github=== | ====Download from Github==== | ||
<pre> | <pre> | ||
cd /opt/odoo-10 | cd /opt/odoo-10 | ||
Line 39: | Line 39: | ||
</pre> | </pre> | ||
===Create log directory=== | ====Create log directory==== | ||
<pre> | <pre> | ||
mkdir /var/log/odoo | mkdir /var/log/odoo | ||
Line 46: | Line 46: | ||
</pre> | </pre> | ||
===Config file=== | ====Config file==== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
mkdir /etc/odoo-10 | mkdir /etc/odoo-10 | ||
Line 53: | Line 53: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Account Link=== | |||
====Inti Script==== | |||
<syntaxhighlight lang="bash"> | |||
vi /etc/systemd/system/odoo-server.service | |||
[Unit] | |||
Description=Odoo server | |||
After=syslog.target network.target | |||
[Service] | |||
Type=simple | |||
User=odoo | |||
Group=odoo | |||
# This line connects the odoo server to the Xvfb virtual display and allows wkhtmltopdf to work | |||
Environment="DISPLAY=:0" "PYTHONPATH=/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH" | |||
ExecStart=/opt/odoo-10/odoo-bin -c /etc/odoo-10/odoo-server.conf --db-filter=MyDemo | |||
# Give a reasonable amount of time for the server to start up/shut down | |||
TimeoutSec=300 | |||
[Install] | |||
WantedBy=multi-user.target | |||
</syntaxhighlight> | |||
===Other=== | |||
====Account Link==== | |||
Account Master | Account Master | ||
<syntaxhighlight lang="sql">select id, name from account_account where name in ('Product Sales', 'Expenses');</syntaxhighlight> | <syntaxhighlight lang="sql">select id, name from account_account where name in ('Product Sales', 'Expenses');</syntaxhighlight> |
Revision as of 20:09, 14 January 2017
Odoo 10
Installation
Prerequisite
Pyhton
apt-get install python-dateutil python-docutils python-feedparser python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi poppler-utils python-pip python-pypdf python-passlib python-decorator gcc python-dev mc bzr python-setuptools python-markupsafe python-reportlab-accel python-zsi python-yaml python-argparse python-openssl python-egenix-mxdatetime python-usb python-serial lptools make python-pydot python-psutil python-paramiko poppler-utils python-pdftools antiword python-requests python-xlsxwriter python-suds python-psycogreen python-ofxparse python-gevent
Jnodes
apt-get install npm ln -s /usr/bin/nodejs /usr/bin/node npm install -g less less-plugin-clean-css
User Odoo
adduser --system --home=/opt/odoo-10 --group odoo
Gdata
cd /opt/odoo-10 wget https://pypi.python.org/packages/a8/70/bd554151443fe9e89d9a934a7891aaffc63b9cb5c7d608972919a002c03c/gdata-2.0.18.tar.gz tar zxvf gdata-2.0.18.tar.gz chown -R odoo: gdata-2.0.18 gdata-2.0.18/ python setup.py install
Download from Github
cd /opt/odoo-10 wget https://github.com/odoo/odoo/archive/10.0.zip unzip 10.0.zip chown -R odoo: odoo-10.0
Create log directory
mkdir /var/log/odoo chown -R odoo:root /var/log/odoo
Config file
mkdir /etc/odoo-10
cp /opt/odoo/odoo-10/debian/odoo.conf /etc/odoo-10/odoo-server.conf
chown -R odoo: /etc/odoo-10
Inti Script
vi /etc/systemd/system/odoo-server.service
[Unit]
Description=Odoo server
After=syslog.target network.target
[Service]
Type=simple
User=odoo
Group=odoo
# This line connects the odoo server to the Xvfb virtual display and allows wkhtmltopdf to work
Environment="DISPLAY=:0" "PYTHONPATH=/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH"
ExecStart=/opt/odoo-10/odoo-bin -c /etc/odoo-10/odoo-server.conf --db-filter=MyDemo
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300
[Install]
WantedBy=multi-user.target
Other
Account Link
Account Master
select id, name from account_account where name in ('Product Sales', 'Expenses');
id | name -----+--------------- 19 | Product Sales 23 | Expenses (2 rows)
Property
select id, name, type, fields_id, value_reference, res_id from ir_property where value_reference like '%23' or value_reference like '%19';
id | name | type | fields_id | value_reference | res_id ----+--------------------------------+----------+-----------+--------------------+-------- 4 | property_account_expense_categ | many2one | 1947 | account.account,23 | 5 | property_account_income_categ | many2one | 1948 | account.account,19 | (2 rows)
Model
select id, model, name, relation, field_description from ir_model_fields where id in (1947, 1948);
id | model | name | relation | field_description ------+------------------+--------------------------------+-----------------+------------------- 1947 | product.category | property_account_expense_categ | account.account | Expense Account 1948 | product.category | property_account_income_categ | account.account | Income Account (2 rows)