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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys,json,urllib | |
from pysrt import SubRipFile, SubRipItem | |
url_string = 'http://ajax.googleapis.com/ajax/services/language/' | |
def detect(text): | |
query = dict(v='1.0', q=text) |
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
import oerplib | |
# Prepare the connection to the server. | |
oerp = oerplib.OERP('localhost', protocol='xmlrpc', port=8069) | |
# Check available databases | |
print(oerp.db.list()) | |
# Login (the object returned is a browsable record) | |
user = oerp.login('user', 'passwd', 'db_name') |
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
2014-07-21 05:36:23,107 64273 ERROR account70 openerp.tools.yaml_import: The returning field 'account_analytic_id' from your on_change call 'product_id_change' does not exist either on the object 'account.invoice.line', either in the view 'account.invoice.line.form' used for the creation | |
Traceback (most recent call last): | |
File "/Users/nhomar/Trabajo/odoo-v7/openerp/tools/yaml_import.py", line 864, in process | |
self._process_node(node) | |
File "/Users/nhomar/Trabajo/odoo-v7/openerp/tools/yaml_import.py", line 875, in _process_node | |
self.process_record(node) | |
File "/Users/nhomar/Trabajo/odoo-v7/openerp/tools/yaml_import.py", line 325, in process_record | |
record_dict = self._create_record(model, fields, view_info, default=default) | |
File "/Users/nhomar/Trabajo/odoo-v7/openerp/tools/yaml_import.py", line 415, in _create_record | |
field_value = self._eval_field(model, field_name, fields[field_name], one2many_form_view or view_info, parent=record_dict, default=default) |
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
from github import Github | |
g = Github("user", "password") | |
repo = g.get_repo('organizacion/repo') | |
pulls = repo.get_pulls() | |
for p in pulls: | |
print p.merged | |
print p.base.sha | |
print p.id | |
print dir(p) |
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
# -*- coding: utf-8 -*- | |
{ | |
'name': "", | |
'author': "Vauxoo", | |
'summary': "", | |
'category': "", | |
'description': """ | |
""", | |
'version': "0.1", | |
'depends': [ |
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
<record id="{{ xml_id }}" model="ir.actions.act_window"> | |
<field name="name">{{ action_name }}</field> | |
<field name="res_model">{{ model_name }}</field> | |
<field name="view_type">{{ }}</field> | |
<field name="view_id" ref="{{ xml_id_view }}"/> | |
<field name="context">{}</field> | |
<field name="search_view_id" ref="{{ xml_id_search_view }}"/> | |
<field name="view_mode">tree,form</field> | |
<field name="domain">[]</field> | |
<field name="help" type="html"> |
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
# -*- coding: utf-8 -*- | |
############################################################################## | |
# | |
# OpenERP, Open Source Business Applications | |
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Affero General Public License as | |
# published by the Free Software Foundation, either version 3 of the | |
# License, or (at your option) any later version. |
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
import argparse | |
import hashlib | |
import hmac | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import json | |
import pprint | |
import os | |
import sys | |
# It's not recommended to store the key within the code. Following |
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
SELECT | |
l.account_id, | |
sum(l.debit-l.credit) | |
FROM account_move_line AS l | |
INNER JOIN account_account AS a ON a.id = l.account_id | |
WHERE l.debit-l.credit != 0 AND a.code ilike '1-1-08%' //<<ug l | |
GROUP BY account_id | |
/* | |
Tiempo de ejecución de la sentencia: 11.56 segundos | |
*/ |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
OlderNewer