Odoo Setup NEU
parent
86cb264579
commit
121fadb715
|
|
@ -84,7 +84,6 @@ def main():
|
|||
'create_db',
|
||||
'login',
|
||||
'install_module_sale',
|
||||
#'setup_accounting',
|
||||
'set_admin_rights',
|
||||
]
|
||||
|
||||
|
|
@ -100,9 +99,8 @@ def main():
|
|||
|
||||
setup_methods = [
|
||||
'login',
|
||||
'uninstall_chat',
|
||||
'install_modules',
|
||||
'set_warehouse',
|
||||
#'set_warehouse',
|
||||
#'base_config',
|
||||
#'sale_config',
|
||||
#'finance_config',
|
||||
|
|
@ -114,9 +112,9 @@ def main():
|
|||
#'purchase_config',
|
||||
'set_date_format',
|
||||
'set_company',
|
||||
'set_taxes',
|
||||
'set_uom',
|
||||
'set_steuerzuordnung',
|
||||
#'set_taxes',
|
||||
#'set_uom',
|
||||
#'set_steuerzuordnung',
|
||||
#'setup_journals',
|
||||
'set_currencies',
|
||||
'set_decimal_price',
|
||||
|
|
|
|||
|
|
@ -202,37 +202,34 @@ class Config():
|
|||
'document',
|
||||
'knowledge',
|
||||
'auth_crypt',
|
||||
'cam_testenv',
|
||||
'cam_max_width',
|
||||
'oerp_no_phoning_home',
|
||||
'cam_custom',
|
||||
'cam_reports',
|
||||
'auth_admin_passkey',
|
||||
'auth_brute_force',
|
||||
'auth_session_timeout',
|
||||
'disable_odoo_online',
|
||||
'mass_editing',
|
||||
'password_security',
|
||||
'res_config_settings_enterprise_remove',
|
||||
'scheduler_error_mailer',
|
||||
'web_dialog_size',
|
||||
'web_environment_ribbon',
|
||||
'web_favicon',
|
||||
'web_responsive',
|
||||
'web_searchbar_full_width',
|
||||
'web_sheet_full_width',
|
||||
'web_shortcut',
|
||||
'web_translate_dialog',
|
||||
'web_tree_many2one_clickable',
|
||||
#'website_no_crawler',
|
||||
#'website_odoo_debranding',
|
||||
'dp_custom',
|
||||
'dp_reports',
|
||||
'account_cancel',
|
||||
'cam_invoice_skonto',
|
||||
'web_printscreen_zb',
|
||||
'crm',
|
||||
'sale',
|
||||
'mail_follower_control',
|
||||
#'cam_hr_overtime',
|
||||
#'cam_hr',
|
||||
#'sale_order_optional',
|
||||
#'sale_order_reminder',
|
||||
]
|
||||
|
||||
# Setze das Feld "Attachment" im Report (wenn gesetzt wird das PDF in den Anhängen gespeichert)
|
||||
timestamp = " + '_' + time.strftime('%Y-%m-%d-%H%M') + '.pdf')"
|
||||
self.reports = {
|
||||
'sale.report_saleorder': "((object.state in ('draft','sent') and 'KV_' or 'AB_') + object.name" + timestamp,
|
||||
'cam_reports.report_saleorder_ohne': "((object.state in ('draft','sent') and 'KV_' or 'AB_') + object.name" + timestamp,
|
||||
'cam_reports.report_porto_anforderung': "('PV_' + object.name " + timestamp,
|
||||
'cam_reports.report_porto_anforderung_ohne': "('PV_' + object.name " + timestamp,
|
||||
'account.report_invoice': "(object.state in ('open','paid')) and ('RE_'+(object.number or '').replace('/','')" + timestamp,
|
||||
'cam_reports.report_invoices_ohne': "(object.state in ('open','paid')) and ('RE_'+(object.number or '').replace('/','')" + timestamp,
|
||||
'cam_reports.report_porto_rechnung': "(object.state in ('open','paid')) and ('RE_'+(object.number or '').replace('/','')" + timestamp,
|
||||
'cam_reports.report_porto_rechnung_ohne': "(object.state in ('open','paid')) and ('RE_'+(object.number or '').replace('/','')" + timestamp,
|
||||
'purchase.report_purchasequotation': "('AN_' + object.name" + timestamp,
|
||||
'purchase.report_purchaseorder': "('B_' + object.name" + timestamp,
|
||||
'cam_reports.report_purchaseorder_ohne': "('B_' + object.name" + timestamp,
|
||||
}
|
||||
|
||||
self.users_file = 'res.users.csv'
|
||||
|
|
@ -245,17 +242,17 @@ class Config():
|
|||
]
|
||||
|
||||
self.default_values = [ # ir.values
|
||||
('product.template', 'type', 'service'),
|
||||
('product.template', 'type', 'XML:xmlid'), #mit prefix "XML:" kann eine XML ID übergeben werden
|
||||
#('product.template', 'type', 'service'),
|
||||
#('product.template', 'type', 'XML:xmlid'), #mit prefix "XML:" kann eine XML ID übergeben werden
|
||||
]
|
||||
|
||||
self.data_updates = {
|
||||
'mrp.route_warehouse0_manufacture': {'name': 'Produzieren'},
|
||||
'purchase.route_warehouse0_buy': {'name': 'Einkaufen'},
|
||||
'stock.route_warehouse0_mto': {'name': 'Beschaffe von Auftrag'},
|
||||
#'mrp.route_warehouse0_manufacture': {'name': 'Produzieren'},
|
||||
#'purchase.route_warehouse0_buy': {'name': 'Einkaufen'},
|
||||
#'stock.route_warehouse0_mto': {'name': 'Beschaffe von Auftrag'},
|
||||
}
|
||||
|
||||
self.system_parameters = {
|
||||
'ir_attachment.location': 'db', # [db] oder [file]
|
||||
'ir_attachment.location': 'file', # [db] oder [file]
|
||||
'database.expiration_date': '2038-01-19',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,8 +155,6 @@ class DatenpolFunctions():
|
|||
'grouping': '[3,3]',
|
||||
}
|
||||
self._execute('res.lang', 'write', lang_ids, vals)
|
||||
else:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
|
@ -414,15 +412,6 @@ class DatenpolFunctions():
|
|||
|
||||
return True
|
||||
|
||||
def uninstall_chat(self):
|
||||
"""Chat-Modul deinstallieren"""
|
||||
|
||||
modules = ['im_chat', 'im_odoo_support', 'bus']
|
||||
modules_to_install = self._execute('ir.module.module', 'search', [('name', 'in', modules)])
|
||||
self._execute('ir.module.module', 'button_uninstall', modules_to_install)
|
||||
self._execute('base.module.upgrade', 'upgrade_module', modules_to_install)
|
||||
return True
|
||||
|
||||
def set_uom(self):
|
||||
"""Mengeneinheiten setzen"""
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class odoo {
|
|||
content => $sudo_entry,
|
||||
}
|
||||
|
||||
ssh_authorized_key { "andreas@camadeus":
|
||||
ssh_authorized_key { "andreas@datenpol":
|
||||
user => odoo,
|
||||
type => 'ssh-rsa',
|
||||
key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQDBIg6NZV4tTs+J5qUP4/zQAn+Xi3muKqbaSDV8yYm50mH77PcLwbkZVlxdF0/OFCl5f5FCNp4Ag4Px97M35Nv+BweOTCZNMKOHmvtXY1fCRUQnk6ca3NlipImppL0U47SUzt9KkNIsz0FWxLu74LANgxKwrf8Hgim8Nkq8WrlvuoJCqf+542N15cGrf/9eD6yRm7AmdFi7VIYrP4m7TPbXJBGX+cXOo0bKTyaq8mtinbUN5UCi/eJ08wYkm/CGVxL+9cm6HOABw332A8OadAliCZBWqhFT0rBKdoWLxBbTsILALskrddpKLwBLOUIU79YeT0OfNpLCnVi8u67X9inl',
|
||||
|
|
@ -79,11 +79,11 @@ class odoo {
|
|||
'python-pip',
|
||||
'python-psutil',
|
||||
'python-psycopg2',
|
||||
'python-pybabel',
|
||||
#'python-pybabel',
|
||||
'python-pychart',
|
||||
'python-pydot',
|
||||
'python-pyparsing',
|
||||
'python-pypdf',
|
||||
#'python-pypdf',
|
||||
'python-reportlab-accel',
|
||||
'python-reportlab',
|
||||
# 'python-requests', ist bei debian version 0.12.1 => daher install mit pip
|
||||
|
|
@ -102,43 +102,34 @@ class odoo {
|
|||
# für wkhtmltox
|
||||
'xfonts-base',
|
||||
'xfonts-75dpi',
|
||||
'node-less'
|
||||
'node-less',
|
||||
'libxslt-dev', # lxml
|
||||
'libxml2-dev', # lxml
|
||||
'lib32z1-dev'. # lxml
|
||||
'libldap2-dev', #ldap
|
||||
'libsasl2-dev', #ldap
|
||||
]:
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
exec { "/usr/bin/wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb":
|
||||
exec { "/usr/bin/wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb":
|
||||
alias => "wkhtmltox",
|
||||
cwd => "/tmp",
|
||||
creates => '/tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb'
|
||||
creates => '/tmp/wkhtmltox-0.12.1_linux-trusty-amd64.deb'
|
||||
}
|
||||
|
||||
file { "wkthmltox":
|
||||
name => "/tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb",
|
||||
name => "/tmp/wkhtmltox-0.12.1_linux-trusty-amd64.deb",
|
||||
owner => root,
|
||||
group => root,
|
||||
ensure => present,
|
||||
alias => "wkhtmltox",
|
||||
require => Exec["wkhtmltox"] }
|
||||
|
||||
# file { 'wkhtmltox':
|
||||
# name => "/tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb",
|
||||
# owner => root,
|
||||
# group => root,
|
||||
# source => "puppet:///modules/odoo/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb"
|
||||
# }
|
||||
|
||||
# wget::fetch { "wkhtmltox":
|
||||
# source => 'http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb',
|
||||
# destination => '/tmp/',
|
||||
# timeout => 0,
|
||||
# verbose => true,
|
||||
# }
|
||||
|
||||
package { 'wkhtmltox':
|
||||
provider => dpkg,
|
||||
ensure => installed,
|
||||
source => "/tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb",
|
||||
source => "/tmp/wkhtmltox-0.12.1_linux-trusty-amd64.deb",
|
||||
require => [FILE['wkhtmltox'],Package['xfonts-base']],
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +139,9 @@ class odoo {
|
|||
'requests',
|
||||
'vatnumber',
|
||||
'xlsxwriter',
|
||||
'ofxparse'
|
||||
'ofxparse',
|
||||
'babel',
|
||||
'pypdf',
|
||||
]:
|
||||
ensure => installed,
|
||||
provider => 'pip',
|
||||
|
|
@ -300,13 +293,13 @@ define odoo::instance ($db_pw,$ssl = false, $servername, $odooport, $odooport_lo
|
|||
}
|
||||
|
||||
$gitdir="/home/$instance/ext"
|
||||
$giturl="ssh://git@gitlab.datenpol.at:122/odoo/$gitrepo.git"
|
||||
$giturl="ssh://git@gitlab.datenpol.at:122/odoo/$gitrepo.git"$gituser="$instance"
|
||||
vcsrepo { $gitdir:
|
||||
ensure => present,
|
||||
provider => git,
|
||||
source => $giturl,
|
||||
revision => $gitbranch,
|
||||
user => 'ctba-prod'
|
||||
user => $instance,
|
||||
}
|
||||
|
||||
file { "/home/$instance/config":
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ db_password = False
|
|||
db_port = False
|
||||
db_user = False
|
||||
|
||||
proxy_mode = True
|
||||
|
||||
debug_mode = False
|
||||
list_db = True
|
||||
log_level = info
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@ upstream odoo-server-<%= @instance %> {
|
|||
server 127.0.0.1:<%= @odooport %> fail_timeout=3000s;
|
||||
}
|
||||
|
||||
upstream odoo-server-<%= @instance %>-long {
|
||||
server 127.0.0.1:<%= @odooport_longpolling %> fail_timeout=300s;
|
||||
}
|
||||
|
||||
server {
|
||||
<% if @ssl == true %>
|
||||
listen 443 ssl;
|
||||
|
|
@ -37,9 +41,9 @@ server {
|
|||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
<% if @servername =~ /.*camadeus.at$/ %>
|
||||
ssl_certificate /etc/nginx/ssl/camadeus.at.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/camadeus.at.key;
|
||||
<% if @servername =~ /.*datenpol.at$/ %>
|
||||
ssl_certificate /etc/nginx/ssl/datenpol.at.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/datenpol.at.key;
|
||||
<% else %>
|
||||
ssl_certificate /etc/nginx/ssl/<%= @instance %>.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/<%= @instance %>.key;
|
||||
|
|
@ -63,16 +67,23 @@ server {
|
|||
|
||||
# by default, do not forward anything
|
||||
proxy_redirect off;
|
||||
|
||||
location /longpollling {
|
||||
proxy_pass http://odoo-server-<%= @instance %>-long;
|
||||
}
|
||||
|
||||
|
||||
# cache some static data in memory for 60mins.
|
||||
# under heavy load this should relieve stress on the OpenERP web interface a bit.
|
||||
location ~* /web/static/ {
|
||||
proxy_cache_valid 200 60m;
|
||||
proxy_buffering on;
|
||||
expires 864000;
|
||||
proxy_pass http://odoo-server-<%= @instance %>;
|
||||
}
|
||||
}
|
||||
|
||||
# cache some static data in memory for 60mins.
|
||||
# under heavy load this should relieve stress on the OpenERP web interface a bit.
|
||||
location ~* /web/static/ {
|
||||
proxy_cache_valid 200 60m;
|
||||
proxy_buffering on;
|
||||
expires 864000;
|
||||
proxy_pass http://odoo-server-<%= @instance %>;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
HOST='lst.datenpol.at'
|
||||
HOST='xxx.datenpol.at'
|
||||
PORT=22
|
||||
|
||||
if [ $# -lt 1 ] || [ $# -gt 1 ]; then
|
||||
|
|
@ -41,6 +41,7 @@ rsync -av -e "ssh -p ${PORT}" --copy-links "site.pp" "${USER}@${HOST}:/tmp/site.
|
|||
rsync -arv -e "ssh -p ${PORT}" --copy-links "modules" "${USER}@${HOST}:/tmp"
|
||||
|
||||
ssh -p ${PORT} ${USER}@${HOST} "sudo mv -f /tmp/site.pp /etc/puppet/manifests/site.pp"
|
||||
# Achtung für Debian werden die Puppet-Module unter /etc/puppet/code/modules abgelegt
|
||||
ssh -p ${PORT} ${USER}@${HOST} "sudo rm -rf /etc/puppet/modules/odoo; sudo mv /tmp/modules/odoo /etc/puppet/modules; sudo rm -rf /tmp/modules"
|
||||
|
||||
ssh -p ${PORT} ${USER}@${HOST} "sudo puppet apply /etc/puppet/manifests/site.pp"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
node default {
|
||||
|
||||
TODO
|
||||
odoo::instance {'TODO-prod':
|
||||
db_pw => 'x54ef6t77t6ZZul3',
|
||||
ssl => true,
|
||||
|
|
@ -10,7 +9,7 @@ node default {
|
|||
odooport_longpolling => 8070,
|
||||
gitrepo => 'TODO',
|
||||
gitbranch => 'master'
|
||||
|
||||
}
|
||||
|
||||
odoo::instance {'TODO-test':
|
||||
db_pw => '9fd87sdfXXdfTs',
|
||||
|
|
|
|||
Loading…
Reference in New Issue