Migrate to python3
This commit is contained in:
parent
8aa7ed364d
commit
bb2a835565
2
aeat.py
2
aeat.py
|
@ -229,7 +229,7 @@ def remove_accents(unicode_string):
|
|||
unicode_string_nfd = ''.join(
|
||||
(c for c in unicodedata.normalize('NFD', unicode_string)
|
||||
if (unicodedata.category(c) != 'Mn'
|
||||
or c in ('\u0327', '\u0303')) # ç or ñ
|
||||
or c in ('\\u0327', '\\u0303')) # ç or ñ
|
||||
))
|
||||
# It converts nfd to nfc to allow unicode.decode()
|
||||
return unicodedata.normalize('NFC', unicode_string_nfd)
|
||||
|
|
|
@ -58,7 +58,7 @@ class BaseTrytonInvoiceMapper(Model):
|
|||
for tax in taxes:
|
||||
base = tax.company_base
|
||||
parent = tax.tax.parent if tax.tax.parent else tax.tax
|
||||
if parent.id in taxes_used.keys() and base == taxes_used[parent.id]:
|
||||
if parent.id in list(taxes_used.keys()) and base == taxes_used[parent.id]:
|
||||
continue
|
||||
total += (base + tax.company_amount)
|
||||
taxes_used[parent.id] = base
|
||||
|
|
6
setup.py
6
setup.py
|
@ -95,10 +95,10 @@ setup(name='%s_%s' % (PREFIX, MODULE),
|
|||
'Natural Language :: Russian',
|
||||
'Natural Language :: Spanish',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Programming Language :: Python :: Implementation :: PyPy',
|
||||
'Topic :: Office/Business',
|
||||
|
@ -114,8 +114,4 @@ setup(name='%s_%s' % (PREFIX, MODULE),
|
|||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
tests_require=tests_require,
|
||||
use_2to3=True,
|
||||
convert_2to3_doctests=[
|
||||
'tests/scenario_aeat_sii.rst',
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue