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
/*************************************************************/ | |
// NumeroALetras | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2015 Luis Alfredo Chee | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
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
odoo.define('minsa_serums.HiddenImport', function (require) { | |
"use strict"; | |
var core = require('web.core'); | |
var Model = require('web.Model'); | |
var Menu = require('web.Menu'); | |
// Ocultar menu Registrar reinscripción para los postulantes | |
Menu.include({ | |
bind_menu: function () { | |
this._super.apply(this, arguments); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<odoo> | |
<template id="assets_backend" name="minsa_serums" inherit_id="web.assets_backend"> | |
<xpath expr="." position="inside"> | |
<script type="text/javascript" src="/minsa_serums/static/src/js/serums.js"/> | |
</xpath> | |
</template> | |
</odoo> |
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 GrupoSanguineo(models.Model): | |
_name = 'grupo.sanguineo' | |
name = fields.Char(string='Nombre') | |
class RegistroUnidadAlmacenada(models.Model): | |
_name = 'registro.unidad.almacenada' | |
unidad_almacenada_id = fields.Many2one( | |
'unidad.almacenada', string='Establecimiento de salud') |
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 = { |
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
# -*- 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
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
[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
#!/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 |
NewerOlder