Skip to content

Instantly share code, notes, and snippets.

View bistaray's full-sized avatar

Bista Solutions Inc bistaray

View GitHub Profile
@bistaray
bistaray / KILL SESSIONS
Created January 25, 2017 22:46
Kill PostgreSQL sessions preventing a database from being dropped
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'database_name';
@bistaray
bistaray / after_duplicate.sql
Created December 23, 2016 04:13
SQL to run after database duplication for testing:
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 April 15, 2022 02:51
Install Odoo v10 Enterprise (with Bista repositories)
#!/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 October 3, 2016 21:55
Common Employee Expense Categories
Phone
Hotel
Internet
Meals - Client
Meals - Employee
Shipping
Supplies
Travel Insurance
Airfare
Baggage
@bistaray
bistaray / Install Odoo v9 YENTHE
Last active February 24, 2020 18:12
Ubuntu Scripts
#!/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
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 February 24, 2016 23:23
Ubuntu Scripts
# 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
@bistaray
bistaray / Install Odoo v8
Created November 10, 2015 22:35
Ubuntu Scripts
#!/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
#
#——————————————————————————-