Skip to content

Instantly share code, notes, and snippets.

View macagua's full-sized avatar
🏠
Working from home

Leonardo J. Caballero G. macagua

🏠
Working from home
View GitHub Profile
@sehrishnaz
sehrishnaz / odoo_web_controller.xml
Created November 19, 2020 08:19
Odoo Web Controller XML
<openerp>
<data>
<template id="graph_template">
<t t-call="website.layout">
<head>
<title>Graph Web Controller Example</title>
</head>
<body>
@fdns
fdns / version.py
Last active February 9, 2021 20:47
Version extraction for OpenedX
#!/usr/bin/env python3
# Run me with sudo ./version.py > result
import csv
import sys
import os
import re
class VersionAnalyzer:
def __init__(self):
self.out = csv.writer(sys.stdout)

Bundle para tests

    <template id="qunit_suite" inherit_id="web.qunit_suite">
        <xpath expr="//script[last()]" position="after">
            <script type="text/javascript" src="/academy/static/src/js/tools.js"></script>
            <script type="text/javascript" src="/academy/static/tests/academy_tests.js"></script>
            <script type="text/javascript" src="/academy/static/tests/academy_tests_field.js"></script>
        </xpath>
    </template>
@JVegaB
JVegaB / webinar2.md
Last active January 16, 2024 01:48

Pos order py

    @api.model
    def _order_fields(self, ui_order):
        res = super()._order_fields(ui_order)
        res['carrier_id'] = ui_order.get('carrier_id', False)
        return res

Models js

Field JS

odoo.define('academy.field', (require) => {

    const registry = require('web.field_registry');
    const Widget = require('web.AbstractField');
@seunggabi
seunggabi / semantic-branch-names.md
Last active July 8, 2026 06:49
Semantic Branch Names

Semantic Branch Names

See how a minor change to your branch name style can make you a better programmer.

Format: <type>/#<issueNumber>-<alias>

Example

@alivx
alivx / ansible.cfg
Created May 23, 2020 15:15
Default Ansible config file
# Example config file for ansible -- https://ansible.com/
# =======================================================
# Nearly all parameters can be overridden in ansible-playbook
# or with command line flags. Ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory, or /etc/ansible/ansible.cfg, whichever it
# finds first
# For a full list of available options, run ansible-config list or see the
@xiCO2k
xiCO2k / nginx-rtmp-stream-multi-debian-18.md
Last active October 21, 2025 04:48
RTMP Server to Stream to Facebook, Youtube, Instagram
apt install nginx
apt install libnginx-mod-rtmp
apt install ffmpeg
apt install stunnel4

vim /etc/nginx/nginx.conf

  • Remove http {} and mail {}
@hari4274
hari4274 / ir_http.py
Created November 24, 2019 18:32
To enable session_id in session/authenticate JSON-RPC call in odoo13 and above
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models
from odoo.http import request
class Http(models.AbstractModel):
_inherit = 'ir.http'
@holdenrehg
holdenrehg / docker-compose-with-hostnames.yml
Created June 18, 2019 15:54
docker-compose-with-hostnames
version: '3.3'
services:
app:
build:
context: .
dockerfile: services/app/Dockerfile
ports:
- 5000:5000
networks: