GithubHelp home page GithubHelp logo

openat / odoo_v8.0 Goto Github PK

View Code? Open in Web Editor NEW
6.0 10.0 8.0 53.36 MB

odoo Version 8.0

Shell 0.39% Python 1.46% Nginx 0.02% CSS 1.05% JavaScript 95.74% HTML 1.28% PHP 0.02% Haxe 0.01% Nix 0.01% ABAP 0.01% ActionScript 0.01% Ada 0.01% Assembly 0.01% AutoHotkey 0.01% C++ 0.01% Cirru 0.01% Clojure 0.01% COBOL 0.01% CoffeeScript 0.01% ColdFusion 0.01%

odoo_v8.0's Introduction

odoo_v8.0 Code Base

This repository is used as a codebase for odoo v8.0 instances and the related setup tools (odoo-tools.sh). The master branch of this repo is always a deploy-able production ready branch.

WARNING

This structure is going to change very soon!

CONVENTIONS

Branches:

The default latest stable branch is called master. The other branches in the github repository are either production branches starting with "int" or "ext" (intdadi, intdadirle, exthof) or development and bugfix branches (setuptools, fix1234, dev_wsd_templates) that will be merged back into the master branch.

Branch Names

  • dev[description] or freename e.g.: devsetuptools = Development branches that will be merged into master (deleted after merge)
  • fix[Issue Number] e.g.: fix1234 = Bug Fixes related to Github Issues (deleted after merge)
  • int[rolloutlevel] e.g.: intdemo = Production Branches hosted on our servers (our servers - also our hosted ones e.g.: at abaton)
  • ext[customer id] e.g.: exthofe = Production Branches hosted on customer servers (no control/payment for this servers from our side)

Examples of Branch Names on github:

  • master (default stable branch)
  • intdadi
  • intdadirl1
  • intdevel
  • exthofe
  • fix1234 (deleted after merge)
  • setuptools (deleted after merge)
  • dev_website_sale_donate_newtemplating (deleted after merge)

Branch Updates (Deployment) for the odoo codebase:

The flow of fast-forward-branch-updates is always: master -> intdadi -> intdadirl1 - intdadirl2 Ext branches are normally not included in the update cycle. Therefore and to make FF possible merges or commits are never done directly in any "int" or "ext" branches Where int marks a server we pay (our own server) for and ext marks a server the custommer pays for (custommer server).

Backup Filename Convention

odoo-tools.sh backup can create backups of odoo, etherpad and owncloud. If you are creating backups always include the configuration files of the programm as a partial backup also and finally move all partial backups in a single zip or tgz archive.

Odoo backup example:

  • Step 1: Odoo Database Backup o8_intdadi_dadi-odoo_db-2015_01_23_0154.zip
  • Step 2: Odoo Config File Backup o8_intdadi_dadi-odoo_conf-2015_01_0156.tgz
  • Step 3: Move both archives into the final backup archive o8_intdadi_dadi-odoo-2015_01_23_0156.zip

Convention for backup parts file names:

[instancename]-[progname]_[backuptype]-[YYYY]_[MM]_[DD]_[HHmm].[fileending] e.g.: o8_intdadi_dadi-odoo_db-2015_01_23_0154.zip

  • progname should be in [odoo|pad|cloud]
  • backuptype must be in [db|conf|file]
    • db = backup of a database (sql dump)
    • conf = config files
    • file = the rest ;) - file based backups

Convention for the final backup file name:

All backup parts must be moved into a final backup archive of the format:

  • [instancename]-[progname]-[YYYY]_[MM]_[DD]_[HHmm].[fileending]
    • e.g.: o8_intdadi_dadi-odoo-2015_01_23_0154.tgz

If it is a cyclical backup e.g. weekly or daily the Date Part can be replaced like this:

  • [instancename]-[progname]-[YYYY]_week_[weeknumber].[fileending]
    • e.g.: o8_intdadi_dadi-odoo-week_32.tgz
  • [instancename]-[progname]-[YYYY]_day_[monday].[fileending]
    • e.g.: o8_intdadi_dadi-odoo-day_monday.tgz

GOALS

One Codebase (github repository) for all instances

  • The branch determines the release (master=latest -> intdadi -> intdadirl1)
  • All third party addons as well as odoo itself are linked as submodules and therefore tied with a specific commit

Simple setup and maintenance through odoo-tools.sh

odoo-tools.sh is a simple setup script that is able to

  • prepare an ubuntu 14.04 LTS server to run odoo v8 (libs, tools, settings)
  • setup/download the odoo code base for odoo v8 from github
  • newdb create a new odoo instance:
    • linux user
    • database creation
    • postgres user
    • server.conf und server.init
    • etherpad
    • owncloud
    • nginx setup (match urls to instance via vhosts) and setup default URLs e.g.: ahch.datadialog.net, aswidget.ahch.datadialog.net, cloud.ahch.datadialog.net, pad.ahch.datadialog.net
    • backup and logrotate cron jobs
    • create and link custom-addons githup repository into the instance addons folder
    • Install push-to-deploy workflow for updating the custom addons folder
  • duplicatedb duplicate an instance (TODO!)
  • update one or all instances to the latest master branch (TODO!)
    • clone the server (VMWare)
    • create new snapshot on the clone
    • backup instances on the clone
    • Try the update(s) on the clone (one by one) and if it all worked:
    • Do the Updates on the production machine
  • maintenancemode set one or all instances into maintenance mode (not reachable from the outside)
  • backup one or all instances
  • restore one or all instances (TODO!)
  • ToDo: deploy addon(s) to one or more databases on the local server

HINT: db-tools.sh is used by odoo-tools.sh to backup and restore the database and data-dir of an instance.

SETUP

This setup process will only work on a fresh install of Ubuntu 14.04 LTS. Make sure timezone is correct and the server has internet access!

1.) Be Root ;)

ssh yourname@yourserver
sudo su

2.) get odoo-tools.sh

wget -O - https://raw.githubusercontent.com/OpenAT/odoo_v8.0/master/TOOLS/odoo-tools.sh > odoo-tools.sh
chmod 755 odoo-tools.sh

3.) Prepare the Ubuntu Server

odoo-tools.sh prepare

Reboot the server!

4.) Setup the odoo_v8.0 codebase (=branch):

# USAGE: odoo-tools.sh setup {TARGET_BRANCH}
odoo-tools.sh setup intdadi

This will create a new folder in /opt/odoo_v8.0 called intdadi.

HINT: You can run multiple branches on the same server! All the branches will use and increment the same counter-file for the Database-Port therefore no port collisions can happen between Instances of different branches! A maximum of 99 Instances are possible for all installed branches!

5.) Create a new Instance:

5.1) Create a new Github-Repository manually for the custom-addons-folder of the new instance:

  • Create a new Github-Repository hosting the custom-addons of the instance:
    • Where: https://github.com/OpenAT/
    • Name: cu_{DATABASE_NAME} e.g.: cu_dadi (DATABASE_NAME should be the customer number e.g.: ahch or dadi)
  • Create a webhook in the repository settings (https://github.com/OpenAT/cu_ahch/settings/hooks)
    • Payload Url: e.g.: ahch.datadialog.net/cu_ahch
    • Content Type: application/x-www-from-urlencoded

5.2) Create the Default DNS-Entries for the new instance:

  • dadi.datadialog.net, *.dadi.datadialog.net

5.3) Install the new Instance:

# usage: odoo-tools.sh newdb {TARGET_BRANCH} {SUPER_PASSWORD} {DATABASE_NAME} {DOMAIN_NAME} [CUADDONSREPONAME]
odoo-tools.sh newdb intdadi admin dadi www.datadialog.net
  • Test/open the new instance
  • Install addon base_config

5.4) Save the installation summary in keepass!!!

5.5) Add the instance to the monitoring service

5.6) Ask the customer to set the correct DNS entries: www.datadialog.net, aswidget.www.datadialog.net, pad.www.datadialog.net, cloud.www.datadialog.net

DEVELOPMENT

To develop with this repo use this workflow:

# 1.) Clone the repo odoo_v8 branch master locally:
git clone -b master --recurse-submodules https://github.com/OpenAT/odoo_v8.0.git ${instance_dir}

# Check if the upstream (remote) is set correctly for the master branch
git branch -vv
git --set-upstream-to=https://github.com/OpenAT/odoo_v8.0.git master    # creates remotes and origin

# 2.) Create and checkout a new branch:
git branch dev-ckeditor_advanced
git checkout dev-ckeditor_advanced

# 3.) Push your Branch to Github (so everybody knows what you are working on)
git commit
git push origin dev-ckeditor_advanced

# 4.) Do stuff and commit and push changes until ready:
git add [file or folders]    # This tells git what to include in next commit
git commit -m "[ADD] Added README.md"
git push origin dev-ckeditor_advanced

# 5.) When ready with development 
# - create pull request on github (at webpage) if wanted to discuss / review changes
# - Update master branch to latest
# - rebase dev-ckeditor_advanced on master
# - rebase dev-ckeditor_advanced submodules on master
# - merge dev-ckeditor_advanced in master with rebase
git fetch
git checkout master    # NOW IN BRANCH master
git pull
git checkout dev-ckeditor_advanced    # NOW IN BRANCH dev-ckeditor_advanced
git rebase master
git submodule update
git checkout master    # NOW IN BRANCH master
git merge dev-ckeditor_advanced
git push origin master

Adding new Submodules to the repo:

# This is an example how to add a submodule:
git submodule add -b master https://github.com/ether/etherpad-lite.git etherpad-lite

# Ubdate all submodules
git submodule update --rebase --remote --recursive

UPDATE OF AN INSTANCE (and its DBs)

This is for now only a placeholder but will describe the update process of a customer instance.

# Update Master
git checkout master                             
git pull                                        
git submodule update

# Update Branch (Code Repo for a server in this case)
git checkout intdadi                            
git rebase master
git submodule update
git push origin intdadi

Update of all Submodules of branch master

git checkout master
git pull
git submodule update --remote --rebase --recursive
git commit -am "[UPDATE] all submodules updated"
git push master

DOCUMENTATION

odoo v8

Configuration (res.config) related

Other odoo Tools and Docs

XMLRPC, ErpPeek, Connector ...

git, git workflow and github

Odoo Setup in Ubuntu 14.04 LTS

Python, PIP, VirtualEnv

BASH Scripting

Java Script

odoo_v8.0's People

Contributors

michaelkarrer81 avatar winston6071 avatar

Stargazers

Raffaele avatar agb80 avatar Bohdan Lisnenko avatar ITGeeker avatar Luke Branch avatar Kevin Read avatar

Watchers

James Cloos avatar ITGeeker avatar  avatar  avatar  avatar Mario Gielissen avatar  avatar Christian Spath avatar Martin Kaip avatar  avatar

odoo_v8.0's Issues

Simple Checkout finish into module

code am pfotdemo server
/addons/website_sale/controllers/main.py
oder mail andi 25. feb.
FEHLER: das mal was falsches im korb ist.....
derzeit ist der code mit product.product, deshalb müsste man dann beim linken die ID der Produktvariante nehmen....
oder man baut den code auf product.template um

Replace the word Instance with branch for setup-tools.sh and everywhere else

instance is a very missleading word since what was an instance earlier is a "Database" now...

Instance now means codebase - or "branch of github repo odoo_v8.0" therefore we should rename it in setup-tools.sh and in the readme to "branch"

so

setup-tools.sh setup

would change to:

setup-tools.sh newbranch

use updated URL for wkhtmltopdf downloads

Hello,

wkhtmltopdf has moved the downloads provider from SourceForge to gna.org. As mentioned in the linked message, all earlier downloads have been removed from SourceForge and you are strongly advised to migrate to the new URLs. The following files in your repository will need to be updated:

  • TOOLS/odoo-tools.sh

It is recommended to either subscribe to the mailing list or Twitter feed to receive updates on new releases and further changes.

Thanks,
wkhtmltopdf maintainer

PIL used not Pillow and no JPG support

Nur als reminder:

apt-get remove pil pillow -y
pip uninstall pil
pip uninstall pillow
apt-get install libjpeg-dev libfreetype6-dev zlib1g-dev libtiff4 libtiff4-dev python-libtiff
pip install Pillow==2.5.1 --upgrade

Check / Change php5-fpm from ip to socket

Make sure PHP-FPM is listening on unix socket and not on IP!

/etc/php5/fpm/pool.d/www.conf

...
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
; a specific port;
; 'port' - to listen on a TCP socket to all addresses on a
; specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
;listen = 127.0.0.1:9000
listen = /var/run/php5-fpm.sock
...

Add an integrated Mail server (MTA + IMAP)

Add a local MTA and IMAP Server to the mix so that openerp will work out of the box - the mta also serves as an mail relay delivering all other e-mails to the default e-mail server of the company.

Because of this we would be independend from any custommers e-mail server

  • rewrite user + adressing to normal mail addresses (like [email protected] to [email protected] and send a copy to regular mail sever
  • add catchall mailboxes for project, service ...

ermöglichen von einer zweiten installation auf einem Server mit demselben branch namen

umbauen des abbruchs mit ls-remote wenn es schon eine branch mit dem damen geben sollte
WARNING und EXIT 2 weg

if [ ! git ls-remote ${SOURCE_REPO} | grep -sw "${TARGET_BRANCH}" 2>&1>/dev/null]; then
    git branch ${TARGET_BRANCH} >> $INSTANCE_SETUPLOG
else
    echo -e "git branch not done because remote already exists your creating a new DEMO site of an existing branch" | tee -a  ${INSTANCE_SETUPLOG}
fi

website_sale_donate - add option for anonymous donation

add a checkbox: allow annonymous donation

if set name and country do not have to be mandatory fields - instead name should be set to anonymous and country to Austria if no name and country was set in the checkout template

Make python-ldap install work

add dependency

apt-get install libldap2-dev libsasl2-dev

to setupscript to make building python-ldap possible
(pip install python-ldap==2.4.15)

Ogone Payment Provider customization

After Installing Payment Provider Ogone:

  1. The Payment Provider Logo is Ogone only, this makes customers not trust the payment option
    we have to show well known KreditCard Logos or EPS Logo
  2. The Paypage of the Provider can be customized a test template has been created there
    http://portal.pfotenhilfe.at/website_pfoh/static/src/js/viveum_template.html
  3. We would like to achieve that the credit card or the payment method passed to ogone is already chosen.

TEST for 1. :
not done YET
XML Paramter for Aquire Button

INFO:
odoo/addons/payment_ogone/views/ogone.xml --> logo and fields

TEST for Point 2. :
test at the payment provider template button xml

template for the aquire button customization

RESULT:
xml error after implementing this line above

INFO:
odoo/addons/payment_ogone/models/ogone.py
140: class ogone_form_generate_values(
odoo/addons/payment_ogone/views/ogone.xml --> logo and fields

TEST for Point 3. :
duplicate the payment provider and change the name to the Payment Method
and use these parameters "Values --> can be found in the documentation of Viveum/Ogone
Login to Viveum.at --> testaccount verein
Support/integration and user manuals/Viveum Advanced e-Commerce integration guide

RESULT:
Error in XML View

INFO:
odoo/addons/payment_ogone/models/ogone.py
140: class ogone_form_generate_values(
odoo/addons/payment_ogone/views/ogone.xml --> logo and fields

Login User to odoo

---- Test Login mit ODOO Account

Forum Anmeldetest wanted to LOGIN, no option to login at this SCREEN
TODO: create a hier anmelden Button

Registrieren geht gut und man wird angelegt, selbiges wie weiter unten bei der Google Auth, Standards setzen
TODO:

  • standards setzen
  • autmatische KARMA Setzen > 3
  • Startseite definieren LÖSUNG (siehe UMLEITUNG: weiter unten )
  • website Kommentare erlauben aktivieren bei den user settings
  • Zeitzone automatisch stellen

----- Test Login with Google Account
install oauth module
erstellen der website für Nutzungs und datenschutzerklärung
http://tierfamilie.demo.datadialog.net/
http://tierfamilie.demo.datadialog.net/page/googlekontobedingungen

im google konto erstellen eines neuen Projektes
https://console.developers.google.com/
erstellen einer neuen Client ID unter authentifirierung (auth)
urls für die Odoo Seite
redirect url http://tierfamilie.demo.datadialog.net/auth_oauth/signin
redirect url für java script http://tierfamilie.demo.datadialog.net/

copy pase Client ID im Odoo bei Settings allgemein

nach dem erfolgreichen login kommt der nutzer in Portal anstatt auf die website wo er sich gerade befindet. Es wird eine neuer res.user und res.partner angelegt und mit dem neuen objekt outh provider über die oauth_id beim user verlinkt

TODO:

  • standards setzen
  • autmatische KARMA Setzen > 3
  • Startseite definieren LÖSUNG (siehe UMLEITUNG: weiter unten )
  • website Kommentare erlauben aktivieren bei den user settings
  • Zeitzone automatisch stellen

UMLEITUNG:
Redirect Users to Website
https://www.odoo.com/forum/help-1/question/how-to-redirect-to-the-shop-website-after-the-customer-log-in-into-my-system-odoo-8-81301

replace in VIEW web.login
http://tierfamilie.demo.datadialog.net/web#id=173&view_type=form&model=ir.ui.view&menu_id=42&action=25

replace
""
by
""
DIESER REDIREKT TEST --> FUNKTIONIERT NOCH NICHT

Forum Insert Image

Goal:
insert image in a Question

Test:
click insert image button in the CKEdit Question or Answer dialog, Popup with a standard CK Editor window appear for inserting link to a picture

wanted solution:
insert image button calls the "image db overview" windows from the Website editor which than can be used to upload or link pictures.

Allow non root Linux User to restart the odoo service, etherpad and owncloud

Setupscript should add a new file "username" in folder /etc/sudoers.d/ with content:

"username"    ALL=(root) NOPASSWD: /usr/bin/service "servicename" restart, /usr/bin/service "servicename" stop, /usr/bin/service "servicename" start

(for odoo, owncloud and etherpad)

So that the non privileged user can restart the service easily without password:

sudo service "servicename" restart

Debugging with PyCharm broken because of gevent

In openerp/init.py there is a line

if sys.modules.get("gevent") is not None:
    evented = True

Because of this if pycharm debugger starts the server with gevent wich make debugging in pycharm impossible.

Solution:
Create our own odoo start script that will set openerp.evented to False ;) Learnd from Ascone

job offers email alias cannot be catchall

  • Problem:
    Bei einem Job Angebot kann keine catchall adresse benutzt werden wie jobs@.....
  1. einloggen als Admin
  2. Anlegen eines "Job Offers" " personal" "neue Arbeitsstelle"
    Anlegen Job Offer 1
    eintragen Alias Adresse beim Job Angebot --> [email protected]
  3. Speichern
  4. Anlegen eines "Job Offers" " personal" "neue Arbeitsstelle"
    Anlegen Job Offer 2
    eintragen Alias Adresse beim Job Angebot --> [email protected]
  5. Speichern
  • Erwartung:
    email adresse sollte bei beiden job angeboten gleich sein
  • Ergebnis:
    emailadresse wird jeweils mit einer nummer am ende erweitert ist ist nicht möglich
    eine catchall adresse zu verwenden, am ende der adresse wird eine nummer hinzugefügt z.B [email protected]

TODO:
Überprüfen ob das ein Bug ist oder eine Konfigurationseinstellung

website_main_menu - Extensions for the Main Navigation of odoo websites

Write a better main menu:

  • Sticky on Top
  • Reserve Place for Logo

STICKY ON TOP

Make the bootstrap top menu sticky :)

http://www.bootply.com/69848
http://www.bootply.com/96188
http://stackoverflow.com/questions/17687172/bootstrap-make-a-navbar-sticky-after-scrolling-down
http://jsfiddle.net/skelly/df8tb/

Java Script could be added tto to get a dynamic effect!

Basic CSS:

wrapwrap .affix.navbar-default {

transition: opacity 0.4s ease;
opacity: 0.9;
}

wrapwrap .affix {

top: 0;
min-width: 100%;
}
.navbar.navbar-static-top {
margin-bottom: 0;
}
.affix {
position: fixed;
-webkit-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}

website_shop_donate product.template extensions and custom snippets for donations

To make donations easier and the shop over all more usable for donations we sould need the following options for products:

  • hide price checkbox (price is only visible in the product page but not at the shop overview pages)
  • hide quantity checkbox
  • hide payment box in product page (java script that hides the pay box and that makes tha image and text full width)
  • custom price checkbox(makes it possible to set your own price for a product in the webshop - makes sence for donatiosn - adds an other field that is pre filled with the default product price - will be used in the sales order instead of the product price.)
  • simple checkout checkbox (replaces the button of the products with an other route that jumps directly to the checkout form)
  • recurring intervall price per year field and intervall selection field (selection box to allow monthly, quarterly or yearly payments :) - have to lookup what is already possible with odoo by default) - this intervall can then be set when selecting the donate form
  • donate product default record - add a default product for standard donations - can be recurring
  • donate form snipped - drag and drop snippet to directly enter data add the default donation product to the cart and redirect to the checkout page
  • donate button snipped - basically same as the snippet - adds the default donation product to the cart and redirects to the checkout page
  • translation and better wording for the entire shop (en und de)

Website Mobile Responsiveness error in Microsoft phone or iexplore scales 100% of image

Testing:
DO: Login as Admin
DO: Use Big Picture Snippet
DO: add full hd image as picture
DO: save and test it with chrome --> WORKS fullscreen, mobile less 800px aso... android, mac, works ...
DO: Iexplore smaller than 800 px till it switches to mobile menü .... page scales immediately to 100%
DO: Windows mobile phone --> same problem mobile version does not show correctly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.