Skip to content

Commit 7bbe918

Browse files
committed
Cherry pick of da5e436 failed
stdout: CONFLICT (modify/delete): l10n_uy_edi_stock/models/stock_picking.py deleted in a41874504b712b54cbbf3422ffb31926ac6fba3f and modified in da5e436. Version da5e436 of l10n_uy_edi_stock/models/stock_picking.py left in tree. Auto-merging l10n_uy_ux/models/l10n_uy_edi_document.py stderr: closes ingadhoc#413 Signed-off-by: Katherine Zaoral - kz (#l10n) <kz@adhoc.com.ar> Signed-off-by: Julia Elizondo - jue (#l10n) <jue@adhoc.com.ar>
1 parent 4c70aa7 commit 7bbe918

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

l10n_uy_ux/models/l10n_uy_edi_document.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import odoo.tools as tools
12
from odoo import api, fields, models
23
from odoo.exceptions import UserError
34
from odoo.tools import safe_eval
@@ -158,6 +159,17 @@ def unlink(self):
158159

159160
return True
160161

162+
def cron_l10n_uy_edi_get_vendor_bills(self, batch_size=10):
163+
"""Agregamos chequeo para evitar que el cron se corra en runbot, lo cual genera errores al no tener datos de producción
164+
165+
También prevenimos la ejecución si alguna compañía UY tiene configuración incompleta para evitar warnings innecesarios"""
166+
if not tools.config.get("test_enable") and not self.env["ir.config_parameter"].sudo().get_param(
167+
"saas_client.database_uuid", False
168+
):
169+
return
170+
171+
return super().cron_l10n_uy_edi_get_vendor_bills(batch_size=batch_size)
172+
161173
# Metodos nuevos
162174

163175
def ux_uy_get_last_invoice_number(self, document_type):

0 commit comments

Comments
 (0)