← Back to team overview

openerp-l10n-ar-localization team mailing list archive

[Bug 1253440] [NEW] error en parseo reporte de factura del módulo l10n_ar_invoice

 

Public bug reported:

Ejecutando el .rml de la factura que está en el módulo l10n_ar_invoice,
me da el siguiente error:

 Cannot eval "is_class(o, 'A')"

Traceback (most recent call last):
  File "/opt/openerp/server/openerp/tools/safe_eval.py", line 241, in safe_eval
    return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
NameError: name 'is_class' is not defined


Esa función is_class pertenece a la clase "class ar_account_invoice(report_sxw.rml_parse)", dentro del archivo invoice.py, de dicho módulo.

Es decir, no toma el parser.

Tampoco encuentro el llamado a:

def publish_account_invoice():
    del openerp.report.interface.report_int['report.account.invoice']

    report_sxw.report_sxw(
        'report.account.invoice',
        'account.invoice',
        'addons/l10n_ar_wsafip/report/invoice.rml',
        parser=ar_account_invoice,
        header=False
    )

que reemplazaría el parser.

La solución la encontré por este lado: http://anybox.fr/blog/openerp-
how-to-use-a-custom-rml-report-parser-class

Sds.

** Affects: openerp-l10n-ar-localization
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP -
Team de Localización Argentina, which is subscribed to openerp-l10n-ar-
localization.
https://bugs.launchpad.net/bugs/1253440

Title:
  error en parseo reporte de factura del módulo l10n_ar_invoice

Status in OpenERP - Localización Argentina:
  New

Bug description:
  Ejecutando el .rml de la factura que está en el módulo
  l10n_ar_invoice, me da el siguiente error:

   Cannot eval "is_class(o, 'A')"

  Traceback (most recent call last):
    File "/opt/openerp/server/openerp/tools/safe_eval.py", line 241, in safe_eval
      return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
    File "", line 1, in <module>
  NameError: name 'is_class' is not defined

  
  Esa función is_class pertenece a la clase "class ar_account_invoice(report_sxw.rml_parse)", dentro del archivo invoice.py, de dicho módulo.

  Es decir, no toma el parser.

  Tampoco encuentro el llamado a:

  def publish_account_invoice():
      del openerp.report.interface.report_int['report.account.invoice']

      report_sxw.report_sxw(
          'report.account.invoice',
          'account.invoice',
          'addons/l10n_ar_wsafip/report/invoice.rml',
          parser=ar_account_invoice,
          header=False
      )

  que reemplazaría el parser.

  La solución la encontré por este lado: http://anybox.fr/blog/openerp-
  how-to-use-a-custom-rml-report-parser-class

  Sds.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openerp-l10n-ar-localization/+bug/1253440/+subscriptions


Follow ups

References