Skip to content

Commit 5027c49

Browse files
committed
[ADD] l10n_ar_edi_ux: Adapting the zeep library
closes #408 X-original-commit: 7c45f55 Signed-off-by: Katherine Zaoral <kz@adhoc.com.ar>
1 parent fcb8647 commit 5027c49

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

l10n_ar_edi_ux/__manifest__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
'l10n_ar_edi',
1313
'account_accountant',
1414
],
15-
'external_dependencies': {
16-
'python': ['zeep'],
17-
},
1815
'data': [
1916
'wizards/res_config_settings_view.xml',
2017
'wizards/res_partner_update_from_padron_wizard_view.xml',

l10n_ar_edi_ux/models/res_partner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from odoo import models, fields, _
22
from odoo.exceptions import UserError
3-
import zeep
3+
from odoo.tools.zeep.helpers import serialize_object
44
import logging
55
_logger = logging.getLogger(__name__)
66

@@ -68,7 +68,7 @@ def get_data_from_padron_afip(self):
6868
if errors:
6969
raise UserError(error_msg % (self.name, vat, errors))
7070

71-
data = zeep.helpers.serialize_object(res.datosGenerales, dict)
71+
data = serialize_object(res.datosGenerales, dict)
7272
if not data:
7373
raise UserError(error_msg % (self.name, vat, res))
7474

@@ -77,8 +77,8 @@ def get_data_from_padron_afip(self):
7777
raise UserError(error_msg % (self.name, vat, 'La afip no devolvió nombre'))
7878

7979
domicilio = data.get("domicilioFiscal", {})
80-
data_mt = zeep.helpers.serialize_object(res.datosMonotributo, dict) or {}
81-
data_rg = zeep.helpers.serialize_object(res.datosRegimenGeneral, dict) or {}
80+
data_mt = serialize_object(res.datosMonotributo, dict) or {}
81+
data_rg = serialize_object(res.datosRegimenGeneral, dict) or {}
8282
impuestos = [imp["idImpuesto"]
8383
for imp in data_mt.get("impuesto", []) + data_rg.get("impuesto", [])
8484
if data.get('estadoClave') == 'ACTIVO']

0 commit comments

Comments
 (0)