Skip to content

Instantly share code, notes, and snippets.

View nhomar's full-sized avatar
🏠
Life is beautiful

Nhomar [Vauxoo] nhomar

🏠
Life is beautiful
View GitHub Profile
#!/bin/bash
# CONST 1GB
CONST_1GB="1024*1024*1024"
# VARIABLE WORKERS
CMD_W=0
{
"anytime" : [
"You know you can!",
"Dale hasta que sea asombroso"
],
"morning" : [
"Good morning, sunshine!",
"Who needs coffee when you have your smile?",
"Go get 'em, Tiger!"
],
2020-07-20 02:01:12,704 10573 WARNING absa120 odoo.modules.loading: Transient module states were reset
2020-07-20 02:01:12,707 10573 ERROR absa120 odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/home/keylor/absa/odoo/odoo/api.py", line 1049, in get
value = self._data[key][field][record._ids[0]]
KeyError: 308
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
<!-- <cac:AllowanceCharge t-if="line.discount">-->
<!-- <cbc:ChargeIndicator>false</cbc:ChargeIndicator>-->
<!-- <cbc:AllowanceChargeReasonCode><t t-esc="line.l10n_pe_edi_allowance_charge_reason_code"/></cbc:AllowanceChargeReasonCode>-->
<!-- <cbc:MultiplierFactorNumeric><t t-esc="line._l10n_pe_edi_multiplier_factor_numeric()"/></cbc:MultiplierFactorNumeric>-->
<!-- <cbc:Amount t-att-currencyID="line.currency_id.name if line.currency_id else line.company_currency_id.name"><t t-esc="line._l10n_pe_edi_discounted_amount()"/></cbc:Amount>-->
<!-- <cbc:BaseAmount t-att-currencyID="line.currency_id.name if line.currency_id else line.company_currency_id.name"><t t-esc="line._l10n_pe_edi_discounted_base_mount()"/></cbc:BaseAmount>-->
<!-- </cac:AllowanceCharge>-->
[report]
include =
*/commission_calculation/*
omit =
*/scenario/*
*/scenarios/*
*/test/*
*/tests/*
*__init__.py
@nhomar
nhomar / server_action_force_mail_server.py
Created June 8, 2020 16:04
Force an specific mail server
# Available variables:
# - env: Odoo Environment on which the action is triggered
# - model: Odoo Model of the record on which the action is triggered; is a void recordset
# - record: record on which the action is triggered; may be be void
# - records: recordset of all records on which the action is triggered in multi-mode; may be void
# - time, datetime, dateutil, timezone: useful Python libraries
# - log: log(message, level='info'): logging function to record debug information in ir.logging table
# - Warning: Warning Exception to use with raise
# To return an action, assign: action = {...}
if record.mailing_id:
@nhomar
nhomar / settings.xml
Created January 10, 2020 20:36
Autoconfigure odoo instance
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<!-- Install Spanish language (if not installed yet) -->
<record id="lang_settings_es_mx" model="base.language.install">
<field name="lang">es_MX</field>
<field name="website_ids" model="website"
eval="[(6, 0, obj().search([
('id', 'in', [ref('website.default_website')])]).ids)]"
[MASTER]
profile=no
ignore=CVS,.git,scenarios,.bzr
persistent=yes
cache-size=500
load-plugins=pylint.extensions.docstyle, pylint.extensions.mccabe
[ODOOLINT]
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=Vauxoo,
# Available variables:
# - env: Odoo Environment on which the action is triggered
# - model: Odoo Model of the record on which the action is triggered; is a void recordset
# - record: record on which the action is triggered; may be void
# - records: recordset of all records on which the action is triggered in multi-mode; may be void
# - time, datetime, dateutil, timezone: useful Python libraries
# - log: log(message, level='info'): logging function to record debug information in ir.logging table
# - Warning: Warning Exception to use with raise
# To return an action, assign: action = {...}
@nhomar
nhomar / magic_parser.py
Last active July 27, 2018 17:42
Zebra Trick
# -*- coding: utf-8 -*-
from openerp import api, models
class ReportZebraProduct(models.AbstractModel):
_name = 'report.typ_printing_report.product_label_zebra_view'
@api.model