Skip to content

Instantly share code, notes, and snippets.

View alcidesrivera's full-sized avatar

alcidesrivera

  • VIRTUALSAMI CIA. LTDA.
  • Ibarra
View GitHub Profile
2015-10-21 01:30:10,616 1179 INFO ? openerp.addons.hw_escpos.controllers.main: error : [Errno 32] Pipe error
2015-10-21 01:30:10,619 1179 ERROR ? openerp.addons.hw_escpos.controllers.main: ESC/POS Error: [Errno 32] Pipe error
2015-10-21 01:30:10,620 1179 ERROR ? openerp.addons.hw_escpos.controllers.main: [Errno 32] Pipe error
------------------------------------------------------------
Traceback (most recent call last):
File "/home/openerp/apps/odoo/addons/hw_escpos/controllers/main.py", line 148, in run
printer = self.get_escpos_printer()
File "/home/openerp/apps/odoo/addons/hw_escpos/controllers/main.py", line 105, in get_escpos_printer
printers = self.connected_usb_devices()
File "/home/openerp/apps/odoo/addons/hw_escpos/controllers/main.py", line 92, in connected_usb_devices
2015-10-13 22:15:04,932 29294 INFO ? openerp.addons.hw_escpos.controllers.main: connected : Connected to Љ Љ
2015-10-13 22:15:05,013 29294 INFO ? openerp.addons.hw_escpos.controllers.main: error : Invalid endpoint address 0x1
2015-10-13 22:15:05,019 29294 ERROR ? openerp.addons.hw_escpos.controllers.main: ESC/POS Error: Invalid endpoint address 0x1
2015-10-13 22:15:05,033 29294 ERROR ? openerp.addons.hw_escpos.controllers.main: Invalid endpoint address 0x1
------------------------------------------------------------
Traceback (most recent call last):
File "/home/openerp/apps/odoo/addons/hw_escpos/controllers/main.py", line 170, in run
self.print_status(printer)
File "/home/openerp/apps/odoo/addons/hw_escpos/controllers/main.py", line 201, in print_status
eprint.text('\n\n')
ERROR xxx openerp.sql_db: Programming error: can't adapt type 'account.account', in query INSERT INTO "account_invoice_line" ("id",$
ERROR xxx openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/home/openerp/apps/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/openerp/apps/odoo/openerp/http.py", line 574, in dispatch
result = self._call_function(**self.params)
File "/home/openerp/apps/odoo/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/openerp/apps/odoo/openerp/service/model.py", line 113, in wrapper
Imposible instalar el módulo "hw_escpos" porqué hay una dependencia externa no resuelta: No module named usb.core
Imposible instalar el módulo "hw_scanner" porqué hay una dependencia externa no resuelta: No module named evdev
function tg_pos_packs(instance, module){
String.prototype.setCharAt = function(index,chr) {
if(index > this.length-1) return str;
return this.substr(0,index) + chr + this.substr(index+1);
}
var PosModelSuper = module.PosModel
module.PosModel = module.PosModel.extend({
load_server_data: function(){
Traceback (most recent call last):
File "/home/openerp/apps/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/openerp/apps/odoo/openerp/http.py", line 574, in dispatch
result = self._call_function(**self.params)
File "/home/openerp/apps/odoo/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/openerp/apps/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/home/openerp/apps/odoo/openerp/http.py", line 307, in checked_call
@alcidesrivera
alcidesrivera / sri.py
Last active September 5, 2022 21:13
SRI
@classmethod
def send_receipt(self, xml):
buf = StringIO.StringIO()
buf.write(xml)
buffer_xml = base64.encodestring(buf.getvalue())
client = Client(self.__WS_TEST_RECEIV)
result = client.service.validarComprobante(buffer_xml)
mensaje_error = ""
if (result[0] == 'DEVUELTA'):
@alcidesrivera
alcidesrivera / Xades.py
Last active August 29, 2015 14:24
Xades
class Xades(object):
def apply_digital_signature(self, xml_document, file_pk12, password):
"""
Metodo que aplica la firma digital al XML
"""
JAR_PATH = 'firma/firmaXadesBes.jar'
JAVA_CMD = 'java'
ds_document = False
xml_str = etree.tostring(xml_document, encoding='utf8', method='xml')
factura = self._generate_xml_invoice(obj, access_key, emission_code)
xades = Xades()
file_pk12 = obj.company_id.electronic_signature
password = obj.company_id.password_electronic_signature
xmlstr = etree.tostring(factura, encoding='utf8', method='xml')
p = Popen([JAVA_CMD, '-jar', JAR_PATH, xmlstr, file_pk12, password], stdout=PIPE, stderr=STDOUT)
resultado = p.communicate()[0]
OpenERP Server Error
Client Traceback (most recent call last):
File "/home/openerp/apps/openerp-7.0/web/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params)
File "/home/openerp/apps/openerp-7.0/web/addons/web/controllers/main.py", line 1132, in call_button
action = self._call_kw(req, model, method, args, {})
File "/home/openerp/apps/openerp-7.0/web/addons/web/controllers/main.py", line 1120, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/home/openerp/apps/openerp-7.0/web/addons/web/session.py", line 42, in proxy