
from odoo.addons.component.core import Component


class EdiOutputL10nEsFacturae(Component):
    _name = "edi.output.generate.l10n_es_facturae"
    _inherit = "edi.component.output.mixin"
    _usage = "edi.output.generate.l10n_es_facturae"

    def generate(self):
        return self.exchange_record.record.get_facturae(True)[0]


from odoo.addons.component.core import Component


class EdiOutputL10nEsFacturae(Component):
    _name = "edi.output.generate.l10n_es_facturae"
    _inherit = "edi.component.output.mixin"
    _usage = "output.generate"
    _backend_type = "l10n_es_facturae"

    def generate(self):
        return self.exchange_record.record.get_facturae(True)[0]

Fix components names using the new logic
[FIX] l10n_es_facturae: Fix components names using the new logic

  
  from odoo.addons.component.core import Component
  
  
  class EdiOutputL10nEsFacturae(Component):
      _name = "edi.output.generate.l10n_es_facturae"
      _inherit = "edi.component.output.mixin"
-     _usage = "edi.output.generate.l10n_es_facturae"
+     _usage = "output.generate"
+     _backend_type = "l10n_es_facturae"
  
      def generate(self):
          return self.exchange_record.record.get_facturae(True)[0]
  
Fix components names using the new logic
## Code Before:

from odoo.addons.component.core import Component


class EdiOutputL10nEsFacturae(Component):
    _name = "edi.output.generate.l10n_es_facturae"
    _inherit = "edi.component.output.mixin"
    _usage = "edi.output.generate.l10n_es_facturae"

    def generate(self):
        return self.exchange_record.record.get_facturae(True)[0]

## Instruction:
Fix components names using the new logic
## Code After:

from odoo.addons.component.core import Component


class EdiOutputL10nEsFacturae(Component):
    _name = "edi.output.generate.l10n_es_facturae"
    _inherit = "edi.component.output.mixin"
    _usage = "output.generate"
    _backend_type = "l10n_es_facturae"

    def generate(self):
        return self.exchange_record.record.get_facturae(True)[0]
