Skip to content

Instantly share code, notes, and snippets.

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

Santos Junior Marte Marte SantosJMM

🏠
Working from home
View GitHub Profile
'''
Project: curinga
Time: 2020/03/07 01:37
'''
import win32api
import win32print
import traceback
from tkinter.filedialog import askopenfilename
from tkinter import *
print('hello')
@SantosJMM
SantosJMM / example_model.py
Created January 23, 2022 13:46 — forked from danmana/example_model.py
Add support for custom json fields in Odoo
from odoo import models, fields, api
from json_field import JsonField
class Person(models.Model):
_name = 'example.person'
_description = 'Person with json details'
details = JsonField() # a json object represented as dict / list / python primitives
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<!-- START MY -->
<xs:element name="div">
<xs:complexType>
<xs:sequence>
<xs:group ref="overload" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="field" />
<?xml encoding="UTF-8"?>
<!ELEMENT odoo (record*|menuitem*)>
<!ATTLIST odoo
xmlns CDATA #FIXED ''
noupdate CDATA #IMPLIED
>
<!ELEMENT record (field+)>
<!ATTLIST record
@SantosJMM
SantosJMM / README.md
Created March 22, 2021 01:19 — forked from collinxsmith1/README.md
Evaluation of PySide2 GUI Program code base
@SantosJMM
SantosJMM / template.go
Last active March 31, 2020 02:17
load parsed files into template go
package main
import (
"html/template"
"os"
"path/filepath"
)
// ParseTemplateDir parse dirs
// Example: var templates = template.Must(ParseTemplateDir("templates"))
# -- coding: utf-8 --
from odoo import models, api, fields, _
from odoo.exceptions import ValidationError
class StockMove(models.Model):
_inherit = 'stock.move'
def _update_qty_done(self, qty_done, product_id=None, move_line_ids=None, location_id=None, location_dest_id=None,
lot_id=None, package_id=None, owner_id=None, has_existence=True, done_move=False):
# -- coding: utf-8 --
from odoo import models, api
class StockMove(models.Model):
_inherit = 'stock.move'
def _update_qty_done(self, qty_done, product_id=None, move_line_ids=None, location_id=None, location_dest_id=None lot_id=None, package_id=None, owner_id=None, has_existence=True):
self.ensure_one()
@SantosJMM
SantosJMM / README.md
Created November 20, 2018 12:27 — forked from nitaku/README.md
Minimal JSON HTTP server in python

A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.

python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}