- Change
__openerp__.py
addon name field - Change
README.rst
file
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 | |
''' | |
Send an multipart email with HTML and plain text alternatives. The message | |
should be constructed as a plain-text file of the following format: | |
From: Your Name <your@email.com> | |
To: Recipient One <recipient@to.com> | |
Subject: Your subject line | |
--- |
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 -*- | |
from odoo import http | |
import aiohttp | |
import asyncio | |
import time | |
import json | |
async def get_json(client, url): |
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 odoo import api, fields, models | |
from odoo.tools import float_is_zero | |
from odoo.exceptions import UserError, ValidationError | |
import threading | |
import time | |
import logging | |
class StockMove(models.Model): | |
_inherit = 'stock.move' |
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 requests | |
import base64 | |
from tqdm import tqdm | |
master_json_url = 'https://109vod-adaptive.akamaized.net/exp=1662040711~acl=%2Fbc4b6790-2eb0-46e2-a2b4-6396b03d7ba4%2F%2A~hmac=b43d7d0ed71e01041955fb7559ec6230b4aaea55ef2b8a794f6abf4b1e319916/bc4b6790-2eb0-46e2-a2b4-6396b03d7ba4/sep/video/40079aa2,6e220c50,db93bcf5,7e658976,3f44d6fe/audio/9f9f9d50,ff94feee/master.json?query_string_ranges=1&base64_init=1' | |
base_url = master_json_url[:master_json_url.rfind('/video/') + 7] | |
resp = requests.get(master_json_url) | |
content = resp.json() |
Using multiple postgresql version with appropoiate psql and other pg tools version on mac with postgresapp
First make sure no postgres instance is configured to run on startup. And you get nothing when you run this command: which -a psql
This is to make sure you don't have anything related to postgres in your PATH, which can conflict.
If you do get some hits with above command, you have to manually either remove the installed versions of postgres or just fix PATH and remove ref to that path which has these binaries(psql, pg_dump etc)
For me, i was using brew installed postgres, i had to just comment out a PATH editing line which was inserted by brew in my .bash_profile
Ok, after this we are ready. Now things are simple:
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
// html | |
// <input type="file" onchange="imagesSelected" multiple accept=".gif,.jpg,.jpeg,.png" /> | |
async function imagesSelected(event) { | |
let files = [...event.target.files]; | |
let images = await Promise.all(files.map(f=>{return readAsDataURL(f)})); | |
//all images' base64encoded data will be available as array in images | |
} | |
function readAsDataURL(file) { |