Skip to content

Commit

Permalink
[FIX] l10n_uy_edi: Se borra funcionalidad
Browse files Browse the repository at this point in the history
Ticket: 31632
  • Loading branch information
mem-adhoc committed Oct 9, 2023
1 parent a5cd0fe commit ec6788c
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 45 deletions.
2 changes: 1 addition & 1 deletion l10n_uy_edi/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'author': 'ADHOC SA',
'category': 'Localization',
'license': 'LGPL-3',
'version': "16.0.1.6.0",
'version': "16.0.1.7.0",
'depends': [
'l10n_uy_account',
'account_debit_note',
Expand Down
2 changes: 1 addition & 1 deletion l10n_uy_edi/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -1142,4 +1142,4 @@ msgstr ""
#. module: l10n_uy_edi
#: model_terms:ir.ui.view,arch_db:l10n_uy_edi.res_config_settings_view_form
msgid "⇒ Test Connection"
msgstr "⇒ Probar Conección"
msgstr "⇒ Probar Conexión"
27 changes: 1 addition & 26 deletions l10n_uy_edi/models/l10n_uy_cfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,19 +1172,6 @@ def _l10n_uy_get_cfe_referencia(self):
})
return res

def _get_report_params(self):
# En caso de que el contenido de las adendas sea mayor a 799 caracteres, la adenda se imprimira en
# la segunda pagina de forma automatica, caso contrario, el cliente podra elegir el tipo de reporte que quiera
# Si no elige ningun tipo de reporte, se imprimira el default de uruware
adenda = self._l10n_uy_get_cfe_adenda().get('Adenda')
if adenda and len(adenda) > 799:
report_params = [['adenda'],['true']]
else:
#En caso de que el cliente eliga el reporte que quiere imprimir
report_params = safe_eval.safe_eval(self.company_id.l10n_uy_report_params or '[]')

return report_params

def action_l10n_uy_get_pdf(self):
""" Call query webservice to print pdf format of the CFE
7.1.9 Representación impresa estándar de un CFE emitido en formato PDF
Expand Down Expand Up @@ -1218,20 +1205,8 @@ def action_l10n_uy_get_pdf(self):
'serieCfe': document_number[0],
'numeroCfe': document_number[1],
}
report_params = self._get_report_params()

if report_params:
nombreParametros = report_params[0]
valoresParametros = report_params[1]
versionPdf = 'ObtenerPdfConParametros'
req_data.update({
'nombreParametros': nombreParametros,
'valoresParametros': valoresParametros,
})
else:
versionPdf = 'ObtenerPdf'

response = self.company_id._l10n_uy_ucfe_query(versionPdf, req_data)
response = self.company_id._l10n_uy_ucfe_query('ObtenerPdf', req_data)
self.l10n_uy_cfe_pdf = self.env['ir.attachment'].create({
'name': (self.name or prefix.get(self._name, 'OBJ')).replace('/', '_') + '.pdf',
'res_model': self._name, 'res_id': self.id,
Expand Down
1 change: 0 additions & 1 deletion l10n_uy_edi/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class ResCompany(models.Model):
l10n_uy_ucfe_prod_env = fields.Text('Uruware Production Data', groups="base.group_system", default="{}")
l10n_uy_ucfe_test_env = fields.Text('Uruware Testing Data', groups="base.group_system", default="{}")

l10n_uy_report_params = fields.Char()
# DGI
l10n_uy_dgi_house_code = fields.Integer(
"Código Casa Principal/Sucursal", default=1, help="Este valor es parte del XML cuando se envia el CFE."
Expand Down
4 changes: 1 addition & 3 deletions l10n_uy_edi/models/res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ class ResConfigSettings(models.TransientModel):
l10n_uy_dgi_crt = fields.Binary(related='company_id.l10n_uy_dgi_crt', readonly=False)
l10n_uy_dgi_crt_fname = fields.Char(related='company_id.l10n_uy_dgi_crt_fname')
l10n_uy_dgi_house_code = fields.Integer(related='company_id.l10n_uy_dgi_house_code', readonly=False)
l10n_uy_report_params = fields.Char(
related='company_id.l10n_uy_report_params', readonly=False
)

def l10n_uy_connection_test(self):
""" Make a ECO test to UCFE """
self.ensure_one()
Expand Down
13 changes: 0 additions & 13 deletions l10n_uy_edi/views/res_config_settings_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,6 @@
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<span class="o_form_label">Formato de reporte</span>
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
<div class="content-group">
<div class="row">
<label for="l10n_uy_report_params" string="Parametros de reporte" class="col-lg-3 o_light_label"/>
<field name="l10n_uy_report_params"/>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
Expand Down

0 comments on commit ec6788c

Please sign in to comment.