This file contains hidden or 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
SUBMODULOS GIT (comandos básicos) | |
$ git submodule add [email protected]:djperalta/cook_list.git aaa/bbb/ccc | |
$ git status | |
$ cat .gitmodules | |
$ git submodule init (inicializa submodulo) |
This file contains hidden or 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/python | |
from suds.client import Client | |
from suds.wsse import * | |
import requests | |
import base64 | |
import logging | |
logging.basicConfig(level=logging.INFO) | |
logging.getLogger('suds.client').setLevel(logging.DEBUG) | |
#logging.getLogger('suds.wsdl').setLevel(logging.DEBUG) |
This file contains hidden or 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
# su - postgres | |
$ psql | |
postgres=# \password user_to_change_password | |
Enter new password: | |
Enter it again: |
This file contains hidden or 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/sh | |
# replace odoo8 per odoo version | |
# Start/stop odoo8 | |
PIDFILE=/var/run/odoo8.pid | |
. /lib/lsb/init-functions | |
NAME=odoo8 | |
# id user odoo8git |
This file contains hidden or 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 | |
# run this as the odoo* user! | |
# create dir logs | |
WDIR=/opt/odoo/log | |
# path virtualenv | |
VIRTUALENV_DIR=/opt/odoo/odoo_git | |
source $VIRTUALENV_DIR/bin/activate |
This file contains hidden or 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
[options] | |
addons_path = / | |
admin_passwd = False | |
csv_internal_sep = , | |
data_dir = /opt/odoo9/.local/share/Odoo | |
db_host = False | |
db_maxconn = 64 | |
db_name = False | |
db_password = False | |
db_port = False |
This file contains hidden or 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 base64 | |
read_file = open('/tmp/newgalax.png', 'rb') | |
data = read_file.read() | |
b64 = base64.b64encode(data) | |
print (b64) |
This file contains hidden or 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 -*- | |
# Variable: var_name | |
# Describe variable. | |
var_name = True | |
# Class: MyClass | |
# Describe the class here. | |
# |
This file contains hidden or 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
class PurchaseOrderLine(models.Model): | |
_inherit = 'purchase.order.line' | |
@api.one | |
def _get_verify_user_group(self): | |
self.verify_user_group = False | |
if self.env['res.users'].has_group('purchase.group_purchase_manager'): | |
self.verify_user_group = True | |
def _default_user_group(self): |
This file contains hidden or 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
# Class: MsAdjudicacionPlaza | |
# Registro de la adjudicación de las plazas. | |
class MsAdjudicacionPlaza(models.Model): | |
name = 'ms.adjudicacion.plaza' | |
_inherit = ['mail.thread', 'ir.needaction_mixin'] | |
_description = u"Adjudicación plaza" | |
# ... | |
# Envia una notificación y correo al usuario | |
def enviar_invitacion(self): | |
post_kwargs = { |