Odoo 10: Difference between revisions

From Objectif Client Inc
Jump to navigation Jump to search
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:


==Odoo 10==
==Installation==


===Installation===
===Prerequisite===
 
====Prerequisite====
'''Pyhton'''
'''Pyhton'''
<pre>
<pre>
Line 17: Line 15:
</pre>
</pre>


'''User Odoo'''
'''User odoo'''
<pre>
<pre>
adduser --system --home=/opt/odoo-10 --group odoo
adduser --system --home=/opt/odoo-10 --group odoo
</pre>
</pre>
'''PostGres Database odoo User'''
<pre>
su - postgres
cd
createuser -s odoo
exit
</pre>
'''Gdata'''
'''Gdata'''
<pre>
<pre>
Line 53: Line 60:
</syntaxhighlight>
</syntaxhighlight>


<syntaxhighlight lang="bash">
[options]
; This is the password that allows database operations:
admin_passwd = passowrd
addons_path = /opt/odoo-10/odoo/addons,/opt/odoo-10/addons,/opt/odoo-10/addons-plus
csv_internal_sep = ,
data_dir = /opt/odoo-10/.local/share/Odoo
db_host = False
db_maxconn = 64
db_maxconn = 128
db_name = False
db_password = False
db_port = False
db_template = template1
db_user = False
;###dbfilter = .*
demo = {}
email_from = False
geoip_database = /usr/share/GeoIP/GeoLiteCity.dat
import_partial =
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
list_db = True
log_db = False
log_db_level = warning
log_handler = :INFO
;###log_level = info
log_level = error
logfile = /var/log/odoo/odoo-server.log
logrotate = False
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
pg_path = None
pidfile = None
proxy_mode = False
reportgz = False
server_wide_modules = None
smtp_password = False
smtp_port = 25
smtp_server = smtp.local
smtp_ssl = False
smtp_user = odoo
syslog = False
test_commit = False
test_enable = False
test_file = False
test_report_directory = False
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 0
xmlrpc = True
xmlrpc_interface =
xmlrpc_port = 8069
</syntaxhighlight>
===Inti Script===
<syntaxhighlight lang="bash">
vi /etc/systemd/system/odoo-server.service
</syntaxhighlight>
<syntaxhighlight lang="bash">
[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>
===Apache Proxy configuration===
<syntaxhighlight lang="bash">
ProxyRequests off
SSLProxyEngine on
ProxyErrorOverride off
RequestHeader set "X-Forwarded-Proto" "https"
# Fix IE problem (httpapache proxy dav error 408/409)
SetEnv proxy-nokeepalive 1
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://odooserver:8069/
ProxyPassReverse / http://odooserver:8069
</syntaxhighlight>
=== Etherpad ===
* Install Ehterpad
<syntaxhighlight lang="bash">
addgroup etherpad
useradd etherpad etherpad -c "Etherpad Server" -d /opt/etherpad-lite -m -s /bin/bash
cd /opt
git clone git://github.com/ether/etherpad-lite.git
/opt/etherpad-lite/bin/run.sh --root
</syntaxhighlight>
* Review Etherpad Setting
<syntaxhighlight lang="bash">
vi /opt/etherpad-lite/settings.json
</syntaxhighlight>
* Auto start Etherpad
<syntaxhighlight lang="bash">
vi /etc/systemd/system/etherpad.service
</syntaxhighlight>
<syntaxhighlight lang="bash">
[Unit]
Description=Etherpad Server
After=syslog.target network.target
[Service]
Type=simple
User=etherpad
Group=etherpad
ExecStart=/opt/etherpad-lite/bin/run.sh
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300
[Install]
WantedBy=multi-user.target
</syntaxhighlight>
* Enable service
<syntaxhighlight lang="bash">
systemctl enable etherpad.service
</syntaxhighlight>
==Additional Modules==
Create a folder specific to the additional module to facilitate the identifiacation
<syntaxhighlight lang="bash">
mkdir /opt/odoo-10/addons-plus
chown odoo: /opt/odoo-10/addons-plus
</syntaxhighlight>
Download modules from
[https://github.com/OCA  OAC on Github]
==Other==


===Account Link===
===Account Link===
Line 84: Line 251:
(2 rows)
(2 rows)
</pre>
</pre>
==Application Configuration==
# Enable debug mod (setting and under odoo-10.0 click on "Activate the developer mode")
===Add Taxes on Invoice Report===
# Setting -> Reports -> Reports  and click on invoice in the list
# Click on QWEB Views and select "report_invoice_document"
# Add the following xml after the tag </div> line 115 and before the tag  <p t-if="o.comment">
   
<syntaxhighlight lang="xml">
          <div class="row" t-if="len(o.tax_line_ids) &gt; 1">
                <div class="col-xs-6">
                    <table class="table table-condensed">
                        <thead>
                            <tr>
                                <th>Tax</th>
                                <th class="text-right">Amount</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr t-foreach="o.tax_line_ids" t-as="t">
                                <td><span t-field="t.tax_id.description"/></td>
                                <td class="text-right">
                                    <span t-field="t.amount" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
</syntaxhighlight>
===Add Taxe Id on invoice===
# Accouting -> Taxe
# Select the taxe applicable for you "GST + QST for sales"
# Click on Edit
# Click on the taxe name in the list "GST/TPS for sales - 5%"
# Click on "Advance Option"
# Update Label print on invoice

Latest revision as of 00:21, 26 March 2017

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

PostGres Database odoo User

su - postgres
cd
createuser -s odoo
exit

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
[options]
; This is the password that allows database operations:
admin_passwd = passowrd
addons_path = /opt/odoo-10/odoo/addons,/opt/odoo-10/addons,/opt/odoo-10/addons-plus
csv_internal_sep = ,
data_dir = /opt/odoo-10/.local/share/Odoo
db_host = False
db_maxconn = 64
db_maxconn = 128
db_name = False
db_password = False
db_port = False
db_template = template1
db_user = False
;###dbfilter = .*
demo = {}
email_from = False
geoip_database = /usr/share/GeoIP/GeoLiteCity.dat
import_partial =
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
list_db = True
log_db = False
log_db_level = warning
log_handler = :INFO
;###log_level = info
log_level = error
logfile = /var/log/odoo/odoo-server.log
logrotate = False
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
pg_path = None
pidfile = None
proxy_mode = False
reportgz = False
server_wide_modules = None
smtp_password = False
smtp_port = 25
smtp_server = smtp.local
smtp_ssl = False
smtp_user = odoo
syslog = False
test_commit = False
test_enable = False
test_file = False
test_report_directory = False
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 0
xmlrpc = True
xmlrpc_interface =
xmlrpc_port = 8069

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

Apache Proxy configuration

ProxyRequests off
SSLProxyEngine on
ProxyErrorOverride off
RequestHeader set "X-Forwarded-Proto" "https"
# Fix IE problem (httpapache proxy dav error 408/409)
SetEnv proxy-nokeepalive 1

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass / http://odooserver:8069/
ProxyPassReverse / http://odooserver:8069

Etherpad

  • Install Ehterpad
addgroup etherpad
useradd etherpad etherpad -c "Etherpad Server" -d /opt/etherpad-lite -m -s /bin/bash
cd /opt
git clone git://github.com/ether/etherpad-lite.git
/opt/etherpad-lite/bin/run.sh --root
  • Review Etherpad Setting
vi /opt/etherpad-lite/settings.json
  • Auto start Etherpad
vi /etc/systemd/system/etherpad.service
[Unit]
Description=Etherpad Server
After=syslog.target network.target

[Service]
Type=simple
User=etherpad
Group=etherpad
ExecStart=/opt/etherpad-lite/bin/run.sh

# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300

[Install]
WantedBy=multi-user.target
  • Enable service
systemctl enable etherpad.service

Additional Modules

Create a folder specific to the additional module to facilitate the identifiacation

mkdir /opt/odoo-10/addons-plus
chown odoo: /opt/odoo-10/addons-plus

Download modules from OAC on Github

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)

Application Configuration

  1. Enable debug mod (setting and under odoo-10.0 click on "Activate the developer mode")

Add Taxes on Invoice Report

  1. Setting -> Reports -> Reports and click on invoice in the list
  2. Click on QWEB Views and select "report_invoice_document"
  3. Add the following xml after the tag line 115 and before the tag

           <div class="row" t-if="len(o.tax_line_ids) &gt; 1">
                <div class="col-xs-6">
                    <table class="table table-condensed">
                        <thead>
                            <tr>
                                <th>Tax</th>
                                <th class="text-right">Amount</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr t-foreach="o.tax_line_ids" t-as="t">
                                <td><span t-field="t.tax_id.description"/></td>
                                <td class="text-right">
                                    <span t-field="t.amount" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>

Add Taxe Id on invoice

  1. Accouting -> Taxe
  2. Select the taxe applicable for you "GST + QST for sales"
  3. Click on Edit
  4. Click on the taxe name in the list "GST/TPS for sales - 5%"
  5. Click on "Advance Option"
  6. Update Label print on invoice