Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
l10n_mx
Facturacion
Commits
7aae75f2
Commit
7aae75f2
authored
5 years ago
by
agb80
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(pylint): corrige algunos de los errores reportados por pylint
parent
28cb9a66
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
22 deletions
+27
-22
l10n_mx_account_tax_category/views/account_tax_category.xml
l10n_mx_account_tax_category/views/account_tax_category.xml
+2
-2
l10n_mx_facturae_cer/views/res_company_facturae_certificate.xml
...x_facturae_cer/views/res_company_facturae_certificate.xml
+1
-1
l10n_mx_ir_attachment_facturae/models/ir_attachment_facturae.py
...x_ir_attachment_facturae/models/ir_attachment_facturae.py
+10
-6
l10n_mx_ir_attachment_facturae/views/ir_attachment_facturae.xml
...x_ir_attachment_facturae/views/ir_attachment_facturae.xml
+1
-1
l10n_mx_ir_attachment_facturae/views/ir_attachment_facturae_config.xml
...tachment_facturae/views/ir_attachment_facturae_config.xml
+1
-1
l10n_mx_params_pac/models/params_pac.py
l10n_mx_params_pac/models/params_pac.py
+2
-2
l10n_mx_params_pac/pacs/finfok.py
l10n_mx_params_pac/pacs/finfok.py
+1
-1
l10n_mx_params_pac/pacs/solucion_factible.py
l10n_mx_params_pac/pacs/solucion_factible.py
+8
-7
l10n_mx_params_pac/views/params_pac_view.xml
l10n_mx_params_pac/views/params_pac_view.xml
+1
-1
No files found.
l10n_mx_account_tax_category/views/account_tax_category.xml
View file @
7aae75f2
...
...
@@ -27,7 +27,7 @@
<field
name=
"name"
>
account.tax.group.view.tree
</field>
<field
name=
"model"
>
account.tax.group
</field>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"Groups"
>
<tree>
<field
name=
"name"
/>
<field
name=
"code"
/>
</tree>
...
...
@@ -38,7 +38,7 @@
<field
name=
"name"
>
account.tax.group.view.search
</field>
<field
name=
"model"
>
account.tax.group
</field>
<field
name=
"arch"
type=
"xml"
>
<search
string=
"Groups"
>
<search>
<field
name=
"name"
/>
<field
name=
"code"
/>
</search>
...
...
This diff is collapsed.
Click to expand it.
l10n_mx_facturae_cer/views/res_company_facturae_certificate.xml
View file @
7aae75f2
...
...
@@ -41,7 +41,7 @@
<field
name=
"name"
>
res.company.facturae.certificate.view.tree
</field>
<field
name=
"model"
>
res.company.facturae.certificate
</field>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"Certificates"
>
<tree>
<field
name=
"serial_number"
/>
<field
name=
"date_start"
/>
<field
name=
"date_end"
/>
...
...
This diff is collapsed.
Click to expand it.
l10n_mx_ir_attachment_facturae/models/ir_attachment_facturae.py
View file @
7aae75f2
...
...
@@ -255,7 +255,7 @@ class IrAttachmentFacturaeMx(models.Model):
domain
=
[(
"model"
,
"="
,
self
.
type_attachment
)]
config
=
ir_attachment_config_obj
.
search
(
domain
,
limit
=
1
)
if
self
.
cfdi_type
==
"incoming"
and
not
len
(
config
)
:
if
self
.
cfdi_type
==
"incoming"
and
not
config
:
raise
UserError
(
_
(
"You do not have any defined template "
"for {model} model"
).
format
(
model
=
self
.
type_attachment
...
...
@@ -387,18 +387,22 @@ class IrAttachmentFacturaeMx(models.Model):
:return fecha: datetime value of tag found
:rtype fecha: Datetime
"""
res
=
""
if
not
self
.
env
.
user
.
partner_id
.
tz
:
raise
UserError
(
_
(
"Set your time zone"
))
user_tz
=
timezone
(
self
.
env
.
user
.
partner_id
.
tz
)
try
:
fecha
=
parse
(
self
.
_parse_xml
(
tag
))
except
AttributeError
as
e
:
_logger
.
debug
(
e
)
fecha
=
None
if
fecha
:
user_tz
=
timezone
(
self
.
env
.
user
.
partner_id
.
tz
)
pass
else
:
fecha
=
user_tz
.
localize
(
fecha
)
fecha
=
fecha
.
astimezone
(
utc
)
return
fields
.
Datetime
.
to_string
(
fecha
)
res
=
fields
.
Datetime
.
to_string
(
fecha
)
return
res
@
property
def
hash_type
(
self
):
...
...
@@ -728,7 +732,7 @@ class IrAttachmentFacturaeMx(models.Model):
"""
namespaces
=
namespaces
or
NAMESPACES
if
not
data
:
return
return
""
root
=
parse_xml_string
(
data
)
complete_pattern
=
""
.
join
([
".//"
,
element
,
"[@"
,
attrib
,
"]"
])
result
=
root
.
find
(
complete_pattern
,
namespaces
=
namespaces
)
...
...
This diff is collapsed.
Click to expand it.
l10n_mx_ir_attachment_facturae/views/ir_attachment_facturae.xml
View file @
7aae75f2
...
...
@@ -50,7 +50,7 @@
<field
name=
"name"
>
ir.attachment.facturae.view.tree
</field>
<field
name=
"model"
>
ir.attachment.facturae.mx
</field>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"CFDI"
>
<tree>
<field
name=
"name"
/>
<field
name=
"cfdi_type"
/>
<field
name=
"state"
/>
...
...
This diff is collapsed.
Click to expand it.
l10n_mx_ir_attachment_facturae/views/ir_attachment_facturae_config.xml
View file @
7aae75f2
...
...
@@ -6,7 +6,7 @@
<field
name=
"name"
>
ir.attachment.facturae.config.view.tree
</field>
<field
name=
"model"
>
ir.attachment.facturae.mx.config
</field>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"CFDI Documments"
>
<tree>
<field
name=
"model"
/>
<field
name=
"version"
/>
<field
name=
"template_xml_sign"
/>
...
...
This diff is collapsed.
Click to expand it.
l10n_mx_params_pac/models/params_pac.py
View file @
7aae75f2
...
...
@@ -27,7 +27,7 @@ class ParamsPac(models.Model):
return
{}
@
classmethod
def
get_driver_fc_status
(
self
):
def
get_driver_fc_status
(
cls
):
"""function to inherit from custom PAC module"""
return
{}
...
...
@@ -189,7 +189,7 @@ class ParamsPac(models.Model):
:type uuid: string
"""
self
.
check_pacs
()
_logger
.
info
(
"Consulting status for uuid: %s"
%
uuid
)
_logger
.
info
(
"Consulting status for uuid: %s"
,
uuid
)
result
=
self
.
fire_connection
(
uuid
,
"get_driver_fc_status"
)
return
result
...
...
This diff is collapsed.
Click to expand it.
l10n_mx_params_pac/pacs/finfok.py
View file @
7aae75f2
...
...
@@ -221,7 +221,7 @@ class ParamsPac(models.Model):
res
=
client
.
service
.
get_sat_status
(
username
,
password
,
emisor
,
receptor
,
uuid
,
total
)
_logger
.
debug
(
"Finkok answer for cfdi status: %s"
%
res
)
_logger
.
debug
(
"Finkok answer for cfdi status: %s"
,
res
)
folio
=
res
.
sat
estatus_cancelacion
=
folio
[
"EstatusCancelacion"
]
or
""
estado_cfdi
=
folio
[
"Estado"
]
...
...
This diff is collapsed.
Click to expand it.
l10n_mx_params_pac/pacs/solucion_factible.py
View file @
7aae75f2
...
...
@@ -174,12 +174,14 @@ class ParamsPac(models.Model):
resultado
=
wsdl_client
.
timbrar
(
*
params
)
mensaje
=
_
(
tools
.
ustr
(
resultado
[
"mensaje"
]))
resultados_mensaje
=
(
resultado
[
"resultados"
]
and
resultado
[
"resultados"
][
"mensaje"
]
or
""
resultado
[
"resultados"
][
"mensaje"
]
if
resultado
[
"resultados"
]
else
""
)
folio_fiscal
=
(
resultado
[
"resultados"
][
"uuid"
]
if
resultado
[
"resultados"
]
else
""
)
folio_fiscal
=
resultado
[
"resultados"
]
and
resultado
[
"resultados"
][
"uuid"
]
or
""
codigo_timbrado
=
resultado
[
"status"
]
or
""
codigo_validacion
=
(
resultado
[
"resultados"
]
and
resultado
[
"resultados"
]
[
"status"
]
or
""
resultado
[
"resultados"
]
[
"status"
]
if
resultado
[
"resultados"
]
else
""
)
if
codigo_timbrado
in
[
"311"
,
"312"
]:
raise
pac_exceptions
.
PrimarySectorError
(
code
=
resultado
[
"codigo"
])
...
...
@@ -187,15 +189,14 @@ class ParamsPac(models.Model):
codigo_timbrado
==
"200"
and
codigo_validacion
==
"200"
or
codigo_validacion
==
"307"
):
# noqa
):
fecha_timbrado
=
resultado
[
"resultados"
][
"fechaTimbrado"
]
or
False
fecha_timbrado
=
(
fecha_timbrado
and
time
.
strftime
(
time
.
strftime
(
"%Y-%m-%d %H:%M:%S"
,
time
.
strptime
(
fecha_timbrado
[:
19
],
"%Y-%m-%dT%H:%M:%S"
),
)
or
False
if
fecha_timbrado
else
False
)
cfdi_data
=
{
"cfdi_xml"
:
base64
.
decodestring
(
...
...
This diff is collapsed.
Click to expand it.
l10n_mx_params_pac/views/params_pac_view.xml
View file @
7aae75f2
...
...
@@ -49,7 +49,7 @@
<field
name=
"name"
>
view.params.pac.tree
</field>
<field
name=
"model"
>
params.pac
</field>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"Parameters PAC"
>
<tree>
<field
name=
"sequence"
widget=
"handle"
/>
<field
name=
"pac_type"
/>
<field
name=
"user"
/>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment