From 98166a41816b54aed2807f0bd2c224bf6f6f2703 Mon Sep 17 00:00:00 2001 From: "Ronald Portier (Therp BV)" Date: Mon, 1 May 2023 14:30:18 +0200 Subject: [PATCH] [FIX] Make sure pre-commit without errors --- l10n_nl_bank/__manifest__.py | 2 +- l10n_nl_country_states/__manifest__.py | 1 + .../examples/generate_postcode_regios.py | 35 ++++++++++--------- l10n_nl_partner_name/__manifest__.py | 1 + l10n_nl_partner_salutation/__manifest__.py | 2 +- l10n_nl_tax_invoice_basis/__manifest__.py | 2 +- l10n_nl_tax_statement/hooks.py | 29 ++++++++++----- l10n_nl_xaf_auditfile_export/__manifest__.py | 1 + requirements.txt | 4 +++ 9 files changed, 48 insertions(+), 29 deletions(-) create mode 100644 requirements.txt diff --git a/l10n_nl_bank/__manifest__.py b/l10n_nl_bank/__manifest__.py index 6d762dd16..c90b97376 100644 --- a/l10n_nl_bank/__manifest__.py +++ b/l10n_nl_bank/__manifest__.py @@ -7,7 +7,7 @@ "category": "Localisation", "license": "AGPL-3", "author": "Odoo Experts, Odoo Community Association (OCA)", - "website": "https://www.odooexperts.nl", + "website": "https://github.com/OCA/l10n-netherlands", "depends": [ "base", ], diff --git a/l10n_nl_country_states/__manifest__.py b/l10n_nl_country_states/__manifest__.py index ebeb6fcb2..5659a9404 100644 --- a/l10n_nl_country_states/__manifest__.py +++ b/l10n_nl_country_states/__manifest__.py @@ -4,6 +4,7 @@ "name": "Dutch country states (Provincies)", "version": "11.0.1.0.1", "author": "Therp BV, Odoo Community Association (OCA)", + 'website': 'https://github.com/OCA/l10n-netherlands', "license": "AGPL-3", "category": "Localization", "depends": [ diff --git a/l10n_nl_country_states/examples/generate_postcode_regios.py b/l10n_nl_country_states/examples/generate_postcode_regios.py index 77717d3c1..8de254f3c 100755 --- a/l10n_nl_country_states/examples/generate_postcode_regios.py +++ b/l10n_nl_country_states/examples/generate_postcode_regios.py @@ -1,15 +1,15 @@ #!/usr/bin/python # this script is compatible with a python3 interpreter # this script generates the data file for postcode state mapping +""" +This expected input is an .xls file, passed as argument. +The .xls file should contain the mapping of postcodes-provinces. +Note: the records of the .xls MUST be sorted by postcode number! +""" import argparse import xlrd -''' -This expected input is an .xls file, passed as argument. -The .xls file should contain the mapping of postcodes-provinces. -Note: the records of the .xls MUST be sorted by postcode number! -''' parser = argparse.ArgumentParser() parser.add_argument('file', type=open) @@ -23,17 +23,18 @@ def get_record_txt(): global province - return str('\n' - ' %s\n' - ' %s\n' - ' \n' - '\n' - ) % ( - str(last_min_zip), - str(last_max_zip), - str(last_min_zip), - str(last_max_zip), - province, + return str( + '\n' + ' %s\n' + ' %s\n' + ' \n' + '\n' + ) % ( + str(last_min_zip), + str(last_max_zip), + str(last_min_zip), + str(last_max_zip), + province, ) @@ -63,4 +64,4 @@ def get_record_txt(): last_province = prov result_text += get_record_txt() - print(result_text) + print(result_text) # pylint: disable=print-used diff --git a/l10n_nl_partner_name/__manifest__.py b/l10n_nl_partner_name/__manifest__.py index 2182af324..9884e748f 100644 --- a/l10n_nl_partner_name/__manifest__.py +++ b/l10n_nl_partner_name/__manifest__.py @@ -5,6 +5,7 @@ 'version': '11.0.0.0.0', 'author': 'Therp BV, Odoo Community Association (OCA)', 'category': 'Contact management', + 'website': 'https://github.com/OCA/l10n-netherlands', 'depends': [ 'partner_firstname', 'base_view_inheritance_extension', diff --git a/l10n_nl_partner_salutation/__manifest__.py b/l10n_nl_partner_salutation/__manifest__.py index d1e8b234a..3f7f82a4a 100644 --- a/l10n_nl_partner_salutation/__manifest__.py +++ b/l10n_nl_partner_salutation/__manifest__.py @@ -6,7 +6,7 @@ 'author': 'Therp BV, Odoo Community Association (OCA)', 'category': 'Contact management', 'license': 'AGPL-3', - 'website': 'https://github.com/oca/l10n-netherlands.git', + 'website': 'https://github.com/OCA/l10n-netherlands', 'depends': [ 'partner_contact_gender', 'l10n_nl_partner_name', diff --git a/l10n_nl_tax_invoice_basis/__manifest__.py b/l10n_nl_tax_invoice_basis/__manifest__.py index 172ebfca5..a71ac0829 100644 --- a/l10n_nl_tax_invoice_basis/__manifest__.py +++ b/l10n_nl_tax_invoice_basis/__manifest__.py @@ -7,7 +7,7 @@ 'version': '11.0.1.0.0', 'category': 'Localization', 'author': 'Onestein, Odoo Community Association (OCA)', - 'website': 'http://www.onestein.eu', + 'website': 'https://github.com/OCA/l10n-netherlands', 'license': 'AGPL-3', 'depends': [ 'account', diff --git a/l10n_nl_tax_statement/hooks.py b/l10n_nl_tax_statement/hooks.py index f58ac5fb6..eee0a26b1 100644 --- a/l10n_nl_tax_statement/hooks.py +++ b/l10n_nl_tax_statement/hooks.py @@ -11,12 +11,23 @@ def pre_init_hook(cr): is required, as all values are empty). """ logger = logging.getLogger(__name__) - table = "account_move_line" - for column, datatype in ( - ("l10n_nl_vat_statement_id", "INTEGER"), - ("l10n_nl_vat_statement_include", "BOOLEAN")): - if not column_exists(cr, table, column): - logger.info("Precreating %s.%s", table, column) - cr.execute( - "ALTER TABLE {} ADD COLUMN {} {}".format( - table, column, datatype)) + if not column_exists(cr, "account_move_line", "l10n_nl_vat_statement_id"): + logger.info( + "Precreating %s.%s", + "account_move_line", + "l10n_nl_vat_statement_id" + ) + cr.execute( + "ALTER TABLE account_move_line" + " ADD COLUMN l10n_nl_vat_statement_id INTEGER" + ) + if not column_exists(cr, "account_move_line", "l10n_nl_vat_statement_include"): + logger.info( + "Precreating %s.%s", + "account_move_line", + "l10n_nl_vat_statement_include" + ) + cr.execute( + "ALTER TABLE account_move_line" + " ADD COLUMN l10n_nl_vat_statement_include BOOLEAN" + ) diff --git a/l10n_nl_xaf_auditfile_export/__manifest__.py b/l10n_nl_xaf_auditfile_export/__manifest__.py index 1f93ce665..1a237fc48 100644 --- a/l10n_nl_xaf_auditfile_export/__manifest__.py +++ b/l10n_nl_xaf_auditfile_export/__manifest__.py @@ -5,6 +5,7 @@ "name": "XAF auditfile export", "version": "11.0.1.3.0", "author": "Therp BV, Odoo Community Association (OCA)", + 'website': 'https://github.com/OCA/l10n-netherlands', "license": "AGPL-3", "category": "Accounting & Finance", "summary": "Export XAF auditfiles for Dutch tax authorities", diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..debd00816 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +# generated from manifests external_dependencies +mako +pyPostcode +python-stdnum