GithubHelp home page GithubHelp logo

upsyd / odoo_v8.0 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openat/odoo_v8.0

0.0 2.0 1.0 64.98 MB

odoo Version 8.0

HTML 1.23% Shell 0.29% Python 1.40% Nginx 0.02% CSS 1.05% JavaScript 95.94% Haxe 0.01% Makefile 0.02% Nix 0.01% ABAP 0.01% ActionScript 0.01% Ada 0.01% Assembly 0.01% AutoHotkey 0.01% Batchfile 0.01% C++ 0.01% Cirru 0.01% Clojure 0.01% COBOL 0.01% CoffeeScript 0.01%

odoo_v8.0's Introduction

odoo_v8.0

This repo is used for production for odoo v8 installations. It is also the place where we develop our own addons for odoo. The master branch of this repo is always a deployable production ready branch. All branch names (=Instances) uploaded here have to follow this examples:

  • fix[ISSUE Number] e.g.: fix1234 = FIXES, Developments, Updates - (Make github Issue first!)
  • int[customer id] e.g.: intdemo = Production Instances hosted on our servers
  • ext[customer id] e.g.: exthof = Production Instances hosted on external servers

If they do not follow this conventions they are considered to be test branches. To get a better idea how final Database Names will look like on a server following this conventions consider teh following examples. REPO (o8) and BRANCH (= Instance Name) will be automatically added by odoo-tools.sh!

Examples of full Database Names:

[REPO][BRANCH][DATABASE]

  • o8_exthof_hof
  • o8_exthof_schulung
  • o8_exthof_demo
  • o8_intnpodemos_demo
  • o8_intnpodemos_pfo
  • o8_intnpodemos_pfo
  • o8_intope_erp
  • o8_intdad_web

GOALS

Better version and update handling

  • updated requirements.txt to install with pip install -r /path/to/requirements.txt
  • all third party addons as well as odoo itself are linked as submodules

Simple setup through odoo-tools.sh

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

  • prepare an ubuntu 14.04 LTS server for odoo
  • setup new instances of odoo on the local server
  • create new databases for a local instance with setup of:
    • postgres user
    • server.conf und server.init
    • database creation
    • etherpad setup
    • nginx setup (match url to local db)
    • backup and logrotate cron jobs
    • create and link customer addons into customers Instance /addons folder
    • Install push-to-deploy workflow for updating the customer addons
  • ToDo: update an instance to branch master from github
  • ToDo: deploy addon(s) to one or more databases on the local server

Also there is a tool called db-tools.sh to backup and restore local databases.

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 ;)
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 (reboot after finish is recommended)
odoo-tools.sh prepare

# 4.) Setup a new instance:
# USAGE: odoo-tools.sh setup {TARGET_BRANCH}
odoo-tools.sh setup intdemo 

# 5.) Setup a new customer Addons repo in github:
# USAGE: Manual goto github and create a new repo if not exists already for this customer even we do not use a specific addon
Goto Gibhub  https://github.com/OpenAT/ click + New Repository give it a name like "cu_dev01" "cu_herz"
Than goto the settings of this new repo and create a webhook or click here https://github.com/OpenAT/cu_dev01/settings/hooks
use payload Url like: http://subdomain.domainname.net/cu_dev01 --> production would be the customers domain
content Type: application/x-www-from-urlencoded
and safe the hoock,
move on with newdb intallation now
after your newdb intallation you should see now a green check if you made everything correct
NOW you can Push your modules into this repo and start developing or already finished before your newdb intallation
- TODO: maybe we can automate this process too, right now i think it is a good idea to keep this in manual mode, or at least repo creation and hook creation

# 6.) Create a new Database:
# Start once with no options to see usage (look for newdb)
odoo-tools.sh newdb <...>

#For Production Instances ONLY!: you should immediately push your new branch to github!
# HINT: Dont worry *.conf *.log and *.init files and database directories o8_*/ are in .gitignore !
git push origin YOURBRANCH

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. Keep tuned ;)

# 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"
# then you have to push master branch back to origin/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

Watchers

 avatar  avatar

Forkers

rapolebas

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.