Skip to content

Instantly share code, notes, and snippets.

View cmorisse's full-sized avatar

cmorisse cmorisse

View GitHub Profile
@cmorisse
cmorisse / ir.actions.server.py
Created August 9, 2019 04:58 — forked from andrius-preimantas/ir.actions.server.py
Odoo server action to recompute stored fields
# Recompute amount_total for account.invoice
env.add_todo(model._fields['amount_total'], object)
model.recompute()
# where
# object - recordset of instances to recompute field for
# model - recordset instances model
@cmorisse
cmorisse / ufw.md
Last active October 31, 2016 09:19 — forked from kimus/ufw.md
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.