Skip to content

Commit

Permalink
[ADD] l10n_uy_edi: se crea factura y cliente si corresponde
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohmontenegro committed Oct 6, 2023
1 parent 6ef1281 commit e87af12
Show file tree
Hide file tree
Showing 6 changed files with 324 additions and 141 deletions.
3 changes: 3 additions & 0 deletions l10n_uy_account/data/l10n_latam.document.type.csv
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ dc_nota_de_crédito_de_e_factura_venta_por_cuenta_ajena_contingencia,242,Nota de
dc_nota_de_débito_de_e_factura_venta_por_cuenta_ajena_contingencia,243,Nota de Débito de e-Factura Venta por Cuenta Ajena Contingencia,debit_note,ND e-Fac.Cta.Aj.Cotg,base.uy
dc_ e_remito_contingencia,281, e-Remito Contingencia,stock_picking,e-Rem.Cotg,base.uy
dc_ e_resguardo_contingencia,282, e-Resguardo Contingencia,,E-Resguardo.Cotg,base.uy
dc_e_boleta_de_entrada,151,e-Boleta de entrada,invoice,e-Boleta-entrada,base.uy
dc_cn_e_boleta_de_entrada,152,Nota de crédito de e-Boleta de entrada,credit_note,NC e-Boleta-entrada,base.uy
dc_dn_e_boleta_de_entrada,153,Nota de débito de e-Boleta de entrada,debit_note,ND e-Boleta-entrada,base.uy
10 changes: 10 additions & 0 deletions l10n_uy_edi/data/ir_cron.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
<field name="active" eval="True"/>
</record>

<record id="ir_cron_conciliar_comprobantes_recibidos" model="ir.cron">
<field name="name">Conciliar comprobantes recibidos</field>
<field name="interval_number">15</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="model_id" ref="model_account_move"/>
<field name="state">code</field>
<field name="code">model.action_conciliate_received_invoices()</field>
<field name="active" eval="True"/>
</record>
<!-- TODO KZ generar el reporte diario en odoo a partir del generado en ucfe
<field name="nextcall" eval="(DateTime.now().replace(hour=22, minute=0, second=0) + timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')"/> -->

Expand Down
2 changes: 2 additions & 0 deletions l10n_uy_edi/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class AccountMove(models.Model):
_inherit = ['account.move', 'l10n.uy.cfe']

l10n_uy_journal_type = fields.Selection(related='journal_id.l10n_uy_type')
l10n_uy_journal_use_documents = fields.Boolean('Journal use documents', related='journal_id.l10n_latam_use_documents')
l10n_uy_idReq = fields.Text('idReq', copy=False, readonly=True, groups="base.group_system", help="Este campo lo agregamos a los comprobantes de proveedor que se crean desde Uruware porque si necesitamos consultarlos nuevamente a través de consulta de notificaciones necesitamos pasar ese idReq a la consulta 600 para consultarlo nuevamente.")

# This is required to be able to save defaults taking into account the document type selected
l10n_latam_document_type_id = fields.Many2one(change_default=True)
Expand Down
Loading

0 comments on commit e87af12

Please sign in to comment.