http://iffm.me/clientes-soap-en-python.html https://gitter.im/msolorzano/sunat2015/archives/2015/10/31 https://stackoverflow.com/questions/28239100/suds-error-trying-to-load-wsdl https://pythonexample.com/code/python%20sunat%20suds%20example/ https://medium.com/@djperalta/python-suds-sunat-example-afc6c37ad426 http://www.codegist.net/code/python%20sunat%20suds%20example/
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
"""The idea bihind this gist is to measure the amount of time it takes in 3 different packages the creation of a pdf417 barcode.""" | |
import sys | |
from timeit import default_timer as timer | |
from elaphe import barcode | |
from pdf417gen import encode, render_image | |
import treepoem | |
def elaphe_image(name, text): | |
return barcode('pdf417', text, options=dict(eclevel=2, compact=True, columns=13), scale=5) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<ext:UBLExtensions> | |
<ext:UBLExtension> | |
<ext:ExtensionContent> | |
</ext:ExtensionContent> | |
</ext:UBLExtension> | |
</ext:UBLExtensions> | |
<cbc:UBLVersionID>2.1</cbc:UBLVersionID> | |
<cbc:CustomizationID>2.0</cbc:CustomizationID> |
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
"""We want to remove //content item, this is one way to do it.""" | |
from lxml.etree import tostring | |
from lxml.objectify import fromstring | |
xml = ' | |
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> | |
<S:Body> | |
<ns2:getStatusCdrResponse xmlns:ns2="http://service.sunat.gob.pe"> | |
<statusCdr> |
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
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
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
"""If installed it will return 0""" | |
os.system('which your app') |
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 sys | |
from suds import client | |
from suds.wsse import Security, UsernameToken | |
from suds.sax.text import Raw | |
from suds.sudsobject import asdict | |
from suds import WebFault | |
''' | |
Given a Workday Employee_ID, returns the last name of that employee. |
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
right_journal = env.ref('absa.account_journal_B2353') | |
bad_account = env.ref('absa.account_account_102_01_016') | |
for rec in records: | |
move_id = rec.mapped('move_id') | |
move_id.button_cancel() | |
for line in move_id.line_ids: | |
if line.journal_id == right_journal and line.account_id == bad_account: | |
line.write({'account_id': | |
right_journal.default_debit_account_id.id}) | |
move_id.action_post() |
OlderNewer