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
class UUID(Field): | |
""" Encapsulates an :class:`UUID`. """ | |
type = 'uuid.UUID' | |
column_type = ('uuid', 'uuid') | |
def convert_to_column(self, value, record, values=None, validate=True): | |
return str(value) | |
def convert_to_cache(self, value, record, validate=True): | |
return str(value) |
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
version: '2' | |
services: | |
web: | |
image: odoo:12.0 | |
depends_on: | |
- db | |
ports: | |
- "8069:8069" | |
volumes: | |
- odoo-web-data:/var/lib/odoo |
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
# Part of OBA40. See LICENSE file for full copyright and licensing details. | |
import signal | |
import sys | |
import odoo | |
from odoo.tools import config | |
from . import Command | |
_logger = logging.getLogger(__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
class OdooFatturaElettronica(models.Model): | |
_inherit = 'account.invoice' | |
state = fields.Selection(selection_add=[ | |
('waiting', 'Waiting'), | |
('send_sdi', 'Send SDI'), | |
]) | |
electronic_invoice_state = fields.Selection([ |
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
def notify(func): | |
""" Decorator that enables methods of a model to publish messages through NATS.""" | |
def wrapper(*args): | |
db_name = args[0].env.cr.dbname | |
table_name = args[0]._table | |
# TODO: For the moment we are using a testing subject | |
subject = 'account.journal' | |
print("wrapper_notify") |
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
apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
python3-pip \ | |
python3-setuptools \ | |
python3-renderpm \ | |
python3-babel \ | |
python3-dateutil \ | |
python3-decorator \ | |
python3-docutils \ | |
python3-feedparser \ |
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 -*- | |
# Part of Teuron Odoo Addons. See LICENSE file for full copyright and licensing details. | |
import base64 | |
import io | |
import zipfile | |
import datetime | |
from odoo import api, fields, models, tools, _ |
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 -*- | |
############################################################################## | |
# | |
# Copyright (C) 2015 KTec S.r.l. | |
# (<http://www.ktec.it>). | |
# | |
# 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. |