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
""" | |
Inspired by http://code.activestate.com/recipes/578253-an-entry-with-autocompletion-for-the-tkinter-gui/ | |
Changes: | |
- Fixed AttributeError: 'AutocompleteEntry' object has no attribute 'listbox' | |
- Fixed scrolling listbox | |
- Case-insensitive search | |
- Added focus to entry field | |
- Custom listbox length, listbox width matches entry field width | |
- Custom matches function | |
""" |
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
[ | |
(u'downloads.tryton.org', 1201), | |
(u'github.com', 811), | |
(u'bitbucket.org', 428), | |
(u'launchpad.net', 279), | |
(u'www.doughellmann.com', 255), | |
(u'walco.n--tree.net', 161), | |
(u'prdownloads.sourceforge.net', 156), | |
(u'infrae.com', 150), | |
(u'downloads.sourceforge.net', 139), |
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
{background-color: #465455} // barra superior | |
BUSCA | |
{background-color: #ECEDEF} // campo busca | |
{background-color: #5A6668} // botão busca | |
{background-color: #FFFFFF} // ícone busca | |
{background-color: #2D2D2D} // fundo | |
Description |
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 gera_boleto(): | |
import datetime | |
import pyboleto | |
from pyboleto.bank.caixa import BoletoCaixa | |
from pyboleto.pdf import BoletoPDF | |
import os | |
listaDadosCaixa = [] | |
for i in range(2): | |
d = BoletoCaixa() |
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
{%- macro add_header(page_num, max_pages, doc) -%} | |
{%- if doc.meta.is_submittable and doc.docstatus==2-%} | |
<div class="alert alert-danger text-center"> | |
<h4 style="margin: 0px;">{{ _("CANCELLED") }}</h4></div> | |
{%- endif -%} | |
{% if max_pages > 1 %} | |
<p class="text-right">{{ _("Page #{0} of {1}").format(page_num, max_pages) }}</p> | |
{% endif %} | |
{%- endmacro -%} |
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
<style> | |
table.black { | |
background-color: #000 !important; | |
height: 1px; | |
width: 100%; | |
} | |
table.black > tr > td { | |
color: white; |
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
''' expressionString = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 END IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 END ''' | |
def parse_expression(expressionString): | |
expressionStringArray = filter(None,expressionString.split("END")) | |
''' expressionStringArray[0] = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 | |
expressionStringArray[1] = IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 ''' | |
for expression in expressionStringArray: | |
expConditionResult = expression.strip().split("RETURN") |
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 suds.transport import Transport, Reply | |
from suds.client import Client | |
import requests | |
from StringIO import StringIO | |
class RequestsTransport(Transport): | |
def open(self, request): | |
""" suds assumes urllib2 which doesn't have keepalives so things can go royally wrong if it doesn't | |
read the entire request. Hence, read it all up and give a StringIO object instead. |
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 _get_flatten_wsdl(self, url): | |
""" | |
Выполняет загрузку wsdl-схемы и зависимых файлов и объединяет их | |
в единый файл. | |
Ускоряет загрузку wsdl-схемы для клиента. | |
TODO: реализовать. | |
:type url: unicode |
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
// add a trigger on field "custom_field1" | |
cur_frm.cscript.custom_field1 = function(doc, cdt, cdn) { | |
// update a new field "custom_field3" | |
doc.custom_field3 = flt(doc.custom_field1)*flt(doc.custom_field2)/1000; | |
// refresh in form | |
refresh_field('custom_field3'); | |
} |
OlderNewer