Skip to content

Instantly share code, notes, and snippets.

Avatar

Bista Solutions Inc bistaray

View GitHub Profile
@bistaray
bistaray / KILL SESSIONS
Created Jan 25, 2017
Kill PostgreSQL sessions preventing a database from being dropped
View KILL SESSIONS
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'database_name';
@bistaray
bistaray / after_duplicate.sql
Created Dec 23, 2016
SQL to run after database duplication for testing:
View after_duplicate.sql
TURN OFF:
update ir_mail_server set active = 'f';
update fetchmail_server set active = 'f';
update ir_cron set active = 'f' where function = 'schedule_backup';
TURN ON:
update ir_mail_server set active = 't';
update fetchmail_server set active = 't';
update ir_cron set active = 't' where function = 'schedule_backup';
@bistaray
bistaray / odoo_install.sh
Last active Apr 24, 2020
Install Odoo v10 Enterprise (with Bista repositories)
View odoo_install.sh
#!/bin/bash
################################################################################
# Script for installing Odoo V10 on Ubuntu 16.04, 15.04, 14.04
# Author: Yenthe Van Ginneken
# Adjusted: Ray Carnes
# Assumes you already have an Ubuntu user called "odoo" with a home folder
#-------------------------------------------------------------------------------
# Make a new file:
# sudo nano odoo-install.sh
# Place this content in it and then make the file executable:
@bistaray
bistaray / common_expenses.txt
Created Oct 3, 2016
Common Employee Expense Categories
View common_expenses.txt
Phone
Hotel
Internet
Meals - Client
Meals - Employee
Shipping
Supplies
Travel Insurance
Airfare
Baggage
View Install Odoo v9 YENTHE
#!/bin/bash
################################################################################
# Script for installing Odoo V9 on Ubuntu 14.04 LTS (could be used for other version too)
# Author: Yenthe Van Ginneken
#-------------------------------------------------------------------------------
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances
# in one Ubuntu because of the different xmlrpc_ports
#-------------------------------------------------------------------------------
# Make a new file:
# sudo nano odoo-install.sh
View Invoices with non matching currency amounts
select number from account_invoice where move_id in (select move_id from account_move_line where amount_currency <> 0 and (amount_currency <> debit and amount_currency <> -credit));
@bistaray
bistaray / Install Odoo v9
Last active Feb 24, 2016
Ubuntu Scripts
View Install Odoo v9
# download the Ubuntu package lists from the repositories and update them to get information
# on the newest versions of packages and their dependencies
sudo apt-get update
# create odoo user and group
sudo adduser --system --home=/opt/odoo --group odoo --shell /bin/bash
# Install PostgreSQL 9.4
View Install Odoo v8
#!/bin/bash
################################################################################
# Script for Installation: ODOO Saas4/Trunk server on Ubuntu 14.04 LTS
# Author: Andre Schenkels, ICTSTUDIO 2014
# Modified: Ron McBean, Ursa Information Systems 2014
#——————————————————————————-
#
# This script will install ODOO Server on a clean Ubuntu 14.04 Server
#
#——————————————————————————-