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
@nhomar
nhomar / test-log.py
Created March 9, 2016 18:48
test-log
import sys
import time
from pygtail import Pygtail
import socket
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
s = socket.socket(
socket.AF_INET, socket.SOCK_STREAM)
s.connect(("runbot.vauxoo.com", 28777))
#!/usr/bin/env python
#-*- encoding: utf8 -*-
import os
import sys
import glob
import argparse
from textwrap import dedent
import traceback
@nhomar
nhomar / blacklight.sh
Created September 19, 2016 06:57
Devastator 2 keyboard.
#!/bin/bash
sleep 1
xset led 3
xmodmap -e 'add mod3 = Scroll_Lock'
@nhomar
nhomar / traceback
Created January 5, 2017 10:21
Tracebacl rendering
Traceback (most recent call last):
File "/home/nhomar/odoo/odoo/http.py", line 638, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/nhomar/odoo/odoo/http.py", line 675, in dispatch
result = self._call_function(**self.params)
File "/home/nhomar/odoo/odoo/http.py", line 331, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/nhomar/odoo/odoo/service/model.py", line 119, in wrapper
return f(dbname, *args, **kwargs)
File "/home/nhomar/odoo/odoo/http.py", line 324, in checked_call
@nhomar
nhomar / hr_timesheet.py
Created February 17, 2017 10:44
hr_timesheet_invoiceable
# coding: utf-8
from odoo import fields, models, api
class HrTimesheetInvoiceFactor(models.Model):
_name = "hr_timesheet_invoice.factor"
_description = "Invoice Rate"
_order = 'factor'
@nhomar
nhomar / instances.json
Last active June 17, 2017 17:43
Json endpoint instances
{
"partner_id": "Nombre del cliente",
"data": [
{
"instance_id": "fm100",
"deployments": [
.....
{
...
"name": "production",
image: vauxoo/odoo-80-image-shippable-auto
stages:
- test
- test_build
- build
- upload_image
variables:
PSQL_VERSION: "9.5"
VERSION: "saas-15"
from __future__ import print_function
def bad_case():
"""Closing over a loop variable."""
lst = []
dct = {}
for i in range(10):
meth = i
print([meth for meth in g_lst]) # good case if you use the meth and is not used anymore
2018-05-21 07:08:23,829 4897 WARNING apps openerp.models: employee.log.history.create() includes unknown fields: ahrims_sync_id, login, name, original_record_id
2018-05-21 07:08:23,835 4897 WARNING apps openerp.models: employee.log.history.create() includes unknown fields: ahrims_sync_id, login, name, original_record_id
2018-05-21 07:08:26,893 4888 WARNING apps openerp.models: employee.log.history.create() includes unknown fields: ahrims_sync_id, login, name, original_record_id
2018-05-21 07:08:26,900 4888 WARNING apps openerp.models: employee.log.history.create() includes unknown fields: ahrims_sync_id, login, name, original_record_id
2018-05-21 07:08:28,729 4889 WARNING apps openerp.models: employee.log.history.create() includes unknown fields: ahrims_sync_id, login, name, original_record_id
2018-05-21 07:08:28,735 4889 WARNING apps openerp.models: employee.log.history.create() includes unknown fields: ahrims_sync_id, login, name, original_record_id
2018-05-21 07:08:29,981 4893 WARNING apps openerp.models:
@nhomar
nhomar / error.py
Created June 4, 2018 22:38
Error instalando ecommerce
return checked_call(self.db, *args, **kwargs)
File "/home/nhomar/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/nhomar/odoo/odoo/http.py", line 338, in checked_call
result.flatten()
File "/home/nhomar/odoo/odoo/http.py", line 1267, in flatten
self.response.append(self.render())
File "/home/nhomar/odoo/odoo/http.py", line 1260, in render
return env["ir.ui.view"].render_template(self.template, self.qcontext)
File "/home/nhomar/odoo/odoo/addons/base/ir/ir_ui_view.py", line 1189, in render_template