The res.config.settings
model is transient and is not saved to the database. Any fields you define on this model must be saved to the database somewhere explicitly. There are a few options.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Ryan Cole | |
# Website: https://ryanc.me | |
# GitHub: https://github.com/MGinshe | |
# Usage: | |
# Place this file in /etc/nginx/sites-enabled/ | |
# Make sure you edit the DOMAIN_HERE and SSL_CERTIFICATE, and DB_FILTER sections | |
# | |
# Note: This config file is designed to be used with the Odoo dbfilter_from_header module | |
# https://apps.openerp.com/apps/modules/9.0/dbfilter_from_header/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findCssRule(selectorString) { | |
// helper function searches through the document stylesheets looking for @selectorString | |
// will also recurse through sub-rules (such as rules inside media queries) | |
function recurse(node, selectorString) { | |
if (node.cssRules) { | |
for (var i = 0; i < node.cssRules.length; i++) { | |
if (node.cssRules[i].selectorText == selectorString) { | |
return node.cssRules[i].style; | |
} | |
if (node.cssRules[i].cssRules) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
"It is not possible to unreserve more products of <product name> than you have in stock"
Sometimes, the reserved_quantity
on the stock.quant
record for a product becomes out-of-sync with the sum of the reserved quantity in stock.move.lines
for that product.
For example, consider:
- Product A (quant): on-hand = 50, reserved = 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this script fixes `parent_path` issues on the stock.location table | |
# the parent_path field should store a slash-delimited list of parent | |
# locations. | |
# | |
# e.g. if we have "Physical Locations (1) / WH (2) / Stock (3)", where | |
# (id), then the parent_path should be: | |
# - 1/2/3/ | |
# | |
# USAGE: | |
# run this script in an Odoo shell (normally /opt/odoo-scripts/odoo-shell.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run this in an Administrator PowerShell session | |
reg add HKLM\SYSTEM\CurrentControlSet\Services\hns\State /v EnableExcludedPortRange /d 0 /f | |
net stop hns | |
net start hns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# INSTRUCTIONS | |
# | |
# 1. Place this script at /etc/libvirt/hooks/qemu | |
# 2. Make it executable: $ sudo chmod +x /etc/libvirt/hooks/qemu | |
# 3. Add your forwarding rules at the bottom of this file | |
# 4. Restart the VM, or restart the libvirtd service | |
# | |
# Author: Ryan Cole |