Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions l10n_uy_edi_stock/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,10 +730,7 @@ def uy_stock_action_get_uruware_cfe(self):

def _l10n_uy_edi_stock_cron_update_dgi_status(self, batch_size=10):
"""Cron to update the DGI status of the stock pickings"""
domain = [
("l10n_uy_is_cfe", "=", True),
("l10n_uy_edi_cfe_state", "=", "received"),
]
domain = [("l10n_uy_edi_cfe_state", "=", "received")]
pickings = self.env["stock.picking"].search(domain, limit=batch_size, order="id")
pickings.l10n_uy_edi_action_get_dgi_state()

Expand Down
12 changes: 12 additions & 0 deletions l10n_uy_ux/models/l10n_uy_edi_document.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import odoo.tools as tools
from odoo import api, fields, models
from odoo.exceptions import UserError
from odoo.tools import safe_eval
Expand Down Expand Up @@ -155,6 +156,17 @@ def unlink(self):

return True

def cron_l10n_uy_edi_get_vendor_bills(self, batch_size=10):
"""Agregamos chequeo para evitar que el cron se corra en runbot, lo cual genera errores al no tener datos de producción

También prevenimos la ejecución si alguna compañía UY tiene configuración incompleta para evitar warnings innecesarios"""
if not tools.config.get("test_enable") and not self.env["ir.config_parameter"].sudo().get_param(
"saas_client.database_uuid", False
):
return

return super().cron_l10n_uy_edi_get_vendor_bills(batch_size=batch_size)

# Metodos nuevos

def ux_uy_get_last_invoice_number(self, document_type):
Expand Down
Loading