Skip to content

Instantly share code, notes, and snippets.

#https://www.odoo.com/documentation/11.0/howtos/backend.html
#odoo-bin scaffold <module name> <where to put it> eg odoo-bin scaffold openacademy addons
#python odoo-bin scaffold tool addons #{in cmd, put new tool folder in folder addons}
# ./odoo-bin scaffold module_name /odoo/odoo-server/addons/
#./odoo-bin scaffold <module_name> <destination path where you want to create>
python odoo-bin scaffold tool addons
https://hub.packtpub.com/building-your-first-odoo-application/
_name value is what will be used as an identifier for other odoo modules.
Go to https://www.jetbrains.com/pycharm/ and download your pycharm
Install pycharm
Go here for how to do your settings: pycharm odoo template coding https://www.youtube.com/watch?v=vytzDo33qdM https://github.com/mohamedmagdy/odoo-pycharm-templates
Download settings.jar https://github.com/mohamedmagdy/odoo-pycharm-templates
Open pycharm
File | Import Settings... > find the settings file > Ok
File | Invalidate Chaches / Restart... > Just Restart
# ! / usr / bin / env python
# - * - coding: utf-8 - * -
import sys
import os
print('################################################################################################ #############')
print('# Inheritance is an application to generate Module for Odoo # ')
print('# www.falconsolutions.cl # ')
print(' # Author: Marlon Falcon Herandez # ')
print(' # mail: mfalcon@falconsolutions.cl # ')
print(' ################################################################################################ ############# ')
https://www.odoo.com/documentation/11.0/setup/install.html#setup-install-source
# Python 3.5+
#ubuntu 18.04 install Python 3.5
apt-get install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.5 -y
sudo update-alternatives --config python
#setup your default python version eg sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1
#setup your default python version eg sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
# create database based on yoour domain eg domain is thuani.com make database name thuani_com
# if domain is thuani.com.au make database name thuani_com_au
# then follow below steps
nano /etc/odoo.conf
# find dbilfter, and put ^%h$ in it.
dbfilter = ^%h$
# restart your odoo. eg sudo service odoo-server restart
https://docs.bitnami.com/1and1/apps/odoo/
#!/bin/bash
# This script is to setup 2 domains on same server with 1 odoo install
# It will have lets encrypt ssl, www to non www redirect, odoo port 8069 to port 80
# Make sure both domains point to your server ip
# go to your odoo database domain1.com:8069/web/database/selector
# create database domain1_com
# go to your domain2 and do the same eg domain2.com.au:8069/web/database/selector
# create another database domain2_com_au
# Make sure you make a STRONG PASSWORD for Master Password for your databases
# In below script, CHANGE to your domain name all lowercase eg DOMAIN1=YourDomainName.com and DOMAIN2
@inspiretk
inspiretk / List of software with links
Last active August 3, 2018 07:14
List of software with links
@inspiretk
inspiretk / git auto deploy from local machine to remote server
Last active August 4, 2023 22:29
git auto deploy from local machine to remote server
References: https://gist.github.com/noelboss/3fe13927025b89757f8fb12e9066f2fa
More info: https://www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks
https://www.youtube.com/watch?v=6mYtJu0E47U
[misc commands deluser newuser]
The following steps is for Developers to push their code from their local machine, to their server with git, and let git auto
pull the update to your remote folder. How it works:
- From your local machine, you do your normal coding. When done, you push your new code to git
- Git then updates your local machine, and push it to your server's git
- Git on your server gets the new update, and push it to your server's working folder