Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 357e83a

Browse files
committedOct 15, 2024
[REM] l10n_uy_ux: everything is not used
1 parent eccf5d0 commit 357e83a

9 files changed

+5
-225
lines changed
 

‎l10n_uy_ux/__manifest__.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"name": "Uruguay UX",
77
"author": "ADHOC SA",
88
"category": "Localization",
9+
"countries": ["uy"],
910
"license": "LGPL-3",
1011
"version": "17.0.1.0.0",
1112
"depends": [

‎l10n_uy_ux/models/account_move.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
import base64
21
import logging
3-
import re
4-
import xml.etree.ElementTree as ET
5-
from datetime import datetime
62

73
from odoo import api, models, fields, _
84

95
from odoo.exceptions import UserError, ValidationError
10-
from odoo.tools import float_compare, safe_eval
11-
from odoo.tools.misc import formatLang
6+
from odoo.tools import safe_eval
127

138

149
_logger = logging.getLogger(__name__)
@@ -26,7 +21,7 @@ class AccountMove(models.Model):
2621

2722
def _l10n_uy_edi_get_addenda(self):
2823
# EXTEND l10n_uy_edi
29-
""" Agrega el campo referencia compo parte de la adenda """
24+
""" Agrega el campo referencia como parte de la adenda """
3025
self.ensure_one()
3126
res = super()._l10n_uy_edi_get_addenda()
3227
if self.ref:

‎l10n_uy_ux/models/l10n_uy_addenda.py

-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@ class L10nUyAddenda(models.Model):
1111
apply_on = fields.Selection([
1212
("all", "All CFE"),
1313
("account.move", "Invoices and Tickets"),
14-
# No implementado aun
15-
("account.move.line", "Resguardos"),
1614
], required=True, default="account.move",
1715
)

‎l10n_uy_ux/models/l10n_uy_edi_document.py

+2-37
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
import re
22

3-
from odoo import _, api, fields, models
3+
from odoo import _, api, models
44

55
from odoo.exceptions import UserError
66
from odoo.tools import safe_eval
7-
from odoo.addons.l10n_uy_edi.models import l10n_uy_edi_document
8-
9-
10-
# TODO KZ revisar que esto funcione bien
11-
l10n_uy_edi_document.RESPONSE_CODE_TO_STATE.update({
12-
"25": "rejected", # Rechazado por DGI (Facturas de Proveedor)
13-
})
147

158

169
class L10nUyEdiDocument(models.Model):
17-
_inherit = "l10n_uy_edi.document"
1810

19-
# TODO KZ solo temporal mientras hago las pruebas
20-
state = fields.Selection(readonly=False)
11+
_inherit = "l10n_uy_edi.document"
2112

2213
# Methods extend for l10n_uy_edi
2314

@@ -109,13 +100,6 @@ def _get_report_params(self):
109100

110101
return versionPdf, extra_params
111102

112-
def _get_cfe_tag(self):
113-
""" Agregamos el tag eResg. aun no lo usamos pero lo dejaamos disponible """
114-
self.ensure_one()
115-
if self._is_uy_resguardo():
116-
return "eResg"
117-
return super()._get_cfe_tag()
118-
119103
# def _l10n_uy_edi_check_invoices(self):
120104
# We check that there is one and only one vat tax per line
121105
# TODO KZ this could change soon, waiting functional confirmation
@@ -153,22 +137,3 @@ def _get_dgi_last_invoice_number(self, document_type):
153137
document=document_type.display_name))
154138
res = int(next_number)
155139
return res
156-
157-
# Metodos genericos que aun no se estarian usando mucho
158-
159-
def _is_uy_resguardo(self):
160-
return self.l10n_latam_document_type_id.code in ["182", "282"]
161-
162-
def _l10n_uy_get_cfe_serie(self):
163-
""" Return dictionary with Serie CFE number.
164-
Si soy ticket de contingencia usar los valores que estan definidos en el Odoo
165-
166-
NOTE: In future need to be adapted for contigency records """
167-
res = {}
168-
cfe_code = int(self.l10n_latam_document_type_id.code)
169-
if cfe_code > 200:
170-
res.update({
171-
"Serie": self.journal_id.code,
172-
"NumeroCfe": self.journal_id.sequence_number_next,
173-
})
174-
return res
-5.07 KB
Binary file not shown.

‎l10n_uy_ux/static/ssl/uy.crt

-75
This file was deleted.

‎l10n_uy_ux/tests/cfe_example_1.xml

-43
This file was deleted.

‎l10n_uy_ux/tests/cfe_example_2.xml

-53
This file was deleted.

‎l10n_uy_ux/views/account_move_views.xml

-8
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
<button name="uy_ux_action_uy_get_pdf" type="object" string="(UY) Print Legal PDF" class="oe_inline oe_link" invisible="l10n_uy_edi_cfe_state not in ['received']" icon="fa-print" groups="base.group_no_one"/>
4242

4343
</div>
44-
<field name="l10n_uy_idreq" invisible="invoice_filter_type_domain != 'purchase'"/>
4544
</field>
4645

4746
<notebook position="inside">
@@ -62,13 +61,6 @@
6261
<group string="CFE">
6362
<button name="l10n_uy_edi_action_download_preview_xml" type="object" string="Preview" class="oe_inline oe_link" invisible="state != 'draft'"/>
6463
<button name="uy_ux_action_validate_cfe" type="object" string="Validate" class="oe_inline oe_link" invisible="state != 'draft'"/>
65-
<button name="action_l10n_uy_update_fields" type="object" string="Update Fields"
66-
class="oe_inline oe_link" invisible="state != 'draft'"
67-
help="Read the XML and fill the fields of the invoice/bill with the xml values"
68-
confirm="Are you sure? this action will update the invoice information."/>
69-
70-
<field name="l10n_uy_cfe_xml" nolabel="1" widget="ace"/>
71-
7264
</group>
7365

7466
</page>

0 commit comments

Comments
 (0)
Please sign in to comment.