From eb0c8b84e3f9c94a87a3e0210175caf197808777 Mon Sep 17 00:00:00 2001 From: Rodia Date: Sat, 15 Jun 2024 11:00:00 -0500 Subject: [PATCH] Feat: First Commit --- .dev/Procfile | 2 + .dev/dev.py | 52 + .dev/install_module.sh | 60 + .dev/run.sh | 31 + .dev/trytond.cfg | 3 + .flake8 | 3 + .gitignore | 228 + .woodpecker.yml | 33 + Dockerfile | 15 + Dockerfile_Test | 5 + Rakefile | 119 + compose.test.yml | 15 + compose.yml | 23 + modules/account_co_co/.drone.yml | 56 + modules/account_co_co/.flake8 | 2 + modules/account_co_co/.gitignore | 218 + modules/account_co_co/COPYRIGHT | 14 + modules/account_co_co/LICENSE | 674 ++ modules/account_co_co/MANIFEST.in | 5 + modules/account_co_co/README.rst | 1 + modules/account_co_co/__init__.py | 29 + modules/account_co_co/account.py | 158 + modules/account_co_co/account.xml | 11 + modules/account_co_co/address.xml | 12 + .../address_subdivision_types_colombia.xml | 9 + modules/account_co_co/configuration.py | 11 + modules/account_co_co/configuration.xml | 10 + modules/account_co_co/country.py | 17 + modules/account_co_co/doc/index.rst | 2 + .../account_co_co/doc/localities_colombia.csv | 21 + .../doc/localities_csv_to_xml.py | 64 + .../doc/municipalities_colombia.csv | 1115 +++ .../doc/municipalities_csv_to_xml.py | 61 + .../doc/subdivisions_colombia.csv | 34 + .../doc/subdivisions_csv_to_xml.py | 56 + .../doc/tipo_responsabilidad.csv | 115 + .../account_co_co/doc/tipo_responsabilidad.py | 42 + .../doc/tipo_responsabilidad.xml | 461 + modules/account_co_co/exceptions.py | 13 + modules/account_co_co/locale/es.po | 91 + modules/account_co_co/localities_colombia.xml | 166 + modules/account_co_co/message.xml | 19 + .../account_co_co/municipalities_colombia.xml | 8918 +++++++++++++++++ modules/account_co_co/party.py | 419 + modules/account_co_co/party.xml | 27 + modules/account_co_co/rut.py | 9 + modules/account_co_co/rut.xml | 34 + modules/account_co_co/setup.py | 119 + modules/account_co_co/subdivision.py | 10 + .../account_co_co/subdivisions_colombia.xml | 242 + modules/account_co_co/tests/__init__.py | 0 .../account_co_co/tests/test_account_co_co.py | 9 + .../account_co_co/tipo_responsabilidad.xml | 33 + modules/account_co_co/tox.ini | 15 + modules/account_co_co/tryton.cfg | 19 + modules/account_co_co/view/address_form.xml | 11 + .../account_co_co/view/configuration_form.xml | 10 + .../account_co_co/view/identifier_form.xml | 11 + .../account_co_co/view/identifier_tree.xml | 9 + modules/account_co_co/view/party_form.xml | 58 + .../view/party_tax_level_code_form.xml | 7 + .../view/party_tax_level_code_tree.xml | 5 + modules/account_co_co/view/party_tree.xml | 17 + modules/account_co_pyme/.gitignore | 29 + modules/account_co_pyme/CHANGELOG | 4 + modules/account_co_pyme/COPYRIGHT | 17 + modules/account_co_pyme/INSTALL | 29 + modules/account_co_pyme/LICENSE | 674 ++ modules/account_co_pyme/MANIFEST.in | 11 + modules/account_co_pyme/README | 38 + modules/account_co_pyme/README.rst | 15 + modules/account_co_pyme/TODO | 0 modules/account_co_pyme/__init__.py | 11 + modules/account_co_pyme/account.py | 25 + modules/account_co_pyme/account.xml | 7922 +++++++++++++++ modules/account_co_pyme/doc/index.rst | 8 + modules/account_co_pyme/journal_sequences.xml | 108 + modules/account_co_pyme/payment_term_co.xml | 11 + modules/account_co_pyme/setup.py | 119 + modules/account_co_pyme/tax.xml | 1402 +++ modules/account_co_pyme/tests/__init__.py | 2 + .../tests/test_account_co_pyme.py | 12 + modules/account_co_pyme/tryton.cfg | 9 + modules/account_co_reports/.gitignore | 218 + modules/account_co_reports/COPYRIGHT | 15 + modules/account_co_reports/LICENSE | 674 ++ modules/account_co_reports/MANIFEST.in | 5 + modules/account_co_reports/README.rst | 1 + modules/account_co_reports/__init__.py | 50 + modules/account_co_reports/auxiliary_book.py | 308 + modules/account_co_reports/auxiliary_book.xml | 23 + modules/account_co_reports/auxiliary_party.py | 200 + .../account_co_reports/auxiliary_party.xml | 23 + .../balance_invoice_party.py | 142 + .../balance_invoice_party.xml | 26 + modules/account_co_reports/balance_sheet.py | 57 + modules/account_co_reports/balance_sheet.xml | 25 + .../balance_sheet_colgaap.py | 215 + .../balance_sheet_colgaap.xml | 28 + modules/account_co_reports/doc/es/index.rst | 30 + modules/account_co_reports/doc/index.rst | 15 + .../account_co_reports/income_statement.py | 112 + .../account_co_reports/income_statement.xml | 26 + .../income_statement_colgaap.py | 222 + .../income_statement_colgaap.xml | 27 + modules/account_co_reports/locale/es.po | 1647 +++ .../account_co_reports/party_book_account.py | 284 + .../account_co_reports/party_book_account.xml | 19 + .../report/auxiliary_book.fods | 1415 +++ .../report/auxiliary_party.fods | 949 ++ .../report/balance_invoice_party.fods | 1421 +++ .../report/balance_sheet.fods | 1463 +++ .../report/balance_sheet_colgaap.fods | 993 ++ .../report/income_statement.fods | 970 ++ .../report/income_statement_colgaap.fods | 1025 ++ .../report/trial_balance.fods | 659 ++ .../report/trial_balance_detailed.fods | 814 ++ modules/account_co_reports/setup.py | 119 + modules/account_co_reports/tests/__init__.py | 6 + .../tests/test_account_col_reports.py | 17 + modules/account_co_reports/tox.ini | 15 + modules/account_co_reports/trial_balance.py | 280 + modules/account_co_reports/trial_balance.xml | 24 + .../trial_balance_detailed.py | 331 + .../trial_balance_detailed.xml | 28 + modules/account_co_reports/tryton.cfg | 18 + .../view/balance_sheet_context_col_form.xml | 9 + .../income_statement_context_col_form.xml | 9 + .../view/party_book_account_tree.xml | 8 + .../view/print_auxiliary_book_start_form.xml | 23 + .../view/print_auxiliary_party_start_form.xml | 21 + ...print_balance_invoice_party_start_form.xml | 15 + ...print_balance_sheet_colgaap_start_form.xml | 17 + ...nt_income_statement_colgaap_start_form.xml | 17 + .../view/print_trial_balance_start_form.xml | 21 + .../trial_balance_detailed_start_form.xml | 22 + 136 files changed, 39605 insertions(+) create mode 100755 .dev/Procfile create mode 100755 .dev/dev.py create mode 100644 .dev/install_module.sh create mode 100755 .dev/run.sh create mode 100755 .dev/trytond.cfg create mode 100644 .flake8 create mode 100644 .gitignore create mode 100755 .woodpecker.yml create mode 100755 Dockerfile create mode 100755 Dockerfile_Test create mode 100755 Rakefile create mode 100755 compose.test.yml create mode 100755 compose.yml create mode 100644 modules/account_co_co/.drone.yml create mode 100644 modules/account_co_co/.flake8 create mode 100644 modules/account_co_co/.gitignore create mode 100644 modules/account_co_co/COPYRIGHT create mode 100644 modules/account_co_co/LICENSE create mode 100644 modules/account_co_co/MANIFEST.in create mode 120000 modules/account_co_co/README.rst create mode 100644 modules/account_co_co/__init__.py create mode 100644 modules/account_co_co/account.py create mode 100644 modules/account_co_co/account.xml create mode 100644 modules/account_co_co/address.xml create mode 100644 modules/account_co_co/address_subdivision_types_colombia.xml create mode 100644 modules/account_co_co/configuration.py create mode 100644 modules/account_co_co/configuration.xml create mode 100644 modules/account_co_co/country.py create mode 100644 modules/account_co_co/doc/index.rst create mode 100644 modules/account_co_co/doc/localities_colombia.csv create mode 100644 modules/account_co_co/doc/localities_csv_to_xml.py create mode 100644 modules/account_co_co/doc/municipalities_colombia.csv create mode 100644 modules/account_co_co/doc/municipalities_csv_to_xml.py create mode 100644 modules/account_co_co/doc/subdivisions_colombia.csv create mode 100644 modules/account_co_co/doc/subdivisions_csv_to_xml.py create mode 100644 modules/account_co_co/doc/tipo_responsabilidad.csv create mode 100644 modules/account_co_co/doc/tipo_responsabilidad.py create mode 100644 modules/account_co_co/doc/tipo_responsabilidad.xml create mode 100644 modules/account_co_co/exceptions.py create mode 100644 modules/account_co_co/locale/es.po create mode 100644 modules/account_co_co/localities_colombia.xml create mode 100644 modules/account_co_co/message.xml create mode 100644 modules/account_co_co/municipalities_colombia.xml create mode 100644 modules/account_co_co/party.py create mode 100644 modules/account_co_co/party.xml create mode 100644 modules/account_co_co/rut.py create mode 100644 modules/account_co_co/rut.xml create mode 100755 modules/account_co_co/setup.py create mode 100644 modules/account_co_co/subdivision.py create mode 100644 modules/account_co_co/subdivisions_colombia.xml create mode 100644 modules/account_co_co/tests/__init__.py create mode 100644 modules/account_co_co/tests/test_account_co_co.py create mode 100644 modules/account_co_co/tipo_responsabilidad.xml create mode 100644 modules/account_co_co/tox.ini create mode 100644 modules/account_co_co/tryton.cfg create mode 100644 modules/account_co_co/view/address_form.xml create mode 100644 modules/account_co_co/view/configuration_form.xml create mode 100644 modules/account_co_co/view/identifier_form.xml create mode 100644 modules/account_co_co/view/identifier_tree.xml create mode 100644 modules/account_co_co/view/party_form.xml create mode 100644 modules/account_co_co/view/party_tax_level_code_form.xml create mode 100644 modules/account_co_co/view/party_tax_level_code_tree.xml create mode 100644 modules/account_co_co/view/party_tree.xml create mode 100644 modules/account_co_pyme/.gitignore create mode 100644 modules/account_co_pyme/CHANGELOG create mode 100644 modules/account_co_pyme/COPYRIGHT create mode 100644 modules/account_co_pyme/INSTALL create mode 100644 modules/account_co_pyme/LICENSE create mode 100644 modules/account_co_pyme/MANIFEST.in create mode 100644 modules/account_co_pyme/README create mode 100644 modules/account_co_pyme/README.rst create mode 100644 modules/account_co_pyme/TODO create mode 100644 modules/account_co_pyme/__init__.py create mode 100644 modules/account_co_pyme/account.py create mode 100644 modules/account_co_pyme/account.xml create mode 100644 modules/account_co_pyme/doc/index.rst create mode 100644 modules/account_co_pyme/journal_sequences.xml create mode 100644 modules/account_co_pyme/payment_term_co.xml create mode 100644 modules/account_co_pyme/setup.py create mode 100644 modules/account_co_pyme/tax.xml create mode 100644 modules/account_co_pyme/tests/__init__.py create mode 100644 modules/account_co_pyme/tests/test_account_co_pyme.py create mode 100644 modules/account_co_pyme/tryton.cfg create mode 100644 modules/account_co_reports/.gitignore create mode 100644 modules/account_co_reports/COPYRIGHT create mode 100644 modules/account_co_reports/LICENSE create mode 100644 modules/account_co_reports/MANIFEST.in create mode 120000 modules/account_co_reports/README.rst create mode 100644 modules/account_co_reports/__init__.py create mode 100755 modules/account_co_reports/auxiliary_book.py create mode 100755 modules/account_co_reports/auxiliary_book.xml create mode 100755 modules/account_co_reports/auxiliary_party.py create mode 100755 modules/account_co_reports/auxiliary_party.xml create mode 100644 modules/account_co_reports/balance_invoice_party.py create mode 100644 modules/account_co_reports/balance_invoice_party.xml create mode 100644 modules/account_co_reports/balance_sheet.py create mode 100755 modules/account_co_reports/balance_sheet.xml create mode 100644 modules/account_co_reports/balance_sheet_colgaap.py create mode 100644 modules/account_co_reports/balance_sheet_colgaap.xml create mode 100644 modules/account_co_reports/doc/es/index.rst create mode 100644 modules/account_co_reports/doc/index.rst create mode 100644 modules/account_co_reports/income_statement.py create mode 100644 modules/account_co_reports/income_statement.xml create mode 100644 modules/account_co_reports/income_statement_colgaap.py create mode 100644 modules/account_co_reports/income_statement_colgaap.xml create mode 100755 modules/account_co_reports/locale/es.po create mode 100755 modules/account_co_reports/party_book_account.py create mode 100644 modules/account_co_reports/party_book_account.xml create mode 100644 modules/account_co_reports/report/auxiliary_book.fods create mode 100644 modules/account_co_reports/report/auxiliary_party.fods create mode 100644 modules/account_co_reports/report/balance_invoice_party.fods create mode 100644 modules/account_co_reports/report/balance_sheet.fods create mode 100644 modules/account_co_reports/report/balance_sheet_colgaap.fods create mode 100644 modules/account_co_reports/report/income_statement.fods create mode 100644 modules/account_co_reports/report/income_statement_colgaap.fods create mode 100644 modules/account_co_reports/report/trial_balance.fods create mode 100644 modules/account_co_reports/report/trial_balance_detailed.fods create mode 100644 modules/account_co_reports/setup.py create mode 100644 modules/account_co_reports/tests/__init__.py create mode 100644 modules/account_co_reports/tests/test_account_col_reports.py create mode 100644 modules/account_co_reports/tox.ini create mode 100755 modules/account_co_reports/trial_balance.py create mode 100755 modules/account_co_reports/trial_balance.xml create mode 100644 modules/account_co_reports/trial_balance_detailed.py create mode 100644 modules/account_co_reports/trial_balance_detailed.xml create mode 100644 modules/account_co_reports/tryton.cfg create mode 100755 modules/account_co_reports/view/balance_sheet_context_col_form.xml create mode 100755 modules/account_co_reports/view/income_statement_context_col_form.xml create mode 100755 modules/account_co_reports/view/party_book_account_tree.xml create mode 100755 modules/account_co_reports/view/print_auxiliary_book_start_form.xml create mode 100755 modules/account_co_reports/view/print_auxiliary_party_start_form.xml create mode 100644 modules/account_co_reports/view/print_balance_invoice_party_start_form.xml create mode 100755 modules/account_co_reports/view/print_balance_sheet_colgaap_start_form.xml create mode 100755 modules/account_co_reports/view/print_income_statement_colgaap_start_form.xml create mode 100755 modules/account_co_reports/view/print_trial_balance_start_form.xml create mode 100644 modules/account_co_reports/view/trial_balance_detailed_start_form.xml diff --git a/.dev/Procfile b/.dev/Procfile new file mode 100755 index 0000000..4fdb8f4 --- /dev/null +++ b/.dev/Procfile @@ -0,0 +1,2 @@ +trytond: while true; do trytond -d ${DB_NAME} --dev -v -c $SCRIPT_DIR/trytond.cfg; done +monitor: python3 $SCRIPT_DIR/dev.py \ No newline at end of file diff --git a/.dev/dev.py b/.dev/dev.py new file mode 100755 index 0000000..de7108c --- /dev/null +++ b/.dev/dev.py @@ -0,0 +1,52 @@ +# script para refrescar cambios de xml del modulo de tryton +import sys +import os +import logging +import time + +import inotify.adapters + +logging.basicConfig(level=logging.INFO, stream=sys.stderr) + +SRC = os.environ['SRC'] + '/modules/' +MODULES = os.environ['MODULES'].split(':') +DB_NAME = os.environ['DB_NAME'] + + +def _main(): + i = inotify.adapters.Inotify() + logging.info("MONITOREANDO ARCHIVOS EN %s", SRC) + + for module in MODULES: + logging.info('NOMBRE DEL MODULO A MONITOREAR%s', module) + i.add_watch( + SRC + module) + + for event in i.event_gen(yield_nones=False): + (_, type_names, path, filename) = event + (_, ext) = os.path.splitext(filename) + + if 'IN_CLOSE_WRITE' not in type_names: + continue + + module_name = path.split('/')[-1] + logging.info('NOMBRE DEL MODULO %s', module_name) + + if ext in ['.py', '.xml', '.cfg']: + for _ in range(0, 10): + command = "trytond-admin -d {} -u {} --act -vv".format( + DB_NAME, module_name) + logging.debug("Ejecutando comando: %s", command) + update_module = os.system(command) + if update_module != 0: + time.sleep(2) + logging.error("fallo trytond-admin") + else: + logging.info( + "ACTUALIZADO TRYTOND POR CAMBIO DE ARCHIVO %s", + filename) + break + + +if __name__ == '__main__': + _main() diff --git a/.dev/install_module.sh b/.dev/install_module.sh new file mode 100644 index 0000000..b164e1d --- /dev/null +++ b/.dev/install_module.sh @@ -0,0 +1,60 @@ +# este script fuerza que los cambios se vean reflejados +# directamente en trytond. +# +# variables exportadas: +# - module_name + +[ ! -d "$SRC" ] && die "no se ubica ruta en SRC" + +# dependencias minimas +pip3 install psycopg2 proteus==7.0.0 inotify honcho qrcode==6.1 pyshp==2.3.1 shapely==2.0.2 scipy==1.13.1 matplotlib==3.9.0 + +pip3 install trytond-country==7.0.0\ + trytond-company==7.0.0\ + trytond-party==7.0.0 \ + trytond-company==7.0.0\ + trytond-currency==7.0.0\ + trytond-account_product==7.0.0\ + trytond-account_invoice_stock==7.0.0\ + trytond-account_stock_continental==7.0.0\ + trytond-account_statement==7.0.0\ + trytond-bank==7.0.0\ + trytond-product==7.0.0\ + trytond-purchase==7.0.0\ + trytond-sale==7.0.0\ + +module_names=() + +for module in modules/*/; do + + pushd "$module" + + # instalar dependencias de tryton desde paquete + python3 setup.py install + + # usamos enlace al paquete + python3 setup.py develop + + # instalar modulo + trytond_modules_path=`pip3 show trytond | grep Location | sed -nr 's/Location: +//gp'`/trytond/modules + module_name=`cat "setup.py" | fgrep -A 1 [trytond.modules] | sed 1d | cut -d '=' -f 1 | tr -d ' \n'` + + # Añadir el nombre del módulo al arreglo + module_names+=("$module_name") + + [ ! -d "$trytond_modules_path" ] && die "fallo al ubicar ruta de modulos de trytond" + ln -sf "$SRC/$module" "$trytond_modules_path/$module_name" + rm -rf "$SRC/$module/$module_name" + + popd + +done + +trytond_path=`pip3 show trytond | grep Location | sed -nr 's/Location: +//gp'`/trytond + +module_names=$(IFS=:; echo "${module_names[*]}") + + +if [ -d "locale_custom" ]; then + cp -f "locale_custom/ir/pt.po" "$trytond_path/ir/locale/" +fi diff --git a/.dev/run.sh b/.dev/run.sh new file mode 100755 index 0000000..13f3f5f --- /dev/null +++ b/.dev/run.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# script para iniciar entorno vivo + + +SCRIPT_DIR=$(dirname `realpath $0`) + +die() { + echo $1 + exit 1 +} + +[ ! -d "$SRC" ] && die "no se ubica ruta en SRC" +[ -z "$DB_NAME" ] && die "se requiere variable DB_NAME" + +set -e + +# instalar modulo +source ${SCRIPT_DIR}/install_module.sh + +# inicializar base de datos +# https://docs.tryton.org/projects/server/en/latest/tutorial/module/setup_database.html +yes admin | trytond-admin -d ${DB_NAME} --all --act + + +# ejecutar servidor +export SCRIPT_DIR +export MODULES=$module_names +export DB_NAME +export SRC + +honcho -d ${SCRIPT_DIR} start diff --git a/.dev/trytond.cfg b/.dev/trytond.cfg new file mode 100755 index 0000000..4453ac2 --- /dev/null +++ b/.dev/trytond.cfg @@ -0,0 +1,3 @@ +[web] +listen = 0.0.0.0:8000 +root=/var/lib/trytond/www diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..2beef91 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +ignore=E123,E124,E126,E128,E741,W503 +exclude=.git,__pycache__,docs/source/conf.py,old,build,dist,.dev \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9db73e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,228 @@ +# ---> Python +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class +*.bk + +/.vscode + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +bin/ +include/ +wheels/ +__pycache__ +trytond_miac.egg-info/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script fkrom a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# ---> Emacs +# -*- mode: gitignore; -*- +*~ +.~* +*# +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + + +# ---> Vim +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +# ---> VirtualEnv +# Virtualenv +# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +.Python +[Bb]in +[Ii]nclude +[Ll]ib +[Ll]ib64 +[Ll]ocal +[Ss]cripts +pyvenv.cfg +.venv +pip-selfcheck.json + +.tdd_cache +app \ No newline at end of file diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100755 index 0000000..f0e0285 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,33 @@ +# +# variables que puedo usar? https://woodpecker-ci.org/docs/0.15/usage/environment#built-in-environment-variables + +steps: + style: + image: python:3.9 + commands: + - pip3 install flake8 + - flake8 + + tests: + image: python:3.9 + environment: + - SRC=/app + - DB_CACHE=/tmp + - DB_NAME=trytontest + - TRYTOND_DATABASE_URI=postgresql://tryton:tryton@postgres:5432/ + commands: + - pip3 install psycopg2 proteus qrcode==6.1 image==1.5.33 + - mkdir /app + - mv modules /app + - mv .dev /app + - cd /app + - /bin/bash .dev/install_module.sh + - python -m unittest discover -s modules + +services: + postgres: + image: postgres:12 + environment: + - POSTGRES_USER=tryton + - POSTGRES_PASSWORD=tryton + - POSTGRES_DB=demo diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..d0a54d7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# TOMADO DE: https://hg.tryton.org/tryton-docker/file/tip/6.6/Dockerfile +FROM node as builder-node + +ENV SERIES 7.0 +RUN npm install -g bower +RUN curl https://downloads.tryton.org/${SERIES}/tryton-sao-last.tgz | tar zxf - -C / +RUN cd /package && bower install --allow-root + +FROM python:3.11-bullseye + +# trytond DB_CACHE requiere commandos `pg_dump` y `pg_restore` +RUN apt-get update && apt-get install -y postgresql-client + +# TOMADO DE: https://hg.tryton.org/tryton-docker/file/tip/6.6/Dockerfile +COPY --from=builder-node /package /var/lib/trytond/www diff --git a/Dockerfile_Test b/Dockerfile_Test new file mode 100755 index 0000000..cd83991 --- /dev/null +++ b/Dockerfile_Test @@ -0,0 +1,5 @@ +# TOMADO DE: https://hg.tryton.org/tryton-docker/file/tip/6.6/Dockerfile +FROM python:3.11-bullseye + +# trytond DB_CACHE requiere commandos `pg_dump` y `pg_restore` +RUN apt-get update && apt-get install -y postgresql-client diff --git a/Rakefile b/Rakefile new file mode 100755 index 0000000..1043f4a --- /dev/null +++ b/Rakefile @@ -0,0 +1,119 @@ +require 'yaml' +require 'digest' + +WOODPECKER_YML='.woodpecker.yml' +DOCKER_COMPOSE='compose.test.yml' + +desc 'iniciar entorno' +task :up do + compose('up', '--build', '-d') +end + +desc 'poblar entorno' +task :init => [:up] do + compose('exec', 'app.dev', 'pip3 install psycopg2 flake8 trytond==7.0.0') + compose('exec', 'app.dev', "bash .dev/install_module.sh") +end + +desc 'terminal' +task :sh do + compose('exec', 'app.dev', 'bash') +end + +desc 'iterar' +task :tdd, [:name] do |_, args| + + refresh_cache + test_dir = '' + if args.name + test_dir = "modules/#{args.name}" + compose('exec', 'app.dev', "bash -c 'cd #{test_dir} && flake8'") + compose('exec', 'app.dev', "bash -c 'cd #{test_dir}/tests && python3 -m unittest'") + else + compose('exec', 'app.dev', "bash -c 'cd modules && flake8 *'") + compose('exec', 'app.dev', "bash -c 'python -m unittest discover -s modules'") + end + +end + +desc 'detener entorno' +task :down do + compose('down') +end + +desc 'entorno vivo' +namespace :live do + + desc 'iniciar entorno' + task :up do + compose('up', '--build', '-d', compose: 'compose.yml') + end + + desc 'monitorear salida' + task :tail do + compose('logs', '-f', 'live.dev', compose: 'compose.yml') + end + + desc 'detener entorno' + task :down do + compose('down', compose: 'compose.yml') + end + + desc 'reiniciar entorno' + task :restart do + compose('restart', compose: 'compose.yml') + end + + desc 'terminal' + task :sh do + compose('exec', 'live.dev', 'bash') + end + +end + +def compose(*arg, compose: DOCKER_COMPOSE) + sh "docker-compose -f #{compose} #{arg.join(' ')}" +end + +def refresh_cache + # cuando se realizan cambios sobre los modelos + # que afectan las tablas es necesario limpiar el cache + # de trytond + changes = [] + + has_git_dir = File.directory?(File.join(File.dirname(__FILE__), '.git')) + try_git = `which git`.then { $? }.success? && has_git_dir + try_fossil = system('fossil status', err: :close, out: :close) + + if try_fossil + changes = %x{fossil diff}.split("\n").grep(/^[-+]/) + elsif try_git + changes = %x{git diff -- '*.xml' ':!*view*'}.split("\n").grep(/^[-+index]/) + else + warn < 0 && (tdd_cache != hash) + compose('exec', 'app.dev', 'bash -c "rm -f /tmp/*.dump"') + cache.seek(0); cache.write(hash) + end + end +end diff --git a/compose.test.yml b/compose.test.yml new file mode 100755 index 0000000..8a21c0a --- /dev/null +++ b/compose.test.yml @@ -0,0 +1,15 @@ +version: '3.9' +services: + app.dev: + build: + context: . + dockerfile: Dockerfile_Test + environment: + SRC: /app + DB_CACHE: /tmp + DB_NAME: ":memory:" + TRYTOND_DATABASE_URI: sqlite:// + command: sleep 10h + volumes: + - .:/app + working_dir: /app diff --git a/compose.yml b/compose.yml new file mode 100755 index 0000000..c1cb4cd --- /dev/null +++ b/compose.yml @@ -0,0 +1,23 @@ +version: '3.9' +services: + db.dev: + image: postgres:12 + environment: + - POSTGRES_USER=tryton + - POSTGRES_PASSWORD=tryton + - POSTGRES_DB=tryton + live.dev: + build: + context: . + depends_on: + - db.dev + command: bash .dev/run.sh + environment: + - DB_NAME=tryton + - SRC=/app + - TRYTOND_DATABASE_URI=postgresql://tryton:tryton@db.dev:5432/ + volumes: + - .:/app + ports: + - "${TRYTON_PORT:-28000}:8000" + working_dir: /app diff --git a/modules/account_co_co/.drone.yml b/modules/account_co_co/.drone.yml new file mode 100644 index 0000000..22e53fe --- /dev/null +++ b/modules/account_co_co/.drone.yml @@ -0,0 +1,56 @@ +clone: + hg: + image: plugins/hg + environment: + - HG_SHARE_POOL=/root/.cache/hg + volumes: + - cache:/root/.cache + +pipeline: + tox: + image: ${IMAGE} + environment: + - CFLAGS=-O0 + - DB_CACHE=/cache + - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE + - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ + commands: + - echo "[extensions]" >> /root/.hgrc + - echo "hgext.share =" >> /root/.hgrc + - echo "[share]" >> /root/.hgrc + - echo "pool = /root/.cache/hg" >> /root/.hgrc + - pip install tox + - tox -e "${TOXENV}-${DATABASE}" + volumes: + - cache:/root/.cache + +services: + postgresql: + image: postgres + environment: + - POSTGRES_HOST_AUTH_METHOD=trust + command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" + when: + matrix: + DATABASE: postgresql + +matrix: + include: + - IMAGE: python:3.6 + TOXENV: py36 + DATABASE: sqlite + - IMAGE: python:3.6 + TOXENV: py36 + DATABASE: postgresql + - IMAGE: python:3.7 + TOXENV: py37 + DATABASE: sqlite + - IMAGE: python:3.7 + TOXENV: py37 + DATABASE: postgresql + - IMAGE: python:3.8 + TOXENV: py38 + DATABASE: sqlite + - IMAGE: python:3.8 + TOXENV: py38 + DATABASE: postgresql diff --git a/modules/account_co_co/.flake8 b/modules/account_co_co/.flake8 new file mode 100644 index 0000000..fa6b4f6 --- /dev/null +++ b/modules/account_co_co/.flake8 @@ -0,0 +1,2 @@ +[flake8] +ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_co_co/.gitignore b/modules/account_co_co/.gitignore new file mode 100644 index 0000000..9c46d92 --- /dev/null +++ b/modules/account_co_co/.gitignore @@ -0,0 +1,218 @@ +# ---> Python +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class +*.bk + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# ---> Emacs +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + + +# ---> Vim +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +# ---> VirtualEnv +# Virtualenv +# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +.Python +[Bb]in +[Ii]nclude +[Ll]ib +[Ll]ib64 +[Ll]ocal +[Ss]cripts +pyvenv.cfg +.venv +pip-selfcheck.json + diff --git a/modules/account_co_co/COPYRIGHT b/modules/account_co_co/COPYRIGHT new file mode 100644 index 0000000..0c0f4b8 --- /dev/null +++ b/modules/account_co_co/COPYRIGHT @@ -0,0 +1,14 @@ +Copyright (C) 2020 Alus Tmp + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/modules/account_co_co/LICENSE b/modules/account_co_co/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/modules/account_co_co/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/modules/account_co_co/MANIFEST.in b/modules/account_co_co/MANIFEST.in new file mode 100644 index 0000000..e88b234 --- /dev/null +++ b/modules/account_co_co/MANIFEST.in @@ -0,0 +1,5 @@ +include CHANGELOG +include COPYRIGHT +include LICENSE +include README.rst +include doc/* diff --git a/modules/account_co_co/README.rst b/modules/account_co_co/README.rst new file mode 120000 index 0000000..176d9c2 --- /dev/null +++ b/modules/account_co_co/README.rst @@ -0,0 +1 @@ +doc/index.rst \ No newline at end of file diff --git a/modules/account_co_co/__init__.py b/modules/account_co_co/__init__.py new file mode 100644 index 0000000..89f98fe --- /dev/null +++ b/modules/account_co_co/__init__.py @@ -0,0 +1,29 @@ +from trytond.pool import Pool +from . import party +from . import country +from . import rut +from . import configuration +from . import account +from . import subdivision + +__all__ = ['register'] + + +def register(): + Pool.register( + party.Party, + party.PartyIdentifier, + party.PartyTaxLevelCode, + party.Address, + country.Subdivision, + rut.TaxLevelCode, + configuration.Configuration, + account.Account, + account.Move, + account.Line, + subdivision.Subdivision, + module='account_co_co', type_='model') + Pool.register( + module='account_co_co', type_='wizard') + Pool.register( + module='account_co_co', type_='report') diff --git a/modules/account_co_co/account.py b/modules/account_co_co/account.py new file mode 100644 index 0000000..73edd93 --- /dev/null +++ b/modules/account_co_co/account.py @@ -0,0 +1,158 @@ +from sql.aggregate import Sum +from sql.functions import Abs, Round +from sql.operators import Exists + +from trytond.pool import Pool, PoolMeta +from trytond.model.exceptions import AccessError +from .exceptions import PostError +from trytond.i18n import gettext +from trytond.model import ModelView + +from decimal import Decimal +from itertools import groupby +from trytond.transaction import Transaction +from trytond.tools import reduce_ids, grouped_slice + + +__all__ = ['Account', 'Move', 'Line'] + + +class Account(metaclass=PoolMeta): + __name__ = 'account.account' + + @classmethod + def __setup__(cls): + super(Account, cls).__setup__() + cls.party_required.domain = [()] + cls.party_required.states = {} + + +class Move(metaclass=PoolMeta): + __name__ = 'account.move' + + @classmethod + def create(cls, vlist): + pool = Pool() + Journal = pool.get('account.journal') + context = Transaction().context + + journals = {} + default_company = cls.default_company() + vlist = [x.copy() for x in vlist] + for vals in vlist: + if not vals.get('number'): + journal_id = vals.get('journal', context.get('journal')) + company_id = vals.get('company', default_company) + if journal_id: + if journal_id not in journals: + journal = journals[journal_id] = Journal(journal_id) + else: + journal = journals[journal_id] + sequence = journal.get_multivalue( + 'sequence', company=company_id) + + if sequence: + with Transaction().set_context(company=company_id): + vals['number'] = sequence.get() + + return super().create(vlist) + + @classmethod + @ModelView.button + def post(cls, moves): + pool = Pool() + Date = pool.get('ir.date') + Line = pool.get('account.move.line') + move = cls.__table__() + line = Line.__table__() + cursor = Transaction().connection.cursor() + + to_reconcile = [] + + for company, c_moves in groupby(moves, lambda m: m.company): + currency = company.currency + for sub_moves in grouped_slice(list(c_moves)): + sub_moves_ids = [m.id for m in sub_moves] + + cursor.execute(*move.select( + move.id, + where=reduce_ids(move.id, sub_moves_ids) + & ~Exists(line.select( + line.move, + where=line.move == move.id)))) + + try: + move_id, = cursor.fetchone() + except TypeError: + pass + else: + raise PostError( + gettext('account.msg_post_empty_move', + move=cls(move_id).rec_name)) + + cursor.execute(*line.select( + line.move, + where=reduce_ids(line.move, sub_moves_ids), + group_by=line.move, + having=Abs(Round( + Sum(line.debit - line.credit), + currency.digits)) >= abs(currency.rounding))) + + try: + move_id, = cursor.fetchone() + except TypeError: + pass + else: + raise PostError( + gettext('account.msg_post_unbalanced_move', + move=cls(move_id).rec_name)) + + cursor.execute(*line.select( + line.id, + where=reduce_ids(line.move, sub_moves_ids) + & (line.debit == Decimal(0)) + & (line.credit == Decimal(0)))) + to_reconcile.extend(l for l, in cursor) + + for move in moves: + move.state = 'posted' + if not move.post_number: + with Transaction().set_context(company=move.company.id): + move.post_date = Date.today() + move.post_number = move.period.post_move_sequence_used.get() + + def keyfunc(line): + return line.party, line.account + to_reconcile = Line.browse(sorted( + [l for l in Line.browse(to_reconcile) if l.account.reconcile], + key=keyfunc)) + for _, lines in groupby(to_reconcile, keyfunc): + Line.reconcile(list(lines)) + + cls.save(moves) + + +class Line(metaclass=PoolMeta): + __name__ = 'account.move.line' + + @classmethod + def __setup__(cls): + super(Line, cls).__setup__() + cls.party.states = {} + + @classmethod + def check_account(cls, lines, field_names=None): + if field_names and not (field_names & {'account', 'party'}): + return + for line in lines: + if not line.account.type or line.account.closed: + raise AccessError( + gettext('account.msg_line_closed_account', + account=line.account.rec_name)) + if line.account.party_required: + if bool(line.party) != bool(line.account.party_required): + error = 'party_set' if line.party else 'party_required' + raise AccessError( + gettext('account.msg_line_%s' % error, + account=line.account.rec_name, + line=line.rec_name)) diff --git a/modules/account_co_co/account.xml b/modules/account_co_co/account.xml new file mode 100644 index 0000000..d2672d9 --- /dev/null +++ b/modules/account_co_co/account.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/modules/account_co_co/address.xml b/modules/account_co_co/address.xml new file mode 100644 index 0000000..4d9ab6d --- /dev/null +++ b/modules/account_co_co/address.xml @@ -0,0 +1,12 @@ + + + + + + party.address + + address_form + + + diff --git a/modules/account_co_co/address_subdivision_types_colombia.xml b/modules/account_co_co/address_subdivision_types_colombia.xml new file mode 100644 index 0000000..919b08d --- /dev/null +++ b/modules/account_co_co/address_subdivision_types_colombia.xml @@ -0,0 +1,9 @@ + + + + + CO + + + + diff --git a/modules/account_co_co/configuration.py b/modules/account_co_co/configuration.py new file mode 100644 index 0000000..936479e --- /dev/null +++ b/modules/account_co_co/configuration.py @@ -0,0 +1,11 @@ +from trytond.model import fields +from trytond.pool import PoolMeta + +__all__ = ['Configuration'] + + +class Configuration(metaclass=PoolMeta): + __name__ = 'account.configuration' + + default_draft_sequence = fields.Many2One( + 'ir.sequence', "Draft Sequence") diff --git a/modules/account_co_co/configuration.xml b/modules/account_co_co/configuration.xml new file mode 100644 index 0000000..3208e50 --- /dev/null +++ b/modules/account_co_co/configuration.xml @@ -0,0 +1,10 @@ + + + + + account.configuration + + configuration_form + + + diff --git a/modules/account_co_co/country.py b/modules/account_co_co/country.py new file mode 100644 index 0000000..7d1b065 --- /dev/null +++ b/modules/account_co_co/country.py @@ -0,0 +1,17 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. +from trytond.model import ModelView, ModelSQL, fields +from trytond.pool import PoolMeta + + +__all__ = ['Subdivision'] + + +class Subdivision(ModelSQL, ModelView): + "Subdivision" + + __metaclass__ = PoolMeta + __name__ = 'country.subdivision' + + dane_code = fields.Char('Codigo Dane', + help="Codigo Dane, usado en Colombia") diff --git a/modules/account_co_co/doc/index.rst b/modules/account_co_co/doc/index.rst new file mode 100644 index 0000000..e9b1991 --- /dev/null +++ b/modules/account_co_co/doc/index.rst @@ -0,0 +1,2 @@ +Account Co Co Module +#################### diff --git a/modules/account_co_co/doc/localities_colombia.csv b/modules/account_co_co/doc/localities_colombia.csv new file mode 100644 index 0000000..01e77b0 --- /dev/null +++ b/modules/account_co_co/doc/localities_colombia.csv @@ -0,0 +1,21 @@ +code,name,department,dane_code +1100,Antonio Nariño,11,1115 +1102,Barrios Unidos,11,1112 +1103,Bosa,11,1107 +1104,Chapinero,11,1102 +1105,Ciudad Bolívar,11,1119 +1106,Engativá,11,1110 +1107,Fontibón,11,1109 +1108,Kennedy,11,1108 +1109,La Candelaria,11,1117 +1110,Los Mártires,11,1114 +1111,Puente Aranda,11,1116 +1112,Rafael Uribe Uribe,11,1118 +1113,San Cristóbal,11,1104 +1114,Santa Fe,11,1103 +1115,Suba,11,1111 +1116,Sumapaz,11,1120 +1117,Teusaquillo,11,1113 +1118,Tunjuelito,11,1106 +1119,Usaquén,11,1101 +1120,Usme,11,1105 \ No newline at end of file diff --git a/modules/account_co_co/doc/localities_csv_to_xml.py b/modules/account_co_co/doc/localities_csv_to_xml.py new file mode 100644 index 0000000..96f49d0 --- /dev/null +++ b/modules/account_co_co/doc/localities_csv_to_xml.py @@ -0,0 +1,64 @@ +""" +Convierte el archivo municipios_colombia.csv y departamentos_colombia.csv +en municipios_colombia.xml +""" + +import csv +model = 'country.subdivision' +municipalities = open('localities_colombia.csv', 'r') +subdivisions = open('subdivisions_colombia.csv', 'r') + +municipalities_xml = open('localities_colombia.xml', 'w') + +municipalities_reader = csv.reader(municipalities) +subdivisions_reader = csv.reader(subdivisions) +subdivisions_header = next(subdivisions_reader) +d_fields = {subdivisions_header[x]: x for x in range( + 0, len(subdivisions_header))} + +Subdivisions = {} +for subdivision in subdivisions_reader: + dane_code = int(subdivision[d_fields['DANE']]) + Subdivisions[dane_code] = dict(zip(list(d_fields.keys()), subdivision)) +subdivisions.close() + +municipalities_header = next(municipalities_reader) +m_fields = { + municipalities_header[x]: x for x in range( + 0, len(municipalities_header))} + + +municipalities_xml.write(""" + + +""") +for row in municipalities_reader: + dane_code = row[m_fields['dane_code']] + depto_id = "CO-" + Subdivisions[int(row[m_fields['department']])]['DANE'] + municipalities_xml.write( + """ + + {name} + {dane_code} + + {type} + {code} + + +""".format( + model=model, + id="CO-" + str(dane_code), + name=row[m_fields['name']], + code="CO-" + str(row[m_fields['code']]), + dane_code=dane_code, + depto_id=depto_id, + type="localities", + parent="CO-" + row[m_fields['department']], + )) +municipalities_xml.write(""" + + +""" + ) +municipalities.close() +municipalities_xml.close() diff --git a/modules/account_co_co/doc/municipalities_colombia.csv b/modules/account_co_co/doc/municipalities_colombia.csv new file mode 100644 index 0000000..be6287a --- /dev/null +++ b/modules/account_co_co/doc/municipalities_colombia.csv @@ -0,0 +1,1115 @@ +code,name,department +001,Medellín,05 +002,Abejorral,05 +004,Abriaquí,05 +021,Alejandría,05 +030,Amagá,05 +031,Amalfi,05 +034,Andes,05 +036,Angelópolis,05 +038,Angostura,05 +040,Anorí,05 +042,Santafé de Antioquia,05 +044,Anza,05 +045,Apartadó,05 +051,Arboletes,05 +055,Argelia,05 +059,Armenia,05 +079,Barbosa,05 +086,Belmira,05 +088,Bello,05 +091,Betania,05 +093,Betulia,05 +101,Ciudad Bolívar,05 +107,Briceño,05 +113,Buriticá,05 +120,Cáceres,05 +125,Caicedo,05 +129,Caldas,05 +134,Campamento,05 +138,Cañasgordas,05 +142,Caracolí,05 +145,Caramanta,05 +147,Carepa,05 +148,El Carmen de Viboral,05 +150,Carolina,05 +154,Caucasia,05 +172,Chigorodó,05 +190,Cisneros,05 +197,Cocorná,05 +206,Concepción,05 +209,Concordia,05 +212,Copacabana,05 +234,Dabeiba,05 +237,Don Matías,05 +240,Ebéjico,05 +250,El Bagre,05 +264,Entrerrios,05 +266,Envigado,05 +282,Fredonia,05 +284,Frontino,05 +306,Giraldo,05 +308,Girardota,05 +310,Gómez Plata,05 +313,Granada,05 +315,Guadalupe,05 +318,Guarne,05 +321,Guatape,05 +347,Heliconia,05 +353,Hispania,05 +360,Itagui,05 +361,Ituango,05 +364,Jardín,05 +368,Jericó,05 +376,La Ceja,05 +380,La Estrella,05 +390,La Pintada,05 +400,La Unión,05 +411,Liborina,05 +425,Maceo,05 +440,Marinilla,05 +467,Montebello,05 +475,Murindó,05 +480,Mutatá,05 +483,Nariño,05 +490,Necoclí,05 +495,Nechí,05 +501,Olaya,05 +541,Peñol,05 +543,Peque,05 +576,Pueblorrico,05 +579,Puerto Berrío,05 +585,Puerto Nare,05 +591,Puerto Triunfo,05 +604,Remedios,05 +607,Retiro,05 +615,Rionegro,05 +628,Sabanalarga,05 +631,Sabaneta,05 +642,Salgar,05 +647,San Andrés de Cuerquía,05 +649,San Carlos,05 +652,San Francisco,05 +656,San Jerónimo,05 +658,San José de la Montaña,05 +659,San Juan de Urabá,05 +660,San Luis,05 +664,San Pedro,05 +665,San Pedro de Uraba,05 +667,San Rafael,05 +670,San Roque,05 +674,San Vicente,05 +679,Santa Bárbara,05 +686,Santa Rosa de Osos,05 +690,Santo Domingo,05 +697,El Santuario,05 +736,Segovia,05 +756,Sonson,05 +761,Sopetrán,05 +789,Támesis,05 +790,Tarazá,05 +792,Tarso,05 +809,Titiribí,05 +819,Toledo,05 +837,Turbo,05 +842,Uramita,05 +847,Urrao,05 +854,Valdivia,05 +856,Valparaíso,05 +858,Vegachí,05 +861,Venecia,05 +873,Vigía del Fuerte,05 +885,Yalí,05 +887,Yarumal,05 +890,Yolombó,05 +893,Yondó,05 +895,Zaragoza,05 +001,Barranquilla,08 +078,Baranoa,08 +137,Campo de la Cruz,08 +141,Candelaria,08 +296,Galapa,08 +372,Juan de Acosta,08 +421,Luruaco,08 +433,Malambo,08 +436,Manatí,08 +520,Palmar de Varela,08 +549,Piojó,08 +558,Polonuevo,08 +560,Ponedera,08 +573,Puerto Colombia,08 +606,Repelón,08 +634,Sabanagrande,08 +638,Sabanalarga,08 +675,Santa Lucía,08 +685,Santo Tomás,08 +758,Soledad,08 +770,Suan,08 +832,Tubará,08 +849,Usiacurí,08 +001,"Bogotá, D.C.",11 +001,Cartagena,13 +006,Achí,13 +030,Altos del Rosario,13 +042,Arenal,13 +052,Arjona,13 +062,Arroyohondo,13 +074,Barranco de Loba,13 +140,Calamar,13 +160,Cantagallo,13 +188,Cicuco,13 +212,Córdoba,13 +222,Clemencia,13 +244,El Carmen de Bolívar,13 +248,El Guamo,13 +268,El Peñón,13 +300,Hatillo de Loba,13 +430,Magangué,13 +433,Mahates,13 +440,Margarita,13 +442,María la Baja,13 +458,Montecristo,13 +468,Mompós,13 +473,Morales,13 +490,Norosí,13 +549,Pinillos,13 +580,Regidor,13 +600,Río Viejo,13 +620,San Cristóbal,13 +647,San Estanislao,13 +650,San Fernando,13 +654,San Jacinto,13 +655,San Jacinto del Cauca,13 +657,San Juan Nepomuceno,13 +667,San Martín de Loba,13 +670,San Pablo,13 +673,Santa Catalina,13 +683,Santa Rosa,13 +688,Santa Rosa del Sur,13 +744,Simití,13 +760,Soplaviento,13 +780,Talaigua Nuevo,13 +810,Tiquisio,13 +836,Turbaco,13 +838,Turbaná,13 +873,Villanueva,13 +894,Zambrano,13 +001,Tunja,15 +022,Almeida,15 +047,Aquitania,15 +051,Arcabuco,15 +087,Belén,15 +090,Berbeo,15 +092,Betéitiva,15 +097,Boavita,15 +104,Boyacá,15 +106,Briceño,15 +109,Buenavista,15 +114,Busbanzá,15 +131,Caldas,15 +135,Campohermoso,15 +162,Cerinza,15 +172,Chinavita,15 +176,Chiquinquirá,15 +180,Chiscas,15 +183,Chita,15 +185,Chitaraque,15 +187,Chivatá,15 +189,Ciénega,15 +204,Cómbita,15 +212,Coper,15 +215,Corrales,15 +218,Covarachía,15 +223,Cubará,15 +224,Cucaita,15 +226,Cuítiva,15 +232,Chíquiza,15 +236,Chivor,15 +238,Duitama,15 +244,El Cocuy,15 +248,El Espino,15 +272,Firavitoba,15 +276,Floresta,15 +293,Gachantivá,15 +296,Gameza,15 +299,Garagoa,15 +317,Guacamayas,15 +322,Guateque,15 +325,Guayatá,15 +332,Güicán,15 +362,Iza,15 +367,Jenesano,15 +368,Jericó,15 +377,Labranzagrande,15 +380,La Capilla,15 +401,La Victoria,15 +403,La Uvita,15 +407,Villa de Leyva,15 +425,Macanal,15 +442,Maripí,15 +455,Miraflores,15 +464,Mongua,15 +466,Monguí,15 +469,Moniquirá,15 +476,Motavita,15 +480,Muzo,15 +491,Nobsa,15 +494,Nuevo Colón,15 +500,Oicatá,15 +507,Otanche,15 +511,Pachavita,15 +514,Páez,15 +516,Paipa,15 +518,Pajarito,15 +522,Panqueba,15 +531,Pauna,15 +533,Paya,15 +537,Paz de Río,15 +542,Pesca,15 +550,Pisba,15 +572,Puerto Boyacá,15 +580,Quípama,15 +599,Ramiriquí,15 +600,Ráquira,15 +621,Rondón,15 +632,Saboyá,15 +638,Sáchica,15 +646,Samacá,15 +660,San Eduardo,15 +664,San José de Pare,15 +667,San Luis de Gaceno,15 +673,San Mateo,15 +676,San Miguel de Sema,15 +681,San Pablo de Borbur,15 +686,Santana,15 +690,Santa María,15 +693,Santa Rosa de Viterbo,15 +696,Santa Sofía,15 +720,Sativanorte,15 +723,Sativasur,15 +740,Siachoque,15 +753,Soatá,15 +755,Socotá,15 +757,Socha,15 +759,Sogamoso,15 +761,Somondoco,15 +762,Sora,15 +763,Sotaquirá,15 +764,Soracá,15 +774,Susacón,15 +776,Sutamarchán,15 +778,Sutatenza,15 +790,Tasco,15 +798,Tenza,15 +804,Tibaná,15 +806,Tibasosa,15 +808,Tinjacá,15 +810,Tipacoque,15 +814,Toca,15 +816,Togüí,15 +820,Tópaga,15 +822,Tota,15 +832,Tununguá,15 +835,Turmequé,15 +837,Tuta,15 +839,Tutazá,15 +842,Umbita,15 +861,Ventaquemada,15 +879,Viracachá,15 +897,Zetaquira,15 +001,Manizales,17 +013,Aguadas,17 +042,Anserma,17 +050,Aranzazu,17 +088,Belalcázar,17 +174,Chinchiná,17 +272,Filadelfia,17 +380,La Dorada,17 +388,La Merced,17 +433,Manzanares,17 +442,Marmato,17 +444,Marquetalia,17 +446,Marulanda,17 +486,Neira,17 +495,Norcasia,17 +513,Pácora,17 +524,Palestina,17 +541,Pensilvania,17 +614,Riosucio,17 +616,Risaralda,17 +653,Salamina,17 +662,Samaná,17 +665,San José,17 +777,Supía,17 +867,Victoria,17 +873,Villamaría,17 +877,Viterbo,17 +001,Florencia,18 +029,Albania,18 +094,Belén de los Andaquies,18 +150,Cartagena del Chairá,18 +205,Curillo,18 +247,El Doncello,18 +256,El Paujil,18 +410,La Montañita,18 +460,Milán,18 +479,Morelia,18 +592,Puerto Rico,18 +610,San José del Fragua,18 +753,San Vicente del Caguán,18 +756,Solano,18 +785,Solita,18 +860,Valparaíso,18 +001,Popayán,19 +022,Almaguer,19 +050,Argelia,19 +075,Balboa,19 +100,Bolívar,19 +110,Buenos Aires,19 +130,Cajibío,19 +137,Caldono,19 +142,Caloto,19 +212,Corinto,19 +256,El Tambo,19 +290,Florencia,19 +300,Guachené,19 +318,Guapi,19 +355,Inzá,19 +364,Jambaló,19 +392,La Sierra,19 +397,La Vega,19 +418,López,19 +450,Mercaderes,19 +455,Miranda,19 +473,Morales,19 +513,Padilla,19 +517,Paez,19 +532,Patía,19 +533,Piamonte,19 +548,Piendamó,19 +573,Puerto Tejada,19 +585,Puracé,19 +622,Rosas,19 +693,San Sebastián,19 +698,Santander de Quilichao,19 +701,Santa Rosa,19 +743,Silvia,19 +760,Sotara,19 +780,Suárez,19 +785,Sucre,19 +807,Timbío,19 +809,Timbiquí,19 +821,Toribio,19 +824,Totoró,19 +845,Villa Rica,19 +001,Valledupar,20 +011,Aguachica,20 +013,Agustín Codazzi,20 +032,Astrea,20 +045,Becerril,20 +060,Bosconia,20 +175,Chimichagua,20 +178,Chiriguaná,20 +228,Curumaní,20 +238,El Copey,20 +250,El Paso,20 +295,Gamarra,20 +310,González,20 +383,La Gloria,20 +400,La Jagua de Ibirico,20 +443,Manaure,20 +517,Pailitas,20 +550,Pelaya,20 +570,Pueblo Bello,20 +614,Río de Oro,20 +621,La Paz,20 +710,San Alberto,20 +750,San Diego,20 +770,San Martín,20 +787,Tamalameque,20 +001,Montería,23 +068,Ayapel,23 +079,Buenavista,23 +090,Canalete,23 +162,Cereté,23 +168,Chimá,23 +182,Chinú,23 +189,Ciénaga de Oro,23 +300,Cotorra,23 +350,La Apartada,23 +417,Lorica,23 +419,Los Córdobas,23 +464,Momil,23 +466,Montelíbano,23 +500,Moñitos,23 +555,Planeta Rica,23 +570,Pueblo Nuevo,23 +574,Puerto Escondido,23 +580,Puerto Libertador,23 +586,Purísima,23 +660,Sahagún,23 +670,San Andrés Sotavento,23 +672,San Antero,23 +675,San Bernardo del Viento,23 +678,San Carlos,23 +682,San José de Uré,23 +686,San Pelayo,23 +807,Tierralta,23 +815,Tuchín,23 +855,Valencia,23 +001,Agua de Dios,25 +019,Albán,25 +035,Anapoima,25 +040,Anolaima,25 +053,Arbeláez,25 +086,Beltrán,25 +095,Bituima,25 +099,Bojacá,25 +120,Cabrera,25 +123,Cachipay,25 +126,Cajicá,25 +148,Caparrapí,25 +151,Caqueza,25 +154,Carmen de Carupa,25 +168,Chaguaní,25 +175,Chía,25 +178,Chipaque,25 +181,Choachí,25 +183,Chocontá,25 +200,Cogua,25 +214,Cota,25 +224,Cucunubá,25 +245,El Colegio,25 +258,El Peñón,25 +260,El Rosal,25 +269,Facatativá,25 +279,Fomeque,25 +281,Fosca,25 +286,Funza,25 +288,Fúquene,25 +290,Fusagasugá,25 +293,Gachala,25 +295,Gachancipá,25 +297,Gachetá,25 +299,Gama,25 +307,Girardot,25 +312,Granada,25 +317,Guachetá,25 +320,Guaduas,25 +322,Guasca,25 +324,Guataquí,25 +326,Guatavita,25 +328,Guayabal de Siquima,25 +335,Guayabetal,25 +339,Gutiérrez,25 +368,Jerusalén,25 +372,Junín,25 +377,La Calera,25 +386,La Mesa,25 +394,La Palma,25 +398,La Peña,25 +402,La Vega,25 +407,Lenguazaque,25 +426,Macheta,25 +430,Madrid,25 +436,Manta,25 +438,Medina,25 +473,Mosquera,25 +483,Nariño,25 +486,Nemocón,25 +488,Nilo,25 +489,Nimaima,25 +491,Nocaima,25 +506,Venecia,25 +513,Pacho,25 +518,Paime,25 +524,Pandi,25 +530,Paratebueno,25 +535,Pasca,25 +572,Puerto Salgar,25 +580,Pulí,25 +592,Quebradanegra,25 +594,Quetame,25 +596,Quipile,25 +599,Apulo,25 +612,Ricaurte,25 +645,San Antonio del Tequendama,25 +649,San Bernardo,25 +653,San Cayetano,25 +658,San Francisco,25 +662,San Juan de Río Seco,25 +718,Sasaima,25 +736,Sesquilé,25 +740,Sibaté,25 +743,Silvania,25 +745,Simijaca,25 +754,Soacha,25 +758,Sopó,25 +769,Subachoque,25 +772,Suesca,25 +777,Supatá,25 +779,Susa,25 +781,Sutatausa,25 +785,Tabio,25 +793,Tausa,25 +797,Tena,25 +799,Tenjo,25 +805,Tibacuy,25 +807,Tibirita,25 +815,Tocaima,25 +817,Tocancipá,25 +823,Topaipí,25 +839,Ubalá,25 +841,Ubaque,25 +843,Villa de San Diego de Ubate,25 +845,Une,25 +851,Útica,25 +862,Vergara,25 +867,Vianí,25 +871,Villagómez,25 +873,Villapinzón,25 +875,Villeta,25 +878,Viotá,25 +885,Yacopí,25 +898,Zipacón,25 +899,Zipaquirá,25 +001,Quibdó,27 +006,Acandí,27 +025,Alto Baudo,27 +050,Atrato,27 +073,Bagadó,27 +075,Bahía Solano,27 +077,Bajo Baudó,27 +086,Belén de Bajirá,27 +099,Bojaya,27 +135,El Cantón del San Pablo,27 +150,Carmen del Darien,27 +160,Cértegui,27 +205,Condoto,27 +245,El Carmen de Atrato,27 +250,El Litoral del San Juan,27 +361,Istmina,27 +372,Juradó,27 +413,Lloró,27 +425,Medio Atrato,27 +430,Medio Baudó,27 +450,Medio San Juan,27 +491,Nóvita,27 +495,Nuquí,27 +580,Río Iro,27 +600,Río Quito,27 +615,Riosucio,27 +660,San José del Palmar,27 +745,Sipí,27 +787,Tadó,27 +800,Unguía,27 +810,Unión Panamericana,27 +001,Neiva,41 +006,Acevedo,41 +013,Agrado,41 +016,Aipe,41 +020,Algeciras,41 +026,Altamira,41 +078,Baraya,41 +132,Campoalegre,41 +206,Colombia,41 +244,Elías,41 +298,Garzón,41 +306,Gigante,41 +319,Guadalupe,41 +349,Hobo,41 +357,Iquira,41 +359,Isnos,41 +378,La Argentina,41 +396,La Plata,41 +483,Nátaga,41 +503,Oporapa,41 +518,Paicol,41 +524,Palermo,41 +530,Palestina,41 +548,Pital,41 +551,Pitalito,41 +615,Rivera,41 +660,Saladoblanco,41 +668,San Agustín,41 +676,Santa María,41 +770,Suaza,41 +791,Tarqui,41 +797,Tesalia,41 +799,Tello,41 +801,Teruel,41 +807,Timaná,41 +872,Villavieja,41 +885,Yaguará,41 +001,Riohacha,44 +035,Albania,44 +078,Barrancas,44 +090,Dibulla,44 +098,Distracción,44 +110,El Molino,44 +279,Fonseca,44 +378,Hatonuevo,44 +420,La Jagua del Pilar,44 +430,Maicao,44 +560,Manaure,44 +650,San Juan del Cesar,44 +847,Uribia,44 +855,Urumita,44 +874,Villanueva,44 +001,Santa Marta,47 +030,Algarrobo,47 +053,Aracataca,47 +058,Ariguaní,47 +161,Cerro San Antonio,47 +170,Chibolo,47 +189,Ciénaga,47 +205,Concordia,47 +245,El Banco,47 +258,El Piñon,47 +268,El Retén,47 +288,Fundación,47 +318,Guamal,47 +460,Nueva Granada,47 +541,Pedraza,47 +545,Pijiño del Carmen,47 +551,Pivijay,47 +555,Plato,47 +570,Puebloviejo,47 +605,Remolino,47 +660,Sabanas de San Angel,47 +675,Salamina,47 +692,San Sebastián de Buenavista,47 +703,San Zenón,47 +707,Santa Ana,47 +720,Santa Bárbara de Pinto,47 +745,Sitionuevo,47 +798,Tenerife,47 +960,Zapayán,47 +980,Zona Bananera,47 +001,Villavicencio,50 +006,Acacías,50 +110,Barranca de Upía,50 +124,Cabuyaro,50 +150,Castilla la Nueva,50 +223,Cubarral,50 +226,Cumaral,50 +245,El Calvario,50 +251,El Castillo,50 +270,El Dorado,50 +287,Fuente de Oro,50 +313,Granada,50 +318,Guamal,50 +325,Mapiripán,50 +330,Mesetas,50 +350,La Macarena,50 +370,Uribe,50 +400,Lejanías,50 +450,Puerto Concordia,50 +568,Puerto Gaitán,50 +573,Puerto López,50 +577,Puerto Lleras,50 +590,Puerto Rico,50 +606,Restrepo,50 +680,San Carlos de Guaroa,50 +683,San Juan de Arama,50 +686,San Juanito,50 +689,San Martín,50 +711,Vistahermosa,50 +001,Pasto,52 +019,Albán,52 +022,Aldana,52 +036,Ancuyá,52 +051,Arboleda,52 +079,Barbacoas,52 +083,Belén,52 +110,Buesaco,52 +203,Colón,52 +207,Consaca,52 +210,Contadero,52 +215,Córdoba,52 +224,Cuaspud,52 +227,Cumbal,52 +233,Cumbitara,52 +240,Chachagüí,52 +250,El Charco,52 +254,El Peñol,52 +256,El Rosario,52 +258,El Tablón de Gómez,52 +260,El Tambo,52 +287,Funes,52 +317,Guachucal,52 +320,Guaitarilla,52 +323,Gualmatán,52 +352,Iles,52 +354,Imués,52 +356,Ipiales,52 +378,La Cruz,52 +381,La Florida,52 +385,La Llanada,52 +390,La Tola,52 +399,La Unión,52 +405,Leiva,52 +411,Linares,52 +418,Los Andes,52 +427,Magüi,52 +435,Mallama,52 +473,Mosquera,52 +480,Nariño,52 +490,Olaya Herrera,52 +506,Ospina,52 +520,Francisco Pizarro,52 +540,Policarpa,52 +560,Potosí,52 +565,Providencia,52 +573,Puerres,52 +585,Pupiales,52 +612,Ricaurte,52 +621,Roberto Payán,52 +678,Samaniego,52 +683,Sandoná,52 +685,San Bernardo,52 +687,San Lorenzo,52 +693,San Pablo,52 +694,San Pedro de Cartago,52 +696,Santa Bárbara,52 +699,Santacruz,52 +720,Sapuyes,52 +786,Taminango,52 +788,Tangua,52 +835,San Andres de Tumaco,52 +838,Túquerres,52 +885,Yacuanquer,52 +001,Cúcuta,54 +003,Abrego,54 +051,Arboledas,54 +099,Bochalema,54 +109,Bucarasica,54 +125,Cácota,54 +128,Cachirá,54 +172,Chinácota,54 +174,Chitagá,54 +206,Convención,54 +223,Cucutilla,54 +239,Durania,54 +245,El Carmen,54 +250,El Tarra,54 +261,El Zulia,54 +313,Gramalote,54 +344,Hacarí,54 +347,Herrán,54 +377,Labateca,54 +385,La Esperanza,54 +398,La Playa,54 +405,Los Patios,54 +418,Lourdes,54 +480,Mutiscua,54 +498,Ocaña,54 +518,Pamplona,54 +520,Pamplonita,54 +553,Puerto Santander,54 +599,Ragonvalia,54 +660,Salazar,54 +670,San Calixto,54 +673,San Cayetano,54 +680,Santiago,54 +720,Sardinata,54 +743,Silos,54 +800,Teorama,54 +810,Tibú,54 +820,Toledo,54 +871,Villa Caro,54 +874,Villa del Rosario,54 +001,Armenia,63 +111,Buenavista,63 +130,Calarca,63 +190,Circasia,63 +212,Córdoba,63 +272,Filandia,63 +302,Génova,63 +401,La Tebaida,63 +470,Montenegro,63 +548,Pijao,63 +594,Quimbaya,63 +690,Salento,63 +001,Pereira,66 +045,Apía,66 +075,Balboa,66 +088,Belén de Umbría,66 +170,Dosquebradas,66 +318,Guática,66 +383,La Celia,66 +400,La Virginia,66 +440,Marsella,66 +456,Mistrató,66 +572,Pueblo Rico,66 +594,Quinchía,66 +682,Santa Rosa de Cabal,66 +687,Santuario,66 +001,Bucaramanga,68 +013,Aguada,68 +020,Albania,68 +051,Aratoca,68 +077,Barbosa,68 +079,Barichara,68 +081,Barrancabermeja,68 +092,Betulia,68 +101,Bolívar,68 +121,Cabrera,68 +132,California,68 +147,Capitanejo,68 +152,Carcasí,68 +160,Cepitá,68 +162,Cerrito,68 +167,Charalá,68 +169,Charta,68 +176,Chima,68 +179,Chipatá,68 +190,Cimitarra,68 +207,Concepción,68 +209,Confines,68 +211,Contratación,68 +217,Coromoro,68 +229,Curití,68 +235,El Carmen de Chucurí,68 +245,El Guacamayo,68 +250,El Peñón,68 +255,El Playón,68 +264,Encino,68 +266,Enciso,68 +271,Florián,68 +276,Floridablanca,68 +296,Galán,68 +298,Gambita,68 +307,Girón,68 +318,Guaca,68 +320,Guadalupe,68 +322,Guapotá,68 +324,Guavatá,68 +327,Güepsa,68 +344,Hato,68 +368,Jesús María,68 +370,Jordán,68 +377,La Belleza,68 +385,Landázuri,68 +397,La Paz,68 +406,Lebríja,68 +418,Los Santos,68 +425,Macaravita,68 +432,Málaga,68 +444,Matanza,68 +464,Mogotes,68 +468,Molagavita,68 +498,Ocamonte,68 +500,Oiba,68 +502,Onzaga,68 +522,Palmar,68 +524,Palmas del Socorro,68 +533,Páramo,68 +547,Piedecuesta,68 +549,Pinchote,68 +572,Puente Nacional,68 +573,Puerto Parra,68 +575,Puerto Wilches,68 +615,Rionegro,68 +655,Sabana de Torres,68 +669,San Andrés,68 +673,San Benito,68 +679,San Gil,68 +682,San Joaquín,68 +684,San José de Miranda,68 +686,San Miguel,68 +689,San Vicente de Chucurí,68 +705,Santa Bárbara,68 +720,Santa Helena del Opón,68 +745,Simacota,68 +755,Socorro,68 +770,Suaita,68 +773,Sucre,68 +780,Suratá,68 +820,Tona,68 +855,Valle de San José,68 +861,Vélez,68 +867,Vetas,68 +872,Villanueva,68 +895,Zapatoca,68 +001,Sincelejo,70 +110,Buenavista,70 +124,Caimito,70 +204,Coloso,70 +215,Corozal,70 +221,Coveñas,70 +230,Chalán,70 +233,El Roble,70 +235,Galeras,70 +265,Guaranda,70 +400,La Unión,70 +418,Los Palmitos,70 +429,Majagual,70 +473,Morroa,70 +508,Ovejas,70 +523,Palmito,70 +670,Sampués,70 +678,San Benito Abad,70 +702,San Juan de Betulia,70 +708,San Marcos,70 +713,San Onofre,70 +717,San Pedro,70 +742,San Luis de Sincé,70 +771,Sucre,70 +820,Santiago de Tolú,70 +823,Tolú Viejo,70 +001,Ibagué,73 +024,Alpujarra,73 +026,Alvarado,73 +030,Ambalema,73 +043,Anzoátegui,73 +055,Armero,73 +067,Ataco,73 +124,Cajamarca,73 +148,Carmen de Apicalá,73 +152,Casabianca,73 +168,Chaparral,73 +200,Coello,73 +217,Coyaima,73 +226,Cunday,73 +236,Dolores,73 +268,Espinal,73 +270,Falan,73 +275,Flandes,73 +283,Fresno,73 +319,Guamo,73 +347,Herveo,73 +349,Honda,73 +352,Icononzo,73 +408,Lérida,73 +411,Líbano,73 +443,Mariquita,73 +449,Melgar,73 +461,Murillo,73 +483,Natagaima,73 +504,Ortega,73 +520,Palocabildo,73 +547,Piedras,73 +555,Planadas,73 +563,Prado,73 +585,Purificación,73 +616,Rioblanco,73 +622,Roncesvalles,73 +624,Rovira,73 +671,Saldaña,73 +675,San Antonio,73 +678,San Luis,73 +686,Santa Isabel,73 +770,Suárez,73 +854,Valle de San Juan,73 +861,Venadillo,73 +870,Villahermosa,73 +873,Villarrica,73 +001,Cali,76 +020,Alcalá,76 +036,Andalucía,76 +041,Ansermanuevo,76 +054,Argelia,76 +100,Bolívar,76 +109,Buenaventura,76 +111,Guadalajara de Buga,76 +113,Bugalagrande,76 +122,Caicedonia,76 +126,Calima,76 +130,Candelaria,76 +147,Cartago,76 +233,Dagua,76 +243,El Águila,76 +246,El Cairo,76 +248,El Cerrito,76 +250,El Dovio,76 +275,Florida,76 +306,Ginebra,76 +318,Guacarí,76 +364,Jamundí,76 +377,La Cumbre,76 +400,La Unión,76 +403,La Victoria,76 +497,Obando,76 +520,Palmira,76 +563,Pradera,76 +606,Restrepo,76 +616,Riofrío,76 +622,Roldanillo,76 +670,San Pedro,76 +736,Sevilla,76 +823,Toro,76 +828,Trujillo,76 +834,Tuluá,76 +845,Ulloa,76 +863,Versalles,76 +869,Vijes,76 +890,Yotoco,76 +892,Yumbo,76 +895,Zarzal,76 +001,Arauca,81 +065,Arauquita,81 +220,Cravo Norte,81 +300,Fortul,81 +591,Puerto Rondón,81 +736,Saravena,81 +794,Tame,81 +001,Yopal,85 +010,Aguazul,85 +015,Chameza,85 +125,Hato Corozal,85 +136,La Salina,85 +139,Maní,85 +162,Monterrey,85 +225,Nunchía,85 +230,Orocué,85 +250,Paz de Ariporo,85 +263,Pore,85 +279,Recetor,85 +300,Sabanalarga,85 +315,Sácama,85 +325,San Luis de Palenque,85 +400,Támara,85 +410,Tauramena,85 +430,Trinidad,85 +440,Villanueva,85 +001,Mocoa,86 +219,Colón,86 +320,Orito,86 +568,Puerto Asís,86 +569,Puerto Caicedo,86 +571,Puerto Guzmán,86 +573,Leguízamo,86 +749,Sibundoy,86 +755,San Francisco,86 +757,San Miguel,86 +760,Santiago,86 +865,Valle del Guamuez,86 +885,Villagarzón,86 +001,San Andrés,88 +564,Providencia,88 +001,Leticia,91 +263,El Encanto,91 +405,La Chorrera,91 +407,La Pedrera,91 +430,La Victoria,91 +460,Miriti - Paraná,91 +530,Puerto Alegría,91 +536,Puerto Arica,91 +540,Puerto Nariño,91 +669,Puerto Santander,91 +798,Tarapacá,91 +001,Inírida,94 +343,Barranco Minas,94 +663,Mapiripana,94 +001,San José del Guaviare,95 +015,Calamar,95 +025,El Retorno,95 +200,Miraflores,95 +001,Mitú,97 +161,Caruru,97 +666,Taraira,97 +001,Puerto Carreño,99 +524,La Primavera,99 +624,Santa Rosalía,99 +773,Cumaribo,99 diff --git a/modules/account_co_co/doc/municipalities_csv_to_xml.py b/modules/account_co_co/doc/municipalities_csv_to_xml.py new file mode 100644 index 0000000..a7a2c0a --- /dev/null +++ b/modules/account_co_co/doc/municipalities_csv_to_xml.py @@ -0,0 +1,61 @@ +""" +Convierte el archivo municipios_colombia.csv y departamentos_colombia.csv +en municipios_colombia.xml +""" + +import csv +model = 'country.subdivision' +municipalities = open('municipalities_colombia.csv', 'r') +subdivisions = open('subdivisions_colombia.csv', 'r') + +municipalities_xml = open('municipalities_colombia.xml', 'w') + +municipalities_reader = csv.reader(municipalities) +subdivisions_reader = csv.reader(subdivisions) +subdivisions_header = next(subdivisions_reader) +d_fields = {subdivisions_header[x]: x for x in range( + 0, len(subdivisions_header))} + +Subdivisions = {} +for subdivision in subdivisions_reader: + dane_code = int(subdivision[d_fields['DANE']]) + Subdivisions[dane_code] = dict(zip(list(d_fields.keys()), subdivision)) +subdivisions.close() + +municipalities_header = next(municipalities_reader) +m_fields = {municipalities_header[x]: x for x in range( + 0, len(municipalities_header))} + + +municipalities_xml.write(""" + + +""") +for row in municipalities_reader: + dane_code = row[m_fields['department']] + row[m_fields['code']] + depto_id = "CO-" + Subdivisions[int(row[m_fields['department']])]['DANE'] + municipalities_xml.write(""" + + {name} + {dane_code} + + {type} + {code} + + """.format( + model=model, + id="CO-" + str(dane_code), + name=row[m_fields['name']], + code="CO-" + str(dane_code), + dane_code=dane_code, + depto_id=depto_id, + type="municipality", + parent="CO-" + row[m_fields['department']] + )) +municipalities_xml.write(""" + + +""" +) +municipalities.close() +municipalities_xml.close() diff --git a/modules/account_co_co/doc/subdivisions_colombia.csv b/modules/account_co_co/doc/subdivisions_colombia.csv new file mode 100644 index 0000000..193ead6 --- /dev/null +++ b/modules/account_co_co/doc/subdivisions_colombia.csv @@ -0,0 +1,34 @@ +Department,HASC,ISO,FIPS,NUTE,DANE,Dane #,Iso-country,Type,Population,Area(km.²),Area(mi.²),Capital +Amazonas,CO.AM,AMA,CO01,20491,91,91,co-91,department,"46,95","109,665","42,342",Leticia +Antioquia,CO.AN,ANT,CO02,20505,05,05,co-5,department,"5,601,507","63,612","24,561",Medellín +Arauca,CO.AR,ARA,CO03,20781,81,81,co-81,department,"153,028","23,818","9,196",Arauca +Atlántico,CO.AT,ATL,CO04,20208,08,08,co-8,department,"2,112,001","3,388","1,308",Barranquilla +Bolívar,CO.BL,BOL,CO35,20213,13,13,co-13,department,"1,836,640","25,978","10,03",Cartagena +Boyacá,CO.BY,BOY,CO36,20615,15,15,co-15,department,"1,210,982","23,189","8,953",Tunja +Caldas,CO.CL,CAL,CO37,20617,17,17,co-17,department,"898,49","7,888","3,046",Manizales +Caquetá,CO.CQ,CAQ,CO08,20418,18,18,co-18,department,"337,932","88,965","34,35",Florencia +Casanare,CO.CS,CAS,CO32,20785,85,85,co-85,department,"281,294","44,64","17,236",Yopal +Cauca,CO.CA,CAU,CO09,20319,19,19,co-19,department,"1,182,022","29,308","11,316",Popayán +Cesar,CO.CE,CES,CO10,20220,20,20,co-20,department,"878,437","22,905","8,844",Valledupar +Chocó,CO.CH,CHO,CO11,20327,27,27,co-27,department,"388,476","46,53","17,965",Quibdó +Córdoba,CO.CO,COR,CO12,20223,23,23,co-23,department,"1,462,909","25,02","9,66",Montería +Cundinamarca,CO.CU,CUN,CO33,20625,25,25,co-25,department,"2,228,682","22,478","8,679",Bogotá +Bogotá,CO.DC,DC,CO34,20111,11,11,co-11,capital district,"6,778,691","1,732",669,Bogotá +Guainía,CO.GN,GUA,CO15,20494,94,94,co-94,department,"18,797","72,238","27,891",Puerto Inírida +Guaviare,CO.GV,GUV,CO14,20495,95,95,co-95,department,"56,758","42,327","16,343",San José del Guaviare +Huila,CO.HU,HUI,CO16,20641,41,41,co-41,department,"1,001,476","19,89","7,68",Neiva +La Guajira,CO.LG,LAG,CO17,20244,44,44,co-44,department,"655,943","20,848","8,049",Riohacha +Magdalena,CO.MA,MAG,CO38,20247,47,47,co-47,department,"1,136,819","23,188","8,953",Santa Marta +Meta,CO.ME,MET,CO19,20750,50,50,co-50,department,"713,772","85,635","33,064",Villavicencio +Nariño,CO.NA,NAR,CO20,20352,52,52,co-52,department,"1,498,234","33,268","12,845",Pasto +Norte de Santander,CO.NS,NSA,CO21,20554,54,54,co-54,department,"1,208,336","21,658","8,362",Cúcuta +Putumayo,CO.PU,PUT,CO22,20486,86,86,co-86,department,"237,197","24,885","9,608",Mocoa +Quindío,CO.QD,QUI,CO23,20663,63,63,co-63,department,"518,691","1,845",712,Armenia +Risaralda,CO.RI,RIS,CO24,20666,66,66,co-66,department,"859,666","4,14","1,598",Pereira +San Andrés y Providencia,CO.SA,SAP,CO25,20288,88,88,co-88,department,"59,573",44,17,San Andrés +Santander,CO.ST,SAN,CO26,20568,68,68,co-68,department,"1,913,444","30,537","11,79",Bucaramanga +Sucre,CO.SU,SUC,CO27,20270,70,70,co-70,department,"762,263","10,917","4,215",Sincelejo +Tolima,CO.TO,TOL,CO28,20673,73,73,co-73,department,"1,312,304","23,562","9,097",Ibagué +Valle del Cauca,CO.VC,VAC,CO29,20376,76,76,co-76,department,"4,052,535","22,14","8,548",Cali +Vaupés,CO.VP,VAU,CO30,20497,97,97,co-97,department,"19,943","65,268","25,2",Mitú +Vichada,CO.VD,VID,CO31,20799,99,99,co-99,department,"44,592","100,242","38,704",Puerto Carreño diff --git a/modules/account_co_co/doc/subdivisions_csv_to_xml.py b/modules/account_co_co/doc/subdivisions_csv_to_xml.py new file mode 100644 index 0000000..230da95 --- /dev/null +++ b/modules/account_co_co/doc/subdivisions_csv_to_xml.py @@ -0,0 +1,56 @@ +""" +Convierte el archivo departamentos_colombia.csv +en subdivisions_colombia.xml +""" + +import csv + +model = 'country.subdivision' +subdivisions = open('subdivisions_colombia.csv', 'r') + +subdivisions_xml = open('subdivisions_colombia.xml', 'w') + +subdivisions_reader = csv.reader(subdivisions) +subdivisions_header = next(subdivisions_reader) +d_fields = {subdivisions_header[x]: x for x in range( + 0, len(subdivisions_header))} + +Subdivisions = {} + +subdivisions_xml.write(''' + + +''') +subdivisions_xml.write(''' + Colombia + CO + COL + 170 + +''') + + +for row in subdivisions_reader: + dane_code = row[d_fields['DANE']] + country_id = "50" + subdivisions_xml.write(''' + {name} + {types} + + {code} + {dane_code} + +'''.format( + model=model, + id="CO-" + str(dane_code), + name=row[d_fields['Department']], + types=row[d_fields['Type']], + code="CO-" + str(dane_code), + dane_code=dane_code + )) +subdivisions_xml.write(""" + +""" +) +subdivisions.close() +subdivisions_xml.close() diff --git a/modules/account_co_co/doc/tipo_responsabilidad.csv b/modules/account_co_co/doc/tipo_responsabilidad.csv new file mode 100644 index 0000000..35830a4 --- /dev/null +++ b/modules/account_co_co/doc/tipo_responsabilidad.csv @@ -0,0 +1,115 @@ +"Código","Significado" +"O-07","Retención en la fuente a título de renta" +"O-08","Retención timbre nacional" +"O-09","Retención en la fuente en el impuesto sobre las ventas" +"O-13","Gran contribuyente" +"O-14","Informante de exógena" +"O-15","Autorretenedor" +"O-16","Obligación de facturar por ingresos de bienes y/o servicios excluidos" +"O-17","Profesionales de compra y venta de divisas" +"O-19","Productor y/o exportador de bienes exentos" +"O-22","Obligado a cumplir deberes formales a nombre de terceros" +"O-23","Agente de retención en el impuesto sobre las ventas" +"O-32","Impuesto Nacional a la Gasolina y al ACPM" +"O-33","Impuesto Nacional al consumo" +"O-34","Régimen simplificado impuesto nacional consumo rest y bares" +"O-36","Establecimiento Permanente" +"O-37","Obligado a Facturar Electrónicamente Modelo 2242" +"O-38","Facturación Electrónica Voluntaria Modelo 2242" +"O-39","Proveedor de Servicios Tecnológicos PST Modelo 2242" +"O-47","Régimen Simple de Tributación – SIMPLE" +"O-48","Impuesto sobre las ventas – IVA" +"O-49","No responsable de IVA" +"O-52","Facturador electrónico" +"O-99","Otro tipo de obligado" +"R-00-PN","Clientes del Exterior" +"R-12-PN","Factor PN" +"R-16-PN","Mandatario" +"R-25-PN","Agente Interventor" +"R-99-PN","No responsable" +"R-06-PJ","Apoderado especial" +"R-07-PJ","Apoderado general" +"R-12-PJ","Factor" +"R-16-PJ","Mandatario" +"R-99-PJ","Otro tipo de responsable" +"A-01","Agente de carga internacional" +"A-02","Agente marítimo" +"A-03","Almacén general de depósito" +"A-04","Comercializadora internacional (C.I.)" +"A-05","Comerciante de la zona aduanera especial de Inírida, Puerto Carreño, Cumaribo y Primavera" +"A-06","Comerciantes de la zona de régimen aduanero especial de Leticia" +"A-07","Comerciantes de la zona de régimen aduanero especial de Maicao, Uribia y Manaure" +"A-08","Comerciantes de la zona de régimen aduanero especial de Urabá, Tumaco y Guapí" +"A-09","Comerciantes del puerto libre de San Andrés, Providencia y Santa Catalina" +"A-10","Depósito público de apoyo logístico internacional" +"A-11","Depósito privado para procesamiento industrial" +"A-12","Depósito privado de transformación o ensamble" +"A-13","Depósito franco" +"A-14","Depósito privado aeronáutico" +"A-15","Depósito privado para distribución internacional" +"A-16","Depósito privado de provisiones de a bordo para consumo y para llevar" +"A-17","Depósito privado para envíos urgentes" +"A-18","Depósito privado" +"A-19","Depósito público" +"A-20","Depósito público para distribución internacional" +"A-21","Exportador de café" +"A-22","Exportador" +"A-23","Importador" +"A-24","Intermediario de tráfico postal y envíos urgentes" +"A-25","Operador de transporte multimodal" +"A-26","Sociedad de intermediación aduanera" +"A-27","Titular de puertos y muelles de servicio público o privado" +"A-28","Transportador 263nfor régimen de importación y/o exportación" +"A-29","Transportista nacional para operaciones del régimen de tránsito aduanero" +"A-30","Usuario comercial zona franca" +"A-32","Usuario industrial de bienes zona franca" +"A-34","Usuario industrial de servicios zona franca" +"A-36","Usuario operador de zona franca" +"A-37","Usuario aduanero permanente" +"A-38","Usuario altamente exportador" +"A-39","Usuario de zonas económicas especiales de exportación" +"A-40","Deposito privado de instalaciones industriales" +"A-41","Beneficiarios de programas especiales de exportación PEX" +"A-42","Depósitos privados para mercancías en tránsito San Andrés" +"A-43","Observadores de las operaciones de importación" +"A-44","Usuarios sistemas especiales Importación exportación" +"A-46","Transportador 263nformac régimen de importación y/o exportación" +"A-47","Transportador terrestre régimen de importación y/o exportación" +"A-48","Aeropuerto de servicio publico o privado" +"A-49","Transportador fluvial régimen de importación" +"A-50","Usuario industrial zona franca especial" +"A-53","Agencias de aduanas 1" +"A-54","Usuario Operador Zona Franca Especial" +"A-55","Agencias de aduanas 2" +"A-56","Agencias de aduanas 3" +"A-57","Agencias de aduanas 4" +"A-58","Transportador aéreo nacional" +"A-60","Transportador aéreo, marítimo o fluvial modalidad Cabotaje" +"A-61","Importador de alimentos de consumo humano y animal" +"A-62","Importador Ocasional" +"A-63","Importador de maquinaría y sus partes Decreto 2261 de 2012" +"A-64","Beneficiario Programa de Fomento Industria Automotriz-PROFIA" +"A-99","Otro tipo de agente aduanero" +"E-01","Agencia" +"E-02","Establecimiento de comercio" +"E-03","Centro de explotación agrícola" +"E-04","Centro de explotación animal" +"E-05","Centro de explotación minera" +"E-06","Centro de explotación de transformación" +"E-07","Centro de explotación de servicios" +"E-08","Oficina" +"E-09","Sede" +"E-10","Sucursal" +"E-11","Consultorio" +"E-12","Administraciones" +"E-13","Seccionales" +"E-14","Regionales" +"E-15","Intendencias" +"E-16","Local o negocio" +"E-17","Punto de venta" +"E-18","Fábrica" +"E-19","Taller" +"E-20","Cantera" +"E-21","Pozo de Petróleo y Gas" +"E-22","Otro lug de tipo de extrac explotación de recursos naturales" +"E-99","Otro tipo de establecimiento" diff --git a/modules/account_co_co/doc/tipo_responsabilidad.py b/modules/account_co_co/doc/tipo_responsabilidad.py new file mode 100644 index 0000000..a5dc531 --- /dev/null +++ b/modules/account_co_co/doc/tipo_responsabilidad.py @@ -0,0 +1,42 @@ +""" +Convierte el archivo departamentos_colombia.csv +en subdivisions_colombia.xml +""" + +import csv + +model = 'party.tax_level_code' +tipo_responsabilidad = open('tipo_responsabilidad.csv', 'r') + +tipo_responsabilidad_xml = open('tipo_responsabilidad.xml', 'w') + +tipo_responsabilidad_reader = csv.reader(tipo_responsabilidad) +tipo_responsabilidad_header = next(tipo_responsabilidad_reader) +d_fields = {tipo_responsabilidad_header[x]: x for x in range( + 0, len(tipo_responsabilidad_header))} + +TipoResponsabilidad = {} + +tipo_responsabilidad_xml.write(''' + + +''') + + +for row in tipo_responsabilidad_reader: + tipo_responsabilidad_xml.write(''' + {name} + {code} + +'''.format( + model=model, + id=row[d_fields['Código']], + name=row[d_fields['Significado']], + code=row[d_fields['Código']] + )) +tipo_responsabilidad_xml.write(""" + +""" +) +tipo_responsabilidad.close() +tipo_responsabilidad_xml.close() diff --git a/modules/account_co_co/doc/tipo_responsabilidad.xml b/modules/account_co_co/doc/tipo_responsabilidad.xml new file mode 100644 index 0000000..7ca8cf7 --- /dev/null +++ b/modules/account_co_co/doc/tipo_responsabilidad.xml @@ -0,0 +1,461 @@ + + + + + Retención en la fuente a título de renta + O-07 + + + Retención timbre nacional + O-08 + + + Retención en la fuente en el impuesto sobre las ventas + O-09 + + + Gran contribuyente + O-13 + + + Informante de exógena + O-14 + + + Autorretenedor + O-15 + + + Obligación de facturar por ingresos de bienes y/o servicios excluidos + O-16 + + + Profesionales de compra y venta de divisas + O-17 + + + Productor y/o exportador de bienes exentos + O-19 + + + Obligado a cumplir deberes formales a nombre de terceros + O-22 + + + Agente de retención en el impuesto sobre las ventas + O-23 + + + Impuesto Nacional a la Gasolina y al ACPM + O-32 + + + Impuesto Nacional al consumo + O-33 + + + Régimen simplificado impuesto nacional consumo rest y bares + O-34 + + + Establecimiento Permanente + O-36 + + + Obligado a Facturar Electrónicamente Modelo 2242 + O-37 + + + Facturación Electrónica Voluntaria Modelo 2242 + O-38 + + + Proveedor de Servicios Tecnológicos PST Modelo 2242 + O-39 + + + Régimen Simple de Tributación – SIMPLE + O-47 + + + Impuesto sobre las ventas – IVA + O-48 + + + No responsable de IVA + O-49 + + + Facturador electrónico + O-52 + + + Otro tipo de obligado + O-99 + + + Clientes del Exterior + R-00-PN + + + Factor PN + R-12-PN + + + Mandatario + R-16-PN + + + Agente Interventor + R-25-PN + + + No responsable + R-99-PN + + + Apoderado especial + R-06-PJ + + + Apoderado general + R-07-PJ + + + Factor + R-12-PJ + + + Mandatario + R-16-PJ + + + Otro tipo de responsable + R-99-PJ + + + Agente de carga internacional + A-01 + + + Agente marítimo + A-02 + + + Almacén general de depósito + A-03 + + + Comercializadora internacional (C.I.) + A-04 + + + Comerciante de la zona aduanera especial de Inírida, Puerto Carreño, Cumaribo y Primavera + A-05 + + + Comerciantes de la zona de régimen aduanero especial de Leticia + A-06 + + + Comerciantes de la zona de régimen aduanero especial de Maicao, Uribia y Manaure + A-07 + + + Comerciantes de la zona de régimen aduanero especial de Urabá, Tumaco y Guapí + A-08 + + + Comerciantes del puerto libre de San Andrés, Providencia y Santa Catalina + A-09 + + + Depósito público de apoyo logístico internacional + A-10 + + + Depósito privado para procesamiento industrial + A-11 + + + Depósito privado de transformación o ensamble + A-12 + + + Depósito franco + A-13 + + + Depósito privado aeronáutico + A-14 + + + Depósito privado para distribución internacional + A-15 + + + Depósito privado de provisiones de a bordo para consumo y para llevar + A-16 + + + Depósito privado para envíos urgentes + A-17 + + + Depósito privado + A-18 + + + Depósito público + A-19 + + + Depósito público para distribución internacional + A-20 + + + Exportador de café + A-21 + + + Exportador + A-22 + + + Importador + A-23 + + + Intermediario de tráfico postal y envíos urgentes + A-24 + + + Operador de transporte multimodal + A-25 + + + Sociedad de intermediación aduanera + A-26 + + + Titular de puertos y muelles de servicio público o privado + A-27 + + + Transportador 263nfor régimen de importación y/o exportación + A-28 + + + Transportista nacional para operaciones del régimen de tránsito aduanero + A-29 + + + Usuario comercial zona franca + A-30 + + + Usuario industrial de bienes zona franca + A-32 + + + Usuario industrial de servicios zona franca + A-34 + + + Usuario operador de zona franca + A-36 + + + Usuario aduanero permanente + A-37 + + + Usuario altamente exportador + A-38 + + + Usuario de zonas económicas especiales de exportación + A-39 + + + Deposito privado de instalaciones industriales + A-40 + + + Beneficiarios de programas especiales de exportación PEX + A-41 + + + Depósitos privados para mercancías en tránsito San Andrés + A-42 + + + Observadores de las operaciones de importación + A-43 + + + Usuarios sistemas especiales Importación exportación + A-44 + + + Transportador 263nformac régimen de importación y/o exportación + A-46 + + + Transportador terrestre régimen de importación y/o exportación + A-47 + + + Aeropuerto de servicio publico o privado + A-48 + + + Transportador fluvial régimen de importación + A-49 + + + Usuario industrial zona franca especial + A-50 + + + Agencias de aduanas 1 + A-53 + + + Usuario Operador Zona Franca Especial + A-54 + + + Agencias de aduanas 2 + A-55 + + + Agencias de aduanas 3 + A-56 + + + Agencias de aduanas 4 + A-57 + + + Transportador aéreo nacional + A-58 + + + Transportador aéreo, marítimo o fluvial modalidad Cabotaje + A-60 + + + Importador de alimentos de consumo humano y animal + A-61 + + + Importador Ocasional + A-62 + + + Importador de maquinaría y sus partes Decreto 2261 de 2012 + A-63 + + + Beneficiario Programa de Fomento Industria Automotriz-PROFIA + A-64 + + + Otro tipo de agente aduanero + A-99 + + + Agencia + E-01 + + + Establecimiento de comercio + E-02 + + + Centro de explotación agrícola + E-03 + + + Centro de explotación animal + E-04 + + + Centro de explotación minera + E-05 + + + Centro de explotación de transformación + E-06 + + + Centro de explotación de servicios + E-07 + + + Oficina + E-08 + + + Sede + E-09 + + + Sucursal + E-10 + + + Consultorio + E-11 + + + Administraciones + E-12 + + + Seccionales + E-13 + + + Regionales + E-14 + + + Intendencias + E-15 + + + Local o negocio + E-16 + + + Punto de venta + E-17 + + + Fábrica + E-18 + + + Taller + E-19 + + + Cantera + E-20 + + + Pozo de Petróleo y Gas + E-21 + + + Otro lug de tipo de extrac explotación de recursos naturales + E-22 + + + Otro tipo de establecimiento + E-99 + + + diff --git a/modules/account_co_co/exceptions.py b/modules/account_co_co/exceptions.py new file mode 100644 index 0000000..954c598 --- /dev/null +++ b/modules/account_co_co/exceptions.py @@ -0,0 +1,13 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +from trytond.exceptions import UserError +from trytond.model.exceptions import ValidationError + + +class PartyIdentifierError(ValidationError): + pass + + +class PostError(UserError): + pass diff --git a/modules/account_co_co/locale/es.po b/modules/account_co_co/locale/es.po new file mode 100644 index 0000000..fbd5907 --- /dev/null +++ b/modules/account_co_co/locale/es.po @@ -0,0 +1,91 @@ +# +msgid "" +msgstr "Content-Type: text/plain; charset=utf-8\n" + +msgctxt "field:party.address,subdivision_municipality:" +msgid "Municipality" +msgstr "Municipio" + +msgctxt "field:party.address,subdivision_localities:" +msgid "Localities" +msgstr "Localidades" + +msgctxt "field:party.tax_level_code,code:" +msgid "Code" +msgstr "Código" + +msgctxt "field:party.tax_level_code,name:" +msgid "Name" +msgstr "Nombre" + +msgctxt "field:party.party,tax_level_code:" +msgid "TaxLevelCode" +msgstr "Responsabilidades" + +msgctxt "field:party.party,tax_regime:" +msgid "Tax Regime" +msgstr "Régimen Fiscal" + +msgctxt "field:party.party,type_taxpayer:" +msgid "Type Taxpayer" +msgstr "Tipo de Contribuyente" + +msgctxt "field:party.party,self_withholding:" +msgid "Self Withholding" +msgstr "Autoretenedor" + +msgctxt "field:party.party,declarant:" +msgid "Declarant" +msgstr "Declarante" + +msgctxt "field:party.party,main_ciiu:" +msgid "Main Activity" +msgstr "Actividad Principal" + +msgctxt "field:party.party,secondary_ciiu:" +msgid "Secondary Activity" +msgstr "Actividad Secundaria" + +msgctxt "field:party.party,other_ciiu:" +msgid "Other Activity" +msgstr "Otra Actividad" + +msgctxt "field:party.party,type_person:" +msgid "Type Person" +msgstr "Tipo de Persona" + +msgctxt "field:account.configuration,default_draft_sequence:" +msgid "Draft Sequence" +msgstr "Secuencia Borrador" + +msgctxt "view:party.party:" +msgid "Economic Activity" +msgstr "Actividad Económica" + +msgctxt "model:ir.message,text:msg_invalid_vat" +msgid "" +"The value of the code \"%(code)s\" is not valid" +msgstr "" +"El valor del código \"%(code)s\" no es valido" + +msgctxt "model:ir.message,text:msg_invalid_vat_str" +msgid "" +"The value of the code can only be numbers" +msgstr "" +"El valor del código solo pueden ser números" + +msgctxt "model:ir.message,text:msg_not_identifier" +msgid "" +"The party has to have a identifier" +msgstr "" +"El tercero debe tener un identificador" + +msgctxt "model:ir.message,text:msg_stdnum_error" +msgid "" +"Is required module stdnum" +msgstr "" +"El módulo stdnum es requerido" + +msgctxt "model:ir.ui.menu,name:menu_account_move_line" +msgid "Account Move Lines" +msgstr "Apuntes Contables" \ No newline at end of file diff --git a/modules/account_co_co/localities_colombia.xml b/modules/account_co_co/localities_colombia.xml new file mode 100644 index 0000000..69e22dd --- /dev/null +++ b/modules/account_co_co/localities_colombia.xml @@ -0,0 +1,166 @@ + + + + + Antonio Nariño + 1115 + + localities + CO-1100 + + + + Barrios Unidos + 1112 + + localities + CO-1102 + + + + Bosa + 1107 + + localities + CO-1103 + + + + Chapinero + 1102 + + localities + CO-1104 + + + + Ciudad Bolívar + 1119 + + localities + CO-1105 + + + + Engativá + 1110 + + localities + CO-1106 + + + + Fontibón + 1109 + + localities + CO-1107 + + + + Kennedy + 1108 + + localities + CO-1108 + + + + La Candelaria + 1117 + + localities + CO-1109 + + + + Los Mártires + 1114 + + localities + CO-1110 + + + + Puente Aranda + 1116 + + localities + CO-1111 + + + + Rafael Uribe Uribe + 1118 + + localities + CO-1112 + + + + San Cristóbal + 1104 + + localities + CO-1113 + + + + Santa Fe + 1103 + + localities + CO-1114 + + + + Suba + 1111 + + localities + CO-1115 + + + + Sumapaz + 1120 + + localities + CO-1116 + + + + Teusaquillo + 1113 + + localities + CO-1117 + + + + Tunjuelito + 1106 + + localities + CO-1118 + + + + Usaquén + 1101 + + localities + CO-1119 + + + + Usme + 1105 + + localities + CO-1120 + + + + + diff --git a/modules/account_co_co/message.xml b/modules/account_co_co/message.xml new file mode 100644 index 0000000..14fd95b --- /dev/null +++ b/modules/account_co_co/message.xml @@ -0,0 +1,19 @@ + + + + + + The value of the code "%(code)s" is not valid + + + The party has to have a identifier + + + Is required module stdnum + + + The value of the code can only be numbers + + + diff --git a/modules/account_co_co/municipalities_colombia.xml b/modules/account_co_co/municipalities_colombia.xml new file mode 100644 index 0000000..6d1d3ec --- /dev/null +++ b/modules/account_co_co/municipalities_colombia.xml @@ -0,0 +1,8918 @@ + + + + + Medellín + 05001 + + municipality + CO-05001 + + + + Abejorral + 05002 + + municipality + CO-05002 + + + + Abriaquí + 05004 + + municipality + CO-05004 + + + + Alejandría + 05021 + + municipality + CO-05021 + + + + Amagá + 05030 + + municipality + CO-05030 + + + + Amalfi + 05031 + + municipality + CO-05031 + + + + Andes + 05034 + + municipality + CO-05034 + + + + Angelópolis + 05036 + + municipality + CO-05036 + + + + Angostura + 05038 + + municipality + CO-05038 + + + + Anorí + 05040 + + municipality + CO-05040 + + + + Santafé de Antioquia + 05042 + + municipality + CO-05042 + + + + Anza + 05044 + + municipality + CO-05044 + + + + Apartadó + 05045 + + municipality + CO-05045 + + + + Arboletes + 05051 + + municipality + CO-05051 + + + + Argelia + 05055 + + municipality + CO-05055 + + + + Armenia + 05059 + + municipality + CO-05059 + + + + Barbosa + 05079 + + municipality + CO-05079 + + + + Belmira + 05086 + + municipality + CO-05086 + + + + Bello + 05088 + + municipality + CO-05088 + + + + Betania + 05091 + + municipality + CO-05091 + + + + Betulia + 05093 + + municipality + CO-05093 + + + + Ciudad Bolívar + 05101 + + municipality + CO-05101 + + + + Briceño + 05107 + + municipality + CO-05107 + + + + Buriticá + 05113 + + municipality + CO-05113 + + + + Cáceres + 05120 + + municipality + CO-05120 + + + + Caicedo + 05125 + + municipality + CO-05125 + + + + Caldas + 05129 + + municipality + CO-05129 + + + + Campamento + 05134 + + municipality + CO-05134 + + + + Cañasgordas + 05138 + + municipality + CO-05138 + + + + Caracolí + 05142 + + municipality + CO-05142 + + + + Caramanta + 05145 + + municipality + CO-05145 + + + + Carepa + 05147 + + municipality + CO-05147 + + + + El Carmen de Viboral + 05148 + + municipality + CO-05148 + + + + Carolina + 05150 + + municipality + CO-05150 + + + + Caucasia + 05154 + + municipality + CO-05154 + + + + Chigorodó + 05172 + + municipality + CO-05172 + + + + Cisneros + 05190 + + municipality + CO-05190 + + + + Cocorná + 05197 + + municipality + CO-05197 + + + + Concepción + 05206 + + municipality + CO-05206 + + + + Concordia + 05209 + + municipality + CO-05209 + + + + Copacabana + 05212 + + municipality + CO-05212 + + + + Dabeiba + 05234 + + municipality + CO-05234 + + + + Don Matías + 05237 + + municipality + CO-05237 + + + + Ebéjico + 05240 + + municipality + CO-05240 + + + + El Bagre + 05250 + + municipality + CO-05250 + + + + Entrerrios + 05264 + + municipality + CO-05264 + + + + Envigado + 05266 + + municipality + CO-05266 + + + + Fredonia + 05282 + + municipality + CO-05282 + + + + Frontino + 05284 + + municipality + CO-05284 + + + + Giraldo + 05306 + + municipality + CO-05306 + + + + Girardota + 05308 + + municipality + CO-05308 + + + + Gómez Plata + 05310 + + municipality + CO-05310 + + + + Granada + 05313 + + municipality + CO-05313 + + + + Guadalupe + 05315 + + municipality + CO-05315 + + + + Guarne + 05318 + + municipality + CO-05318 + + + + Guatape + 05321 + + municipality + CO-05321 + + + + Heliconia + 05347 + + municipality + CO-05347 + + + + Hispania + 05353 + + municipality + CO-05353 + + + + Itagui + 05360 + + municipality + CO-05360 + + + + Ituango + 05361 + + municipality + CO-05361 + + + + Jardín + 05364 + + municipality + CO-05364 + + + + Jericó + 05368 + + municipality + CO-05368 + + + + La Ceja + 05376 + + municipality + CO-05376 + + + + La Estrella + 05380 + + municipality + CO-05380 + + + + La Pintada + 05390 + + municipality + CO-05390 + + + + La Unión + 05400 + + municipality + CO-05400 + + + + Liborina + 05411 + + municipality + CO-05411 + + + + Maceo + 05425 + + municipality + CO-05425 + + + + Marinilla + 05440 + + municipality + CO-05440 + + + + Montebello + 05467 + + municipality + CO-05467 + + + + Murindó + 05475 + + municipality + CO-05475 + + + + Mutatá + 05480 + + municipality + CO-05480 + + + + Nariño + 05483 + + municipality + CO-05483 + + + + Necoclí + 05490 + + municipality + CO-05490 + + + + Nechí + 05495 + + municipality + CO-05495 + + + + Olaya + 05501 + + municipality + CO-05501 + + + + Peñol + 05541 + + municipality + CO-05541 + + + + Peque + 05543 + + municipality + CO-05543 + + + + Pueblorrico + 05576 + + municipality + CO-05576 + + + + Puerto Berrío + 05579 + + municipality + CO-05579 + + + + Puerto Nare + 05585 + + municipality + CO-05585 + + + + Puerto Triunfo + 05591 + + municipality + CO-05591 + + + + Remedios + 05604 + + municipality + CO-05604 + + + + Retiro + 05607 + + municipality + CO-05607 + + + + Rionegro + 05615 + + municipality + CO-05615 + + + + Sabanalarga + 05628 + + municipality + CO-05628 + + + + Sabaneta + 05631 + + municipality + CO-05631 + + + + Salgar + 05642 + + municipality + CO-05642 + + + + San Andrés de Cuerquía + 05647 + + municipality + CO-05647 + + + + San Carlos + 05649 + + municipality + CO-05649 + + + + San Francisco + 05652 + + municipality + CO-05652 + + + + San Jerónimo + 05656 + + municipality + CO-05656 + + + + San José de la Montaña + 05658 + + municipality + CO-05658 + + + + San Juan de Urabá + 05659 + + municipality + CO-05659 + + + + San Luis + 05660 + + municipality + CO-05660 + + + + San Pedro + 05664 + + municipality + CO-05664 + + + + San Pedro de Uraba + 05665 + + municipality + CO-05665 + + + + San Rafael + 05667 + + municipality + CO-05667 + + + + San Roque + 05670 + + municipality + CO-05670 + + + + San Vicente + 05674 + + municipality + CO-05674 + + + + Santa Bárbara + 05679 + + municipality + CO-05679 + + + + Santa Rosa de Osos + 05686 + + municipality + CO-05686 + + + + Santo Domingo + 05690 + + municipality + CO-05690 + + + + El Santuario + 05697 + + municipality + CO-05697 + + + + Segovia + 05736 + + municipality + CO-05736 + + + + Sonson + 05756 + + municipality + CO-05756 + + + + Sopetrán + 05761 + + municipality + CO-05761 + + + + Támesis + 05789 + + municipality + CO-05789 + + + + Tarazá + 05790 + + municipality + CO-05790 + + + + Tarso + 05792 + + municipality + CO-05792 + + + + Titiribí + 05809 + + municipality + CO-05809 + + + + Toledo + 05819 + + municipality + CO-05819 + + + + Turbo + 05837 + + municipality + CO-05837 + + + + Uramita + 05842 + + municipality + CO-05842 + + + + Urrao + 05847 + + municipality + CO-05847 + + + + Valdivia + 05854 + + municipality + CO-05854 + + + + Valparaíso + 05856 + + municipality + CO-05856 + + + + Vegachí + 05858 + + municipality + CO-05858 + + + + Venecia + 05861 + + municipality + CO-05861 + + + + Vigía del Fuerte + 05873 + + municipality + CO-05873 + + + + Yalí + 05885 + + municipality + CO-05885 + + + + Yarumal + 05887 + + municipality + CO-05887 + + + + Yolombó + 05890 + + municipality + CO-05890 + + + + Yondó + 05893 + + municipality + CO-05893 + + + + Zaragoza + 05895 + + municipality + CO-05895 + + + + Barranquilla + 08001 + + municipality + CO-08001 + + + + Baranoa + 08078 + + municipality + CO-08078 + + + + Campo de la Cruz + 08137 + + municipality + CO-08137 + + + + Candelaria + 08141 + + municipality + CO-08141 + + + + Galapa + 08296 + + municipality + CO-08296 + + + + Juan de Acosta + 08372 + + municipality + CO-08372 + + + + Luruaco + 08421 + + municipality + CO-08421 + + + + Malambo + 08433 + + municipality + CO-08433 + + + + Manatí + 08436 + + municipality + CO-08436 + + + + Palmar de Varela + 08520 + + municipality + CO-08520 + + + + Piojó + 08549 + + municipality + CO-08549 + + + + Polonuevo + 08558 + + municipality + CO-08558 + + + + Ponedera + 08560 + + municipality + CO-08560 + + + + Puerto Colombia + 08573 + + municipality + CO-08573 + + + + Repelón + 08606 + + municipality + CO-08606 + + + + Sabanagrande + 08634 + + municipality + CO-08634 + + + + Sabanalarga + 08638 + + municipality + CO-08638 + + + + Santa Lucía + 08675 + + municipality + CO-08675 + + + + Santo Tomás + 08685 + + municipality + CO-08685 + + + + Soledad + 08758 + + municipality + CO-08758 + + + + Suan + 08770 + + municipality + CO-08770 + + + + Tubará + 08832 + + municipality + CO-08832 + + + + Usiacurí + 08849 + + municipality + CO-08849 + + + + Bogotá, D.C. + 11001 + + municipality + CO-11001 + + + + Cartagena + 13001 + + municipality + CO-13001 + + + + Achí + 13006 + + municipality + CO-13006 + + + + Altos del Rosario + 13030 + + municipality + CO-13030 + + + + Arenal + 13042 + + municipality + CO-13042 + + + + Arjona + 13052 + + municipality + CO-13052 + + + + Arroyohondo + 13062 + + municipality + CO-13062 + + + + Barranco de Loba + 13074 + + municipality + CO-13074 + + + + Calamar + 13140 + + municipality + CO-13140 + + + + Cantagallo + 13160 + + municipality + CO-13160 + + + + Cicuco + 13188 + + municipality + CO-13188 + + + + Córdoba + 13212 + + municipality + CO-13212 + + + + Clemencia + 13222 + + municipality + CO-13222 + + + + El Carmen de Bolívar + 13244 + + municipality + CO-13244 + + + + El Guamo + 13248 + + municipality + CO-13248 + + + + El Peñón + 13268 + + municipality + CO-13268 + + + + Hatillo de Loba + 13300 + + municipality + CO-13300 + + + + Magangué + 13430 + + municipality + CO-13430 + + + + Mahates + 13433 + + municipality + CO-13433 + + + + Margarita + 13440 + + municipality + CO-13440 + + + + María la Baja + 13442 + + municipality + CO-13442 + + + + Montecristo + 13458 + + municipality + CO-13458 + + + + Mompós + 13468 + + municipality + CO-13468 + + + + Morales + 13473 + + municipality + CO-13473 + + + + Norosí + 13490 + + municipality + CO-13490 + + + + Pinillos + 13549 + + municipality + CO-13549 + + + + Regidor + 13580 + + municipality + CO-13580 + + + + Río Viejo + 13600 + + municipality + CO-13600 + + + + San Cristóbal + 13620 + + municipality + CO-13620 + + + + San Estanislao + 13647 + + municipality + CO-13647 + + + + San Fernando + 13650 + + municipality + CO-13650 + + + + San Jacinto + 13654 + + municipality + CO-13654 + + + + San Jacinto del Cauca + 13655 + + municipality + CO-13655 + + + + San Juan Nepomuceno + 13657 + + municipality + CO-13657 + + + + San Martín de Loba + 13667 + + municipality + CO-13667 + + + + San Pablo + 13670 + + municipality + CO-13670 + + + + Santa Catalina + 13673 + + municipality + CO-13673 + + + + Santa Rosa + 13683 + + municipality + CO-13683 + + + + Santa Rosa del Sur + 13688 + + municipality + CO-13688 + + + + Simití + 13744 + + municipality + CO-13744 + + + + Soplaviento + 13760 + + municipality + CO-13760 + + + + Talaigua Nuevo + 13780 + + municipality + CO-13780 + + + + Tiquisio + 13810 + + municipality + CO-13810 + + + + Turbaco + 13836 + + municipality + CO-13836 + + + + Turbaná + 13838 + + municipality + CO-13838 + + + + Villanueva + 13873 + + municipality + CO-13873 + + + + Zambrano + 13894 + + municipality + CO-13894 + + + + Tunja + 15001 + + municipality + CO-15001 + + + + Almeida + 15022 + + municipality + CO-15022 + + + + Aquitania + 15047 + + municipality + CO-15047 + + + + Arcabuco + 15051 + + municipality + CO-15051 + + + + Belén + 15087 + + municipality + CO-15087 + + + + Berbeo + 15090 + + municipality + CO-15090 + + + + Betéitiva + 15092 + + municipality + CO-15092 + + + + Boavita + 15097 + + municipality + CO-15097 + + + + Boyacá + 15104 + + municipality + CO-15104 + + + + Briceño + 15106 + + municipality + CO-15106 + + + + Buenavista + 15109 + + municipality + CO-15109 + + + + Busbanzá + 15114 + + municipality + CO-15114 + + + + Caldas + 15131 + + municipality + CO-15131 + + + + Campohermoso + 15135 + + municipality + CO-15135 + + + + Cerinza + 15162 + + municipality + CO-15162 + + + + Chinavita + 15172 + + municipality + CO-15172 + + + + Chiquinquirá + 15176 + + municipality + CO-15176 + + + + Chiscas + 15180 + + municipality + CO-15180 + + + + Chita + 15183 + + municipality + CO-15183 + + + + Chitaraque + 15185 + + municipality + CO-15185 + + + + Chivatá + 15187 + + municipality + CO-15187 + + + + Ciénega + 15189 + + municipality + CO-15189 + + + + Cómbita + 15204 + + municipality + CO-15204 + + + + Coper + 15212 + + municipality + CO-15212 + + + + Corrales + 15215 + + municipality + CO-15215 + + + + Covarachía + 15218 + + municipality + CO-15218 + + + + Cubará + 15223 + + municipality + CO-15223 + + + + Cucaita + 15224 + + municipality + CO-15224 + + + + Cuítiva + 15226 + + municipality + CO-15226 + + + + Chíquiza + 15232 + + municipality + CO-15232 + + + + Chivor + 15236 + + municipality + CO-15236 + + + + Duitama + 15238 + + municipality + CO-15238 + + + + El Cocuy + 15244 + + municipality + CO-15244 + + + + El Espino + 15248 + + municipality + CO-15248 + + + + Firavitoba + 15272 + + municipality + CO-15272 + + + + Floresta + 15276 + + municipality + CO-15276 + + + + Gachantivá + 15293 + + municipality + CO-15293 + + + + Gameza + 15296 + + municipality + CO-15296 + + + + Garagoa + 15299 + + municipality + CO-15299 + + + + Guacamayas + 15317 + + municipality + CO-15317 + + + + Guateque + 15322 + + municipality + CO-15322 + + + + Guayatá + 15325 + + municipality + CO-15325 + + + + Güicán + 15332 + + municipality + CO-15332 + + + + Iza + 15362 + + municipality + CO-15362 + + + + Jenesano + 15367 + + municipality + CO-15367 + + + + Jericó + 15368 + + municipality + CO-15368 + + + + Labranzagrande + 15377 + + municipality + CO-15377 + + + + La Capilla + 15380 + + municipality + CO-15380 + + + + La Victoria + 15401 + + municipality + CO-15401 + + + + La Uvita + 15403 + + municipality + CO-15403 + + + + Villa de Leyva + 15407 + + municipality + CO-15407 + + + + Macanal + 15425 + + municipality + CO-15425 + + + + Maripí + 15442 + + municipality + CO-15442 + + + + Miraflores + 15455 + + municipality + CO-15455 + + + + Mongua + 15464 + + municipality + CO-15464 + + + + Monguí + 15466 + + municipality + CO-15466 + + + + Moniquirá + 15469 + + municipality + CO-15469 + + + + Motavita + 15476 + + municipality + CO-15476 + + + + Muzo + 15480 + + municipality + CO-15480 + + + + Nobsa + 15491 + + municipality + CO-15491 + + + + Nuevo Colón + 15494 + + municipality + CO-15494 + + + + Oicatá + 15500 + + municipality + CO-15500 + + + + Otanche + 15507 + + municipality + CO-15507 + + + + Pachavita + 15511 + + municipality + CO-15511 + + + + Páez + 15514 + + municipality + CO-15514 + + + + Paipa + 15516 + + municipality + CO-15516 + + + + Pajarito + 15518 + + municipality + CO-15518 + + + + Panqueba + 15522 + + municipality + CO-15522 + + + + Pauna + 15531 + + municipality + CO-15531 + + + + Paya + 15533 + + municipality + CO-15533 + + + + Paz de Río + 15537 + + municipality + CO-15537 + + + + Pesca + 15542 + + municipality + CO-15542 + + + + Pisba + 15550 + + municipality + CO-15550 + + + + Puerto Boyacá + 15572 + + municipality + CO-15572 + + + + Quípama + 15580 + + municipality + CO-15580 + + + + Ramiriquí + 15599 + + municipality + CO-15599 + + + + Ráquira + 15600 + + municipality + CO-15600 + + + + Rondón + 15621 + + municipality + CO-15621 + + + + Saboyá + 15632 + + municipality + CO-15632 + + + + Sáchica + 15638 + + municipality + CO-15638 + + + + Samacá + 15646 + + municipality + CO-15646 + + + + San Eduardo + 15660 + + municipality + CO-15660 + + + + San José de Pare + 15664 + + municipality + CO-15664 + + + + San Luis de Gaceno + 15667 + + municipality + CO-15667 + + + + San Mateo + 15673 + + municipality + CO-15673 + + + + San Miguel de Sema + 15676 + + municipality + CO-15676 + + + + San Pablo de Borbur + 15681 + + municipality + CO-15681 + + + + Santana + 15686 + + municipality + CO-15686 + + + + Santa María + 15690 + + municipality + CO-15690 + + + + Santa Rosa de Viterbo + 15693 + + municipality + CO-15693 + + + + Santa Sofía + 15696 + + municipality + CO-15696 + + + + Sativanorte + 15720 + + municipality + CO-15720 + + + + Sativasur + 15723 + + municipality + CO-15723 + + + + Siachoque + 15740 + + municipality + CO-15740 + + + + Soatá + 15753 + + municipality + CO-15753 + + + + Socotá + 15755 + + municipality + CO-15755 + + + + Socha + 15757 + + municipality + CO-15757 + + + + Sogamoso + 15759 + + municipality + CO-15759 + + + + Somondoco + 15761 + + municipality + CO-15761 + + + + Sora + 15762 + + municipality + CO-15762 + + + + Sotaquirá + 15763 + + municipality + CO-15763 + + + + Soracá + 15764 + + municipality + CO-15764 + + + + Susacón + 15774 + + municipality + CO-15774 + + + + Sutamarchán + 15776 + + municipality + CO-15776 + + + + Sutatenza + 15778 + + municipality + CO-15778 + + + + Tasco + 15790 + + municipality + CO-15790 + + + + Tenza + 15798 + + municipality + CO-15798 + + + + Tibaná + 15804 + + municipality + CO-15804 + + + + Tibasosa + 15806 + + municipality + CO-15806 + + + + Tinjacá + 15808 + + municipality + CO-15808 + + + + Tipacoque + 15810 + + municipality + CO-15810 + + + + Toca + 15814 + + municipality + CO-15814 + + + + Togüí + 15816 + + municipality + CO-15816 + + + + Tópaga + 15820 + + municipality + CO-15820 + + + + Tota + 15822 + + municipality + CO-15822 + + + + Tununguá + 15832 + + municipality + CO-15832 + + + + Turmequé + 15835 + + municipality + CO-15835 + + + + Tuta + 15837 + + municipality + CO-15837 + + + + Tutazá + 15839 + + municipality + CO-15839 + + + + Umbita + 15842 + + municipality + CO-15842 + + + + Ventaquemada + 15861 + + municipality + CO-15861 + + + + Viracachá + 15879 + + municipality + CO-15879 + + + + Zetaquira + 15897 + + municipality + CO-15897 + + + + Manizales + 17001 + + municipality + CO-17001 + + + + Aguadas + 17013 + + municipality + CO-17013 + + + + Anserma + 17042 + + municipality + CO-17042 + + + + Aranzazu + 17050 + + municipality + CO-17050 + + + + Belalcázar + 17088 + + municipality + CO-17088 + + + + Chinchiná + 17174 + + municipality + CO-17174 + + + + Filadelfia + 17272 + + municipality + CO-17272 + + + + La Dorada + 17380 + + municipality + CO-17380 + + + + La Merced + 17388 + + municipality + CO-17388 + + + + Manzanares + 17433 + + municipality + CO-17433 + + + + Marmato + 17442 + + municipality + CO-17442 + + + + Marquetalia + 17444 + + municipality + CO-17444 + + + + Marulanda + 17446 + + municipality + CO-17446 + + + + Neira + 17486 + + municipality + CO-17486 + + + + Norcasia + 17495 + + municipality + CO-17495 + + + + Pácora + 17513 + + municipality + CO-17513 + + + + Palestina + 17524 + + municipality + CO-17524 + + + + Pensilvania + 17541 + + municipality + CO-17541 + + + + Riosucio + 17614 + + municipality + CO-17614 + + + + Risaralda + 17616 + + municipality + CO-17616 + + + + Salamina + 17653 + + municipality + CO-17653 + + + + Samaná + 17662 + + municipality + CO-17662 + + + + San José + 17665 + + municipality + CO-17665 + + + + Supía + 17777 + + municipality + CO-17777 + + + + Victoria + 17867 + + municipality + CO-17867 + + + + Villamaría + 17873 + + municipality + CO-17873 + + + + Viterbo + 17877 + + municipality + CO-17877 + + + + Florencia + 18001 + + municipality + CO-18001 + + + + Albania + 18029 + + municipality + CO-18029 + + + + Belén de los Andaquies + 18094 + + municipality + CO-18094 + + + + Cartagena del Chairá + 18150 + + municipality + CO-18150 + + + + Curillo + 18205 + + municipality + CO-18205 + + + + El Doncello + 18247 + + municipality + CO-18247 + + + + El Paujil + 18256 + + municipality + CO-18256 + + + + La Montañita + 18410 + + municipality + CO-18410 + + + + Milán + 18460 + + municipality + CO-18460 + + + + Morelia + 18479 + + municipality + CO-18479 + + + + Puerto Rico + 18592 + + municipality + CO-18592 + + + + San José del Fragua + 18610 + + municipality + CO-18610 + + + + San Vicente del Caguán + 18753 + + municipality + CO-18753 + + + + Solano + 18756 + + municipality + CO-18756 + + + + Solita + 18785 + + municipality + CO-18785 + + + + Valparaíso + 18860 + + municipality + CO-18860 + + + + Popayán + 19001 + + municipality + CO-19001 + + + + Almaguer + 19022 + + municipality + CO-19022 + + + + Argelia + 19050 + + municipality + CO-19050 + + + + Balboa + 19075 + + municipality + CO-19075 + + + + Bolívar + 19100 + + municipality + CO-19100 + + + + Buenos Aires + 19110 + + municipality + CO-19110 + + + + Cajibío + 19130 + + municipality + CO-19130 + + + + Caldono + 19137 + + municipality + CO-19137 + + + + Caloto + 19142 + + municipality + CO-19142 + + + + Corinto + 19212 + + municipality + CO-19212 + + + + El Tambo + 19256 + + municipality + CO-19256 + + + + Florencia + 19290 + + municipality + CO-19290 + + + + Guachené + 19300 + + municipality + CO-19300 + + + + Guapi + 19318 + + municipality + CO-19318 + + + + Inzá + 19355 + + municipality + CO-19355 + + + + Jambaló + 19364 + + municipality + CO-19364 + + + + La Sierra + 19392 + + municipality + CO-19392 + + + + La Vega + 19397 + + municipality + CO-19397 + + + + López + 19418 + + municipality + CO-19418 + + + + Mercaderes + 19450 + + municipality + CO-19450 + + + + Miranda + 19455 + + municipality + CO-19455 + + + + Morales + 19473 + + municipality + CO-19473 + + + + Padilla + 19513 + + municipality + CO-19513 + + + + Paez + 19517 + + municipality + CO-19517 + + + + Patía + 19532 + + municipality + CO-19532 + + + + Piamonte + 19533 + + municipality + CO-19533 + + + + Piendamó + 19548 + + municipality + CO-19548 + + + + Puerto Tejada + 19573 + + municipality + CO-19573 + + + + Puracé + 19585 + + municipality + CO-19585 + + + + Rosas + 19622 + + municipality + CO-19622 + + + + San Sebastián + 19693 + + municipality + CO-19693 + + + + Santander de Quilichao + 19698 + + municipality + CO-19698 + + + + Santa Rosa + 19701 + + municipality + CO-19701 + + + + Silvia + 19743 + + municipality + CO-19743 + + + + Sotara + 19760 + + municipality + CO-19760 + + + + Suárez + 19780 + + municipality + CO-19780 + + + + Sucre + 19785 + + municipality + CO-19785 + + + + Timbío + 19807 + + municipality + CO-19807 + + + + Timbiquí + 19809 + + municipality + CO-19809 + + + + Toribio + 19821 + + municipality + CO-19821 + + + + Totoró + 19824 + + municipality + CO-19824 + + + + Villa Rica + 19845 + + municipality + CO-19845 + + + + Valledupar + 20001 + + municipality + CO-20001 + + + + Aguachica + 20011 + + municipality + CO-20011 + + + + Agustín Codazzi + 20013 + + municipality + CO-20013 + + + + Astrea + 20032 + + municipality + CO-20032 + + + + Becerril + 20045 + + municipality + CO-20045 + + + + Bosconia + 20060 + + municipality + CO-20060 + + + + Chimichagua + 20175 + + municipality + CO-20175 + + + + Chiriguaná + 20178 + + municipality + CO-20178 + + + + Curumaní + 20228 + + municipality + CO-20228 + + + + El Copey + 20238 + + municipality + CO-20238 + + + + El Paso + 20250 + + municipality + CO-20250 + + + + Gamarra + 20295 + + municipality + CO-20295 + + + + González + 20310 + + municipality + CO-20310 + + + + La Gloria + 20383 + + municipality + CO-20383 + + + + La Jagua de Ibirico + 20400 + + municipality + CO-20400 + + + + Manaure + 20443 + + municipality + CO-20443 + + + + Pailitas + 20517 + + municipality + CO-20517 + + + + Pelaya + 20550 + + municipality + CO-20550 + + + + Pueblo Bello + 20570 + + municipality + CO-20570 + + + + Río de Oro + 20614 + + municipality + CO-20614 + + + + La Paz + 20621 + + municipality + CO-20621 + + + + San Alberto + 20710 + + municipality + CO-20710 + + + + San Diego + 20750 + + municipality + CO-20750 + + + + San Martín + 20770 + + municipality + CO-20770 + + + + Tamalameque + 20787 + + municipality + CO-20787 + + + + Montería + 23001 + + municipality + CO-23001 + + + + Ayapel + 23068 + + municipality + CO-23068 + + + + Buenavista + 23079 + + municipality + CO-23079 + + + + Canalete + 23090 + + municipality + CO-23090 + + + + Cereté + 23162 + + municipality + CO-23162 + + + + Chimá + 23168 + + municipality + CO-23168 + + + + Chinú + 23182 + + municipality + CO-23182 + + + + Ciénaga de Oro + 23189 + + municipality + CO-23189 + + + + Cotorra + 23300 + + municipality + CO-23300 + + + + La Apartada + 23350 + + municipality + CO-23350 + + + + Lorica + 23417 + + municipality + CO-23417 + + + + Los Córdobas + 23419 + + municipality + CO-23419 + + + + Momil + 23464 + + municipality + CO-23464 + + + + Montelíbano + 23466 + + municipality + CO-23466 + + + + Moñitos + 23500 + + municipality + CO-23500 + + + + Planeta Rica + 23555 + + municipality + CO-23555 + + + + Pueblo Nuevo + 23570 + + municipality + CO-23570 + + + + Puerto Escondido + 23574 + + municipality + CO-23574 + + + + Puerto Libertador + 23580 + + municipality + CO-23580 + + + + Purísima + 23586 + + municipality + CO-23586 + + + + Sahagún + 23660 + + municipality + CO-23660 + + + + San Andrés Sotavento + 23670 + + municipality + CO-23670 + + + + San Antero + 23672 + + municipality + CO-23672 + + + + San Bernardo del Viento + 23675 + + municipality + CO-23675 + + + + San Carlos + 23678 + + municipality + CO-23678 + + + + San José de Uré + 23682 + + municipality + CO-23682 + + + + San Pelayo + 23686 + + municipality + CO-23686 + + + + Tierralta + 23807 + + municipality + CO-23807 + + + + Tuchín + 23815 + + municipality + CO-23815 + + + + Valencia + 23855 + + municipality + CO-23855 + + + + Agua de Dios + 25001 + + municipality + CO-25001 + + + + Albán + 25019 + + municipality + CO-25019 + + + + Anapoima + 25035 + + municipality + CO-25035 + + + + Anolaima + 25040 + + municipality + CO-25040 + + + + Arbeláez + 25053 + + municipality + CO-25053 + + + + Beltrán + 25086 + + municipality + CO-25086 + + + + Bituima + 25095 + + municipality + CO-25095 + + + + Bojacá + 25099 + + municipality + CO-25099 + + + + Cabrera + 25120 + + municipality + CO-25120 + + + + Cachipay + 25123 + + municipality + CO-25123 + + + + Cajicá + 25126 + + municipality + CO-25126 + + + + Caparrapí + 25148 + + municipality + CO-25148 + + + + Caqueza + 25151 + + municipality + CO-25151 + + + + Carmen de Carupa + 25154 + + municipality + CO-25154 + + + + Chaguaní + 25168 + + municipality + CO-25168 + + + + Chía + 25175 + + municipality + CO-25175 + + + + Chipaque + 25178 + + municipality + CO-25178 + + + + Choachí + 25181 + + municipality + CO-25181 + + + + Chocontá + 25183 + + municipality + CO-25183 + + + + Cogua + 25200 + + municipality + CO-25200 + + + + Cota + 25214 + + municipality + CO-25214 + + + + Cucunubá + 25224 + + municipality + CO-25224 + + + + El Colegio + 25245 + + municipality + CO-25245 + + + + El Peñón + 25258 + + municipality + CO-25258 + + + + El Rosal + 25260 + + municipality + CO-25260 + + + + Facatativá + 25269 + + municipality + CO-25269 + + + + Fomeque + 25279 + + municipality + CO-25279 + + + + Fosca + 25281 + + municipality + CO-25281 + + + + Funza + 25286 + + municipality + CO-25286 + + + + Fúquene + 25288 + + municipality + CO-25288 + + + + Fusagasugá + 25290 + + municipality + CO-25290 + + + + Gachala + 25293 + + municipality + CO-25293 + + + + Gachancipá + 25295 + + municipality + CO-25295 + + + + Gachetá + 25297 + + municipality + CO-25297 + + + + Gama + 25299 + + municipality + CO-25299 + + + + Girardot + 25307 + + municipality + CO-25307 + + + + Granada + 25312 + + municipality + CO-25312 + + + + Guachetá + 25317 + + municipality + CO-25317 + + + + Guaduas + 25320 + + municipality + CO-25320 + + + + Guasca + 25322 + + municipality + CO-25322 + + + + Guataquí + 25324 + + municipality + CO-25324 + + + + Guatavita + 25326 + + municipality + CO-25326 + + + + Guayabal de Siquima + 25328 + + municipality + CO-25328 + + + + Guayabetal + 25335 + + municipality + CO-25335 + + + + Gutiérrez + 25339 + + municipality + CO-25339 + + + + Jerusalén + 25368 + + municipality + CO-25368 + + + + Junín + 25372 + + municipality + CO-25372 + + + + La Calera + 25377 + + municipality + CO-25377 + + + + La Mesa + 25386 + + municipality + CO-25386 + + + + La Palma + 25394 + + municipality + CO-25394 + + + + La Peña + 25398 + + municipality + CO-25398 + + + + La Vega + 25402 + + municipality + CO-25402 + + + + Lenguazaque + 25407 + + municipality + CO-25407 + + + + Macheta + 25426 + + municipality + CO-25426 + + + + Madrid + 25430 + + municipality + CO-25430 + + + + Manta + 25436 + + municipality + CO-25436 + + + + Medina + 25438 + + municipality + CO-25438 + + + + Mosquera + 25473 + + municipality + CO-25473 + + + + Nariño + 25483 + + municipality + CO-25483 + + + + Nemocón + 25486 + + municipality + CO-25486 + + + + Nilo + 25488 + + municipality + CO-25488 + + + + Nimaima + 25489 + + municipality + CO-25489 + + + + Nocaima + 25491 + + municipality + CO-25491 + + + + Venecia + 25506 + + municipality + CO-25506 + + + + Pacho + 25513 + + municipality + CO-25513 + + + + Paime + 25518 + + municipality + CO-25518 + + + + Pandi + 25524 + + municipality + CO-25524 + + + + Paratebueno + 25530 + + municipality + CO-25530 + + + + Pasca + 25535 + + municipality + CO-25535 + + + + Puerto Salgar + 25572 + + municipality + CO-25572 + + + + Pulí + 25580 + + municipality + CO-25580 + + + + Quebradanegra + 25592 + + municipality + CO-25592 + + + + Quetame + 25594 + + municipality + CO-25594 + + + + Quipile + 25596 + + municipality + CO-25596 + + + + Apulo + 25599 + + municipality + CO-25599 + + + + Ricaurte + 25612 + + municipality + CO-25612 + + + + San Antonio del Tequendama + 25645 + + municipality + CO-25645 + + + + San Bernardo + 25649 + + municipality + CO-25649 + + + + San Cayetano + 25653 + + municipality + CO-25653 + + + + San Francisco + 25658 + + municipality + CO-25658 + + + + San Juan de Río Seco + 25662 + + municipality + CO-25662 + + + + Sasaima + 25718 + + municipality + CO-25718 + + + + Sesquilé + 25736 + + municipality + CO-25736 + + + + Sibaté + 25740 + + municipality + CO-25740 + + + + Silvania + 25743 + + municipality + CO-25743 + + + + Simijaca + 25745 + + municipality + CO-25745 + + + + Soacha + 25754 + + municipality + CO-25754 + + + + Sopó + 25758 + + municipality + CO-25758 + + + + Subachoque + 25769 + + municipality + CO-25769 + + + + Suesca + 25772 + + municipality + CO-25772 + + + + Supatá + 25777 + + municipality + CO-25777 + + + + Susa + 25779 + + municipality + CO-25779 + + + + Sutatausa + 25781 + + municipality + CO-25781 + + + + Tabio + 25785 + + municipality + CO-25785 + + + + Tausa + 25793 + + municipality + CO-25793 + + + + Tena + 25797 + + municipality + CO-25797 + + + + Tenjo + 25799 + + municipality + CO-25799 + + + + Tibacuy + 25805 + + municipality + CO-25805 + + + + Tibirita + 25807 + + municipality + CO-25807 + + + + Tocaima + 25815 + + municipality + CO-25815 + + + + Tocancipá + 25817 + + municipality + CO-25817 + + + + Topaipí + 25823 + + municipality + CO-25823 + + + + Ubalá + 25839 + + municipality + CO-25839 + + + + Ubaque + 25841 + + municipality + CO-25841 + + + + Villa de San Diego de Ubate + 25843 + + municipality + CO-25843 + + + + Une + 25845 + + municipality + CO-25845 + + + + Útica + 25851 + + municipality + CO-25851 + + + + Vergara + 25862 + + municipality + CO-25862 + + + + Vianí + 25867 + + municipality + CO-25867 + + + + Villagómez + 25871 + + municipality + CO-25871 + + + + Villapinzón + 25873 + + municipality + CO-25873 + + + + Villeta + 25875 + + municipality + CO-25875 + + + + Viotá + 25878 + + municipality + CO-25878 + + + + Yacopí + 25885 + + municipality + CO-25885 + + + + Zipacón + 25898 + + municipality + CO-25898 + + + + Zipaquirá + 25899 + + municipality + CO-25899 + + + + Quibdó + 27001 + + municipality + CO-27001 + + + + Acandí + 27006 + + municipality + CO-27006 + + + + Alto Baudo + 27025 + + municipality + CO-27025 + + + + Atrato + 27050 + + municipality + CO-27050 + + + + Bagadó + 27073 + + municipality + CO-27073 + + + + Bahía Solano + 27075 + + municipality + CO-27075 + + + + Bajo Baudó + 27077 + + municipality + CO-27077 + + + + Belén de Bajirá + 27086 + + municipality + CO-27086 + + + + Bojaya + 27099 + + municipality + CO-27099 + + + + El Cantón del San Pablo + 27135 + + municipality + CO-27135 + + + + Carmen del Darien + 27150 + + municipality + CO-27150 + + + + Cértegui + 27160 + + municipality + CO-27160 + + + + Condoto + 27205 + + municipality + CO-27205 + + + + El Carmen de Atrato + 27245 + + municipality + CO-27245 + + + + El Litoral del San Juan + 27250 + + municipality + CO-27250 + + + + Istmina + 27361 + + municipality + CO-27361 + + + + Juradó + 27372 + + municipality + CO-27372 + + + + Lloró + 27413 + + municipality + CO-27413 + + + + Medio Atrato + 27425 + + municipality + CO-27425 + + + + Medio Baudó + 27430 + + municipality + CO-27430 + + + + Medio San Juan + 27450 + + municipality + CO-27450 + + + + Nóvita + 27491 + + municipality + CO-27491 + + + + Nuquí + 27495 + + municipality + CO-27495 + + + + Río Iro + 27580 + + municipality + CO-27580 + + + + Río Quito + 27600 + + municipality + CO-27600 + + + + Riosucio + 27615 + + municipality + CO-27615 + + + + San José del Palmar + 27660 + + municipality + CO-27660 + + + + Sipí + 27745 + + municipality + CO-27745 + + + + Tadó + 27787 + + municipality + CO-27787 + + + + Unguía + 27800 + + municipality + CO-27800 + + + + Unión Panamericana + 27810 + + municipality + CO-27810 + + + + Neiva + 41001 + + municipality + CO-41001 + + + + Acevedo + 41006 + + municipality + CO-41006 + + + + Agrado + 41013 + + municipality + CO-41013 + + + + Aipe + 41016 + + municipality + CO-41016 + + + + Algeciras + 41020 + + municipality + CO-41020 + + + + Altamira + 41026 + + municipality + CO-41026 + + + + Baraya + 41078 + + municipality + CO-41078 + + + + Campoalegre + 41132 + + municipality + CO-41132 + + + + Colombia + 41206 + + municipality + CO-41206 + + + + Elías + 41244 + + municipality + CO-41244 + + + + Garzón + 41298 + + municipality + CO-41298 + + + + Gigante + 41306 + + municipality + CO-41306 + + + + Guadalupe + 41319 + + municipality + CO-41319 + + + + Hobo + 41349 + + municipality + CO-41349 + + + + Iquira + 41357 + + municipality + CO-41357 + + + + Isnos + 41359 + + municipality + CO-41359 + + + + La Argentina + 41378 + + municipality + CO-41378 + + + + La Plata + 41396 + + municipality + CO-41396 + + + + Nátaga + 41483 + + municipality + CO-41483 + + + + Oporapa + 41503 + + municipality + CO-41503 + + + + Paicol + 41518 + + municipality + CO-41518 + + + + Palermo + 41524 + + municipality + CO-41524 + + + + Palestina + 41530 + + municipality + CO-41530 + + + + Pital + 41548 + + municipality + CO-41548 + + + + Pitalito + 41551 + + municipality + CO-41551 + + + + Rivera + 41615 + + municipality + CO-41615 + + + + Saladoblanco + 41660 + + municipality + CO-41660 + + + + San Agustín + 41668 + + municipality + CO-41668 + + + + Santa María + 41676 + + municipality + CO-41676 + + + + Suaza + 41770 + + municipality + CO-41770 + + + + Tarqui + 41791 + + municipality + CO-41791 + + + + Tesalia + 41797 + + municipality + CO-41797 + + + + Tello + 41799 + + municipality + CO-41799 + + + + Teruel + 41801 + + municipality + CO-41801 + + + + Timaná + 41807 + + municipality + CO-41807 + + + + Villavieja + 41872 + + municipality + CO-41872 + + + + Yaguará + 41885 + + municipality + CO-41885 + + + + Riohacha + 44001 + + municipality + CO-44001 + + + + Albania + 44035 + + municipality + CO-44035 + + + + Barrancas + 44078 + + municipality + CO-44078 + + + + Dibulla + 44090 + + municipality + CO-44090 + + + + Distracción + 44098 + + municipality + CO-44098 + + + + El Molino + 44110 + + municipality + CO-44110 + + + + Fonseca + 44279 + + municipality + CO-44279 + + + + Hatonuevo + 44378 + + municipality + CO-44378 + + + + La Jagua del Pilar + 44420 + + municipality + CO-44420 + + + + Maicao + 44430 + + municipality + CO-44430 + + + + Manaure + 44560 + + municipality + CO-44560 + + + + San Juan del Cesar + 44650 + + municipality + CO-44650 + + + + Uribia + 44847 + + municipality + CO-44847 + + + + Urumita + 44855 + + municipality + CO-44855 + + + + Villanueva + 44874 + + municipality + CO-44874 + + + + Santa Marta + 47001 + + municipality + CO-47001 + + + + Algarrobo + 47030 + + municipality + CO-47030 + + + + Aracataca + 47053 + + municipality + CO-47053 + + + + Ariguaní + 47058 + + municipality + CO-47058 + + + + Cerro San Antonio + 47161 + + municipality + CO-47161 + + + + Chibolo + 47170 + + municipality + CO-47170 + + + + Ciénaga + 47189 + + municipality + CO-47189 + + + + Concordia + 47205 + + municipality + CO-47205 + + + + El Banco + 47245 + + municipality + CO-47245 + + + + El Piñon + 47258 + + municipality + CO-47258 + + + + El Retén + 47268 + + municipality + CO-47268 + + + + Fundación + 47288 + + municipality + CO-47288 + + + + Guamal + 47318 + + municipality + CO-47318 + + + + Nueva Granada + 47460 + + municipality + CO-47460 + + + + Pedraza + 47541 + + municipality + CO-47541 + + + + Pijiño del Carmen + 47545 + + municipality + CO-47545 + + + + Pivijay + 47551 + + municipality + CO-47551 + + + + Plato + 47555 + + municipality + CO-47555 + + + + Puebloviejo + 47570 + + municipality + CO-47570 + + + + Remolino + 47605 + + municipality + CO-47605 + + + + Sabanas de San Angel + 47660 + + municipality + CO-47660 + + + + Salamina + 47675 + + municipality + CO-47675 + + + + San Sebastián de Buenavista + 47692 + + municipality + CO-47692 + + + + San Zenón + 47703 + + municipality + CO-47703 + + + + Santa Ana + 47707 + + municipality + CO-47707 + + + + Santa Bárbara de Pinto + 47720 + + municipality + CO-47720 + + + + Sitionuevo + 47745 + + municipality + CO-47745 + + + + Tenerife + 47798 + + municipality + CO-47798 + + + + Zapayán + 47960 + + municipality + CO-47960 + + + + Zona Bananera + 47980 + + municipality + CO-47980 + + + + Villavicencio + 50001 + + municipality + CO-50001 + + + + Acacías + 50006 + + municipality + CO-50006 + + + + Barranca de Upía + 50110 + + municipality + CO-50110 + + + + Cabuyaro + 50124 + + municipality + CO-50124 + + + + Castilla la Nueva + 50150 + + municipality + CO-50150 + + + + Cubarral + 50223 + + municipality + CO-50223 + + + + Cumaral + 50226 + + municipality + CO-50226 + + + + El Calvario + 50245 + + municipality + CO-50245 + + + + El Castillo + 50251 + + municipality + CO-50251 + + + + El Dorado + 50270 + + municipality + CO-50270 + + + + Fuente de Oro + 50287 + + municipality + CO-50287 + + + + Granada + 50313 + + municipality + CO-50313 + + + + Guamal + 50318 + + municipality + CO-50318 + + + + Mapiripán + 50325 + + municipality + CO-50325 + + + + Mesetas + 50330 + + municipality + CO-50330 + + + + La Macarena + 50350 + + municipality + CO-50350 + + + + Uribe + 50370 + + municipality + CO-50370 + + + + Lejanías + 50400 + + municipality + CO-50400 + + + + Puerto Concordia + 50450 + + municipality + CO-50450 + + + + Puerto Gaitán + 50568 + + municipality + CO-50568 + + + + Puerto López + 50573 + + municipality + CO-50573 + + + + Puerto Lleras + 50577 + + municipality + CO-50577 + + + + Puerto Rico + 50590 + + municipality + CO-50590 + + + + Restrepo + 50606 + + municipality + CO-50606 + + + + San Carlos de Guaroa + 50680 + + municipality + CO-50680 + + + + San Juan de Arama + 50683 + + municipality + CO-50683 + + + + San Juanito + 50686 + + municipality + CO-50686 + + + + San Martín + 50689 + + municipality + CO-50689 + + + + Vistahermosa + 50711 + + municipality + CO-50711 + + + + Pasto + 52001 + + municipality + CO-52001 + + + + Albán + 52019 + + municipality + CO-52019 + + + + Aldana + 52022 + + municipality + CO-52022 + + + + Ancuyá + 52036 + + municipality + CO-52036 + + + + Arboleda + 52051 + + municipality + CO-52051 + + + + Barbacoas + 52079 + + municipality + CO-52079 + + + + Belén + 52083 + + municipality + CO-52083 + + + + Buesaco + 52110 + + municipality + CO-52110 + + + + Colón + 52203 + + municipality + CO-52203 + + + + Consaca + 52207 + + municipality + CO-52207 + + + + Contadero + 52210 + + municipality + CO-52210 + + + + Córdoba + 52215 + + municipality + CO-52215 + + + + Cuaspud + 52224 + + municipality + CO-52224 + + + + Cumbal + 52227 + + municipality + CO-52227 + + + + Cumbitara + 52233 + + municipality + CO-52233 + + + + Chachagüí + 52240 + + municipality + CO-52240 + + + + El Charco + 52250 + + municipality + CO-52250 + + + + El Peñol + 52254 + + municipality + CO-52254 + + + + El Rosario + 52256 + + municipality + CO-52256 + + + + El Tablón de Gómez + 52258 + + municipality + CO-52258 + + + + El Tambo + 52260 + + municipality + CO-52260 + + + + Funes + 52287 + + municipality + CO-52287 + + + + Guachucal + 52317 + + municipality + CO-52317 + + + + Guaitarilla + 52320 + + municipality + CO-52320 + + + + Gualmatán + 52323 + + municipality + CO-52323 + + + + Iles + 52352 + + municipality + CO-52352 + + + + Imués + 52354 + + municipality + CO-52354 + + + + Ipiales + 52356 + + municipality + CO-52356 + + + + La Cruz + 52378 + + municipality + CO-52378 + + + + La Florida + 52381 + + municipality + CO-52381 + + + + La Llanada + 52385 + + municipality + CO-52385 + + + + La Tola + 52390 + + municipality + CO-52390 + + + + La Unión + 52399 + + municipality + CO-52399 + + + + Leiva + 52405 + + municipality + CO-52405 + + + + Linares + 52411 + + municipality + CO-52411 + + + + Los Andes + 52418 + + municipality + CO-52418 + + + + Magüi + 52427 + + municipality + CO-52427 + + + + Mallama + 52435 + + municipality + CO-52435 + + + + Mosquera + 52473 + + municipality + CO-52473 + + + + Nariño + 52480 + + municipality + CO-52480 + + + + Olaya Herrera + 52490 + + municipality + CO-52490 + + + + Ospina + 52506 + + municipality + CO-52506 + + + + Francisco Pizarro + 52520 + + municipality + CO-52520 + + + + Policarpa + 52540 + + municipality + CO-52540 + + + + Potosí + 52560 + + municipality + CO-52560 + + + + Providencia + 52565 + + municipality + CO-52565 + + + + Puerres + 52573 + + municipality + CO-52573 + + + + Pupiales + 52585 + + municipality + CO-52585 + + + + Ricaurte + 52612 + + municipality + CO-52612 + + + + Roberto Payán + 52621 + + municipality + CO-52621 + + + + Samaniego + 52678 + + municipality + CO-52678 + + + + Sandoná + 52683 + + municipality + CO-52683 + + + + San Bernardo + 52685 + + municipality + CO-52685 + + + + San Lorenzo + 52687 + + municipality + CO-52687 + + + + San Pablo + 52693 + + municipality + CO-52693 + + + + San Pedro de Cartago + 52694 + + municipality + CO-52694 + + + + Santa Bárbara + 52696 + + municipality + CO-52696 + + + + Santacruz + 52699 + + municipality + CO-52699 + + + + Sapuyes + 52720 + + municipality + CO-52720 + + + + Taminango + 52786 + + municipality + CO-52786 + + + + Tangua + 52788 + + municipality + CO-52788 + + + + San Andres de Tumaco + 52835 + + municipality + CO-52835 + + + + Túquerres + 52838 + + municipality + CO-52838 + + + + Yacuanquer + 52885 + + municipality + CO-52885 + + + + Cúcuta + 54001 + + municipality + CO-54001 + + + + Abrego + 54003 + + municipality + CO-54003 + + + + Arboledas + 54051 + + municipality + CO-54051 + + + + Bochalema + 54099 + + municipality + CO-54099 + + + + Bucarasica + 54109 + + municipality + CO-54109 + + + + Cácota + 54125 + + municipality + CO-54125 + + + + Cachirá + 54128 + + municipality + CO-54128 + + + + Chinácota + 54172 + + municipality + CO-54172 + + + + Chitagá + 54174 + + municipality + CO-54174 + + + + Convención + 54206 + + municipality + CO-54206 + + + + Cucutilla + 54223 + + municipality + CO-54223 + + + + Durania + 54239 + + municipality + CO-54239 + + + + El Carmen + 54245 + + municipality + CO-54245 + + + + El Tarra + 54250 + + municipality + CO-54250 + + + + El Zulia + 54261 + + municipality + CO-54261 + + + + Gramalote + 54313 + + municipality + CO-54313 + + + + Hacarí + 54344 + + municipality + CO-54344 + + + + Herrán + 54347 + + municipality + CO-54347 + + + + Labateca + 54377 + + municipality + CO-54377 + + + + La Esperanza + 54385 + + municipality + CO-54385 + + + + La Playa + 54398 + + municipality + CO-54398 + + + + Los Patios + 54405 + + municipality + CO-54405 + + + + Lourdes + 54418 + + municipality + CO-54418 + + + + Mutiscua + 54480 + + municipality + CO-54480 + + + + Ocaña + 54498 + + municipality + CO-54498 + + + + Pamplona + 54518 + + municipality + CO-54518 + + + + Pamplonita + 54520 + + municipality + CO-54520 + + + + Puerto Santander + 54553 + + municipality + CO-54553 + + + + Ragonvalia + 54599 + + municipality + CO-54599 + + + + Salazar + 54660 + + municipality + CO-54660 + + + + San Calixto + 54670 + + municipality + CO-54670 + + + + San Cayetano + 54673 + + municipality + CO-54673 + + + + Santiago + 54680 + + municipality + CO-54680 + + + + Sardinata + 54720 + + municipality + CO-54720 + + + + Silos + 54743 + + municipality + CO-54743 + + + + Teorama + 54800 + + municipality + CO-54800 + + + + Tibú + 54810 + + municipality + CO-54810 + + + + Toledo + 54820 + + municipality + CO-54820 + + + + Villa Caro + 54871 + + municipality + CO-54871 + + + + Villa del Rosario + 54874 + + municipality + CO-54874 + + + + Armenia + 63001 + + municipality + CO-63001 + + + + Buenavista + 63111 + + municipality + CO-63111 + + + + Calarca + 63130 + + municipality + CO-63130 + + + + Circasia + 63190 + + municipality + CO-63190 + + + + Córdoba + 63212 + + municipality + CO-63212 + + + + Filandia + 63272 + + municipality + CO-63272 + + + + Génova + 63302 + + municipality + CO-63302 + + + + La Tebaida + 63401 + + municipality + CO-63401 + + + + Montenegro + 63470 + + municipality + CO-63470 + + + + Pijao + 63548 + + municipality + CO-63548 + + + + Quimbaya + 63594 + + municipality + CO-63594 + + + + Salento + 63690 + + municipality + CO-63690 + + + + Pereira + 66001 + + municipality + CO-66001 + + + + Apía + 66045 + + municipality + CO-66045 + + + + Balboa + 66075 + + municipality + CO-66075 + + + + Belén de Umbría + 66088 + + municipality + CO-66088 + + + + Dosquebradas + 66170 + + municipality + CO-66170 + + + + Guática + 66318 + + municipality + CO-66318 + + + + La Celia + 66383 + + municipality + CO-66383 + + + + La Virginia + 66400 + + municipality + CO-66400 + + + + Marsella + 66440 + + municipality + CO-66440 + + + + Mistrató + 66456 + + municipality + CO-66456 + + + + Pueblo Rico + 66572 + + municipality + CO-66572 + + + + Quinchía + 66594 + + municipality + CO-66594 + + + + Santa Rosa de Cabal + 66682 + + municipality + CO-66682 + + + + Santuario + 66687 + + municipality + CO-66687 + + + + Bucaramanga + 68001 + + municipality + CO-68001 + + + + Aguada + 68013 + + municipality + CO-68013 + + + + Albania + 68020 + + municipality + CO-68020 + + + + Aratoca + 68051 + + municipality + CO-68051 + + + + Barbosa + 68077 + + municipality + CO-68077 + + + + Barichara + 68079 + + municipality + CO-68079 + + + + Barrancabermeja + 68081 + + municipality + CO-68081 + + + + Betulia + 68092 + + municipality + CO-68092 + + + + Bolívar + 68101 + + municipality + CO-68101 + + + + Cabrera + 68121 + + municipality + CO-68121 + + + + California + 68132 + + municipality + CO-68132 + + + + Capitanejo + 68147 + + municipality + CO-68147 + + + + Carcasí + 68152 + + municipality + CO-68152 + + + + Cepitá + 68160 + + municipality + CO-68160 + + + + Cerrito + 68162 + + municipality + CO-68162 + + + + Charalá + 68167 + + municipality + CO-68167 + + + + Charta + 68169 + + municipality + CO-68169 + + + + Chima + 68176 + + municipality + CO-68176 + + + + Chipatá + 68179 + + municipality + CO-68179 + + + + Cimitarra + 68190 + + municipality + CO-68190 + + + + Concepción + 68207 + + municipality + CO-68207 + + + + Confines + 68209 + + municipality + CO-68209 + + + + Contratación + 68211 + + municipality + CO-68211 + + + + Coromoro + 68217 + + municipality + CO-68217 + + + + Curití + 68229 + + municipality + CO-68229 + + + + El Carmen de Chucurí + 68235 + + municipality + CO-68235 + + + + El Guacamayo + 68245 + + municipality + CO-68245 + + + + El Peñón + 68250 + + municipality + CO-68250 + + + + El Playón + 68255 + + municipality + CO-68255 + + + + Encino + 68264 + + municipality + CO-68264 + + + + Enciso + 68266 + + municipality + CO-68266 + + + + Florián + 68271 + + municipality + CO-68271 + + + + Floridablanca + 68276 + + municipality + CO-68276 + + + + Galán + 68296 + + municipality + CO-68296 + + + + Gambita + 68298 + + municipality + CO-68298 + + + + Girón + 68307 + + municipality + CO-68307 + + + + Guaca + 68318 + + municipality + CO-68318 + + + + Guadalupe + 68320 + + municipality + CO-68320 + + + + Guapotá + 68322 + + municipality + CO-68322 + + + + Guavatá + 68324 + + municipality + CO-68324 + + + + Güepsa + 68327 + + municipality + CO-68327 + + + + Hato + 68344 + + municipality + CO-68344 + + + + Jesús María + 68368 + + municipality + CO-68368 + + + + Jordán + 68370 + + municipality + CO-68370 + + + + La Belleza + 68377 + + municipality + CO-68377 + + + + Landázuri + 68385 + + municipality + CO-68385 + + + + La Paz + 68397 + + municipality + CO-68397 + + + + Lebríja + 68406 + + municipality + CO-68406 + + + + Los Santos + 68418 + + municipality + CO-68418 + + + + Macaravita + 68425 + + municipality + CO-68425 + + + + Málaga + 68432 + + municipality + CO-68432 + + + + Matanza + 68444 + + municipality + CO-68444 + + + + Mogotes + 68464 + + municipality + CO-68464 + + + + Molagavita + 68468 + + municipality + CO-68468 + + + + Ocamonte + 68498 + + municipality + CO-68498 + + + + Oiba + 68500 + + municipality + CO-68500 + + + + Onzaga + 68502 + + municipality + CO-68502 + + + + Palmar + 68522 + + municipality + CO-68522 + + + + Palmas del Socorro + 68524 + + municipality + CO-68524 + + + + Páramo + 68533 + + municipality + CO-68533 + + + + Piedecuesta + 68547 + + municipality + CO-68547 + + + + Pinchote + 68549 + + municipality + CO-68549 + + + + Puente Nacional + 68572 + + municipality + CO-68572 + + + + Puerto Parra + 68573 + + municipality + CO-68573 + + + + Puerto Wilches + 68575 + + municipality + CO-68575 + + + + Rionegro + 68615 + + municipality + CO-68615 + + + + Sabana de Torres + 68655 + + municipality + CO-68655 + + + + San Andrés + 68669 + + municipality + CO-68669 + + + + San Benito + 68673 + + municipality + CO-68673 + + + + San Gil + 68679 + + municipality + CO-68679 + + + + San Joaquín + 68682 + + municipality + CO-68682 + + + + San José de Miranda + 68684 + + municipality + CO-68684 + + + + San Miguel + 68686 + + municipality + CO-68686 + + + + San Vicente de Chucurí + 68689 + + municipality + CO-68689 + + + + Santa Bárbara + 68705 + + municipality + CO-68705 + + + + Santa Helena del Opón + 68720 + + municipality + CO-68720 + + + + Simacota + 68745 + + municipality + CO-68745 + + + + Socorro + 68755 + + municipality + CO-68755 + + + + Suaita + 68770 + + municipality + CO-68770 + + + + Sucre + 68773 + + municipality + CO-68773 + + + + Suratá + 68780 + + municipality + CO-68780 + + + + Tona + 68820 + + municipality + CO-68820 + + + + Valle de San José + 68855 + + municipality + CO-68855 + + + + Vélez + 68861 + + municipality + CO-68861 + + + + Vetas + 68867 + + municipality + CO-68867 + + + + Villanueva + 68872 + + municipality + CO-68872 + + + + Zapatoca + 68895 + + municipality + CO-68895 + + + + Sincelejo + 70001 + + municipality + CO-70001 + + + + Buenavista + 70110 + + municipality + CO-70110 + + + + Caimito + 70124 + + municipality + CO-70124 + + + + Coloso + 70204 + + municipality + CO-70204 + + + + Corozal + 70215 + + municipality + CO-70215 + + + + Coveñas + 70221 + + municipality + CO-70221 + + + + Chalán + 70230 + + municipality + CO-70230 + + + + El Roble + 70233 + + municipality + CO-70233 + + + + Galeras + 70235 + + municipality + CO-70235 + + + + Guaranda + 70265 + + municipality + CO-70265 + + + + La Unión + 70400 + + municipality + CO-70400 + + + + Los Palmitos + 70418 + + municipality + CO-70418 + + + + Majagual + 70429 + + municipality + CO-70429 + + + + Morroa + 70473 + + municipality + CO-70473 + + + + Ovejas + 70508 + + municipality + CO-70508 + + + + Palmito + 70523 + + municipality + CO-70523 + + + + Sampués + 70670 + + municipality + CO-70670 + + + + San Benito Abad + 70678 + + municipality + CO-70678 + + + + San Juan de Betulia + 70702 + + municipality + CO-70702 + + + + San Marcos + 70708 + + municipality + CO-70708 + + + + San Onofre + 70713 + + municipality + CO-70713 + + + + San Pedro + 70717 + + municipality + CO-70717 + + + + San Luis de Sincé + 70742 + + municipality + CO-70742 + + + + Sucre + 70771 + + municipality + CO-70771 + + + + Santiago de Tolú + 70820 + + municipality + CO-70820 + + + + Tolú Viejo + 70823 + + municipality + CO-70823 + + + + Ibagué + 73001 + + municipality + CO-73001 + + + + Alpujarra + 73024 + + municipality + CO-73024 + + + + Alvarado + 73026 + + municipality + CO-73026 + + + + Ambalema + 73030 + + municipality + CO-73030 + + + + Anzoátegui + 73043 + + municipality + CO-73043 + + + + Armero + 73055 + + municipality + CO-73055 + + + + Ataco + 73067 + + municipality + CO-73067 + + + + Cajamarca + 73124 + + municipality + CO-73124 + + + + Carmen de Apicalá + 73148 + + municipality + CO-73148 + + + + Casabianca + 73152 + + municipality + CO-73152 + + + + Chaparral + 73168 + + municipality + CO-73168 + + + + Coello + 73200 + + municipality + CO-73200 + + + + Coyaima + 73217 + + municipality + CO-73217 + + + + Cunday + 73226 + + municipality + CO-73226 + + + + Dolores + 73236 + + municipality + CO-73236 + + + + Espinal + 73268 + + municipality + CO-73268 + + + + Falan + 73270 + + municipality + CO-73270 + + + + Flandes + 73275 + + municipality + CO-73275 + + + + Fresno + 73283 + + municipality + CO-73283 + + + + Guamo + 73319 + + municipality + CO-73319 + + + + Herveo + 73347 + + municipality + CO-73347 + + + + Honda + 73349 + + municipality + CO-73349 + + + + Icononzo + 73352 + + municipality + CO-73352 + + + + Lérida + 73408 + + municipality + CO-73408 + + + + Líbano + 73411 + + municipality + CO-73411 + + + + Mariquita + 73443 + + municipality + CO-73443 + + + + Melgar + 73449 + + municipality + CO-73449 + + + + Murillo + 73461 + + municipality + CO-73461 + + + + Natagaima + 73483 + + municipality + CO-73483 + + + + Ortega + 73504 + + municipality + CO-73504 + + + + Palocabildo + 73520 + + municipality + CO-73520 + + + + Piedras + 73547 + + municipality + CO-73547 + + + + Planadas + 73555 + + municipality + CO-73555 + + + + Prado + 73563 + + municipality + CO-73563 + + + + Purificación + 73585 + + municipality + CO-73585 + + + + Rioblanco + 73616 + + municipality + CO-73616 + + + + Roncesvalles + 73622 + + municipality + CO-73622 + + + + Rovira + 73624 + + municipality + CO-73624 + + + + Saldaña + 73671 + + municipality + CO-73671 + + + + San Antonio + 73675 + + municipality + CO-73675 + + + + San Luis + 73678 + + municipality + CO-73678 + + + + Santa Isabel + 73686 + + municipality + CO-73686 + + + + Suárez + 73770 + + municipality + CO-73770 + + + + Valle de San Juan + 73854 + + municipality + CO-73854 + + + + Venadillo + 73861 + + municipality + CO-73861 + + + + Villahermosa + 73870 + + municipality + CO-73870 + + + + Villarrica + 73873 + + municipality + CO-73873 + + + + Cali + 76001 + + municipality + CO-76001 + + + + Alcalá + 76020 + + municipality + CO-76020 + + + + Andalucía + 76036 + + municipality + CO-76036 + + + + Ansermanuevo + 76041 + + municipality + CO-76041 + + + + Argelia + 76054 + + municipality + CO-76054 + + + + Bolívar + 76100 + + municipality + CO-76100 + + + + Buenaventura + 76109 + + municipality + CO-76109 + + + + Guadalajara de Buga + 76111 + + municipality + CO-76111 + + + + Bugalagrande + 76113 + + municipality + CO-76113 + + + + Caicedonia + 76122 + + municipality + CO-76122 + + + + Calima + 76126 + + municipality + CO-76126 + + + + Candelaria + 76130 + + municipality + CO-76130 + + + + Cartago + 76147 + + municipality + CO-76147 + + + + Dagua + 76233 + + municipality + CO-76233 + + + + El Águila + 76243 + + municipality + CO-76243 + + + + El Cairo + 76246 + + municipality + CO-76246 + + + + El Cerrito + 76248 + + municipality + CO-76248 + + + + El Dovio + 76250 + + municipality + CO-76250 + + + + Florida + 76275 + + municipality + CO-76275 + + + + Ginebra + 76306 + + municipality + CO-76306 + + + + Guacarí + 76318 + + municipality + CO-76318 + + + + Jamundí + 76364 + + municipality + CO-76364 + + + + La Cumbre + 76377 + + municipality + CO-76377 + + + + La Unión + 76400 + + municipality + CO-76400 + + + + La Victoria + 76403 + + municipality + CO-76403 + + + + Obando + 76497 + + municipality + CO-76497 + + + + Palmira + 76520 + + municipality + CO-76520 + + + + Pradera + 76563 + + municipality + CO-76563 + + + + Restrepo + 76606 + + municipality + CO-76606 + + + + Riofrío + 76616 + + municipality + CO-76616 + + + + Roldanillo + 76622 + + municipality + CO-76622 + + + + San Pedro + 76670 + + municipality + CO-76670 + + + + Sevilla + 76736 + + municipality + CO-76736 + + + + Toro + 76823 + + municipality + CO-76823 + + + + Trujillo + 76828 + + municipality + CO-76828 + + + + Tuluá + 76834 + + municipality + CO-76834 + + + + Ulloa + 76845 + + municipality + CO-76845 + + + + Versalles + 76863 + + municipality + CO-76863 + + + + Vijes + 76869 + + municipality + CO-76869 + + + + Yotoco + 76890 + + municipality + CO-76890 + + + + Yumbo + 76892 + + municipality + CO-76892 + + + + Zarzal + 76895 + + municipality + CO-76895 + + + + Arauca + 81001 + + municipality + CO-81001 + + + + Arauquita + 81065 + + municipality + CO-81065 + + + + Cravo Norte + 81220 + + municipality + CO-81220 + + + + Fortul + 81300 + + municipality + CO-81300 + + + + Puerto Rondón + 81591 + + municipality + CO-81591 + + + + Saravena + 81736 + + municipality + CO-81736 + + + + Tame + 81794 + + municipality + CO-81794 + + + + Yopal + 85001 + + municipality + CO-85001 + + + + Aguazul + 85010 + + municipality + CO-85010 + + + + Chameza + 85015 + + municipality + CO-85015 + + + + Hato Corozal + 85125 + + municipality + CO-85125 + + + + La Salina + 85136 + + municipality + CO-85136 + + + + Maní + 85139 + + municipality + CO-85139 + + + + Monterrey + 85162 + + municipality + CO-85162 + + + + Nunchía + 85225 + + municipality + CO-85225 + + + + Orocué + 85230 + + municipality + CO-85230 + + + + Paz de Ariporo + 85250 + + municipality + CO-85250 + + + + Pore + 85263 + + municipality + CO-85263 + + + + Recetor + 85279 + + municipality + CO-85279 + + + + Sabanalarga + 85300 + + municipality + CO-85300 + + + + Sácama + 85315 + + municipality + CO-85315 + + + + San Luis de Palenque + 85325 + + municipality + CO-85325 + + + + Támara + 85400 + + municipality + CO-85400 + + + + Tauramena + 85410 + + municipality + CO-85410 + + + + Trinidad + 85430 + + municipality + CO-85430 + + + + Villanueva + 85440 + + municipality + CO-85440 + + + + Mocoa + 86001 + + municipality + CO-86001 + + + + Colón + 86219 + + municipality + CO-86219 + + + + Orito + 86320 + + municipality + CO-86320 + + + + Puerto Asís + 86568 + + municipality + CO-86568 + + + + Puerto Caicedo + 86569 + + municipality + CO-86569 + + + + Puerto Guzmán + 86571 + + municipality + CO-86571 + + + + Leguízamo + 86573 + + municipality + CO-86573 + + + + Sibundoy + 86749 + + municipality + CO-86749 + + + + San Francisco + 86755 + + municipality + CO-86755 + + + + San Miguel + 86757 + + municipality + CO-86757 + + + + Santiago + 86760 + + municipality + CO-86760 + + + + Valle del Guamuez + 86865 + + municipality + CO-86865 + + + + Villagarzón + 86885 + + municipality + CO-86885 + + + + San Andrés + 88001 + + municipality + CO-88001 + + + + Providencia + 88564 + + municipality + CO-88564 + + + + Leticia + 91001 + + municipality + CO-91001 + + + + El Encanto + 91263 + + municipality + CO-91263 + + + + La Chorrera + 91405 + + municipality + CO-91405 + + + + La Pedrera + 91407 + + municipality + CO-91407 + + + + La Victoria + 91430 + + municipality + CO-91430 + + + + Miriti - Paraná + 91460 + + municipality + CO-91460 + + + + Puerto Alegría + 91530 + + municipality + CO-91530 + + + + Puerto Arica + 91536 + + municipality + CO-91536 + + + + Puerto Nariño + 91540 + + municipality + CO-91540 + + + + Puerto Santander + 91669 + + municipality + CO-91669 + + + + Tarapacá + 91798 + + municipality + CO-91798 + + + + Inírida + 94001 + + municipality + CO-94001 + + + + Barranco Minas + 94343 + + municipality + CO-94343 + + + + Mapiripana + 94663 + + municipality + CO-94663 + + + + San José del Guaviare + 95001 + + municipality + CO-95001 + + + + Calamar + 95015 + + municipality + CO-95015 + + + + El Retorno + 95025 + + municipality + CO-95025 + + + + Miraflores + 95200 + + municipality + CO-95200 + + + + Mitú + 97001 + + municipality + CO-97001 + + + + Caruru + 97161 + + municipality + CO-97161 + + + + Taraira + 97666 + + municipality + CO-97666 + + + + Puerto Carreño + 99001 + + municipality + CO-99001 + + + + La Primavera + 99524 + + municipality + CO-99524 + + + + Santa Rosalía + 99624 + + municipality + CO-99624 + + + + Cumaribo + 99773 + + municipality + CO-99773 + + + + + diff --git a/modules/account_co_co/party.py b/modules/account_co_co/party.py new file mode 100644 index 0000000..2a335d3 --- /dev/null +++ b/modules/account_co_co/party.py @@ -0,0 +1,419 @@ +from trytond.model import fields, ModelSQL, ModelView, Unique, sequence_ordered +from trytond.pool import PoolMeta, Pool +from trytond.pyson import Eval, Not, Equal, And +from trytond.i18n import gettext +from .exceptions import PartyIdentifierError + +import logging + +logger = logging.getLogger(__name__) + +__all__ = [ + 'PartyIdentifier', + 'Party', + 'ContactMechanism', + 'Address', + 'PartyTaxLevelCode' +] + + +TAX_CO_IDENTIFIERS = [ + (None, ''), + ('11', 'Registro Civil'), + ('12', 'Tarjeta de Identidad'), + ('13', 'Cedula de Ciudadania'), + ('21', 'Tarjeta de Extranjeria'), + ('22', 'Cedula de Extranjeria'), + ('31', 'NIT'), + ('41', 'Pasaporte'), + ('42', 'Tipo de Documento Extranjero'), + ('43', 'Documento de identificación extranjero'), + ('50', 'NIT de otro país'), + ('91', 'NUIP') +] +CO_CONTACT_MECHANISM_TYPES = [ + ('sms', 'SMS') +] + + +class Party(metaclass=PoolMeta): + "Party Colombian" + __name__ = 'party.party' + + first_name = fields.Char("Primer Nombre", states={ + 'invisible': Not(Eval('type_person') == '2'), } + ) + second_name = fields.Char("Segundo Nombre", states={ + 'invisible': Not(Eval('type_person') == '2'), } + ) + first_surname = fields.Char("Primer Apellido", states={ + 'invisible': Not(Eval('type_person') == '2'), } + ) + second_surname = fields.Char("Segundo Apellido", states={ + 'invisible': Not(Eval('type_person') == '2'), }, + depends=['type_person']) + birth_date = fields.Date('Fecha de nacimiento') + tax_regime = fields.Selection([ + (None, ''), + ('48', 'Responsable del impuesto sobre las ventas –IVA'), + ('49', 'No responsable de IVA') + ], 'Tax Regime') + type_taxpayer = fields.Selection([ + (None, ''), + ('regimen_simplificado', 'Regimen Simplificado'), + ('regimen_comun', 'Regimen Comun'), + ('gran_contribuyente', 'Gran Contribuyente'), + ('entidad_estatal', 'Entidad Estatal'), + ('domiciliado_extranjero', 'Domiciliado en Extranjero'), + ], 'Type Taxpayer') + type_person = fields.Selection([ + (None, ''), + ('1', 'Persona Juridica'), + ('2', 'Persona Natural'), + ], 'Type Person') + self_withholding = fields.Boolean('Self Withholding') + declarant = fields.Boolean('Declarant') + main_ciiu = fields.Char('Main Activity', size=4) + secondary_ciiu = fields.Char('Secondary Activity', size=4) + other_ciiu = fields.Char('Other Activity', size=4) + age = fields.Function(fields.Integer('Edad'), 'on_change_with_age') + type_tax_identifier = fields.Function( + fields.Selection('get_types_identifier', 'Tipo de Identidad'), + 'on_change_with_type_tax_identifier') + tax_level_code = fields.Many2Many( + 'party.party_tax_level_code', 'party', 'tax_level_code', + "TaxLevelCode") + + @classmethod + def __setup__(cls): + super(Party, cls).__setup__() + cls.name.required = True + + @staticmethod + def default_type_person(): + return '2' + + @classmethod + def tax_identifier_types(cls): + return ['12', '13', '31'] + + @classmethod + def get_tax_level_code(cls): + pool = Pool() + TaxLevelCode = pool.get('party.tax_level_code') + return TaxLevelCode.fields_get(['code'])['code'] + + @fields.depends('birth_date') + def on_change_with_age(self, name=None): + if self.birth_date: + Date = Pool().get('ir.date') + today = Date.today() + age = today.year - self.birth_date.year + age -= (today.month, today.day) < ( + self.birth_date.month, self.birth_date.day) + return age + + @fields.depends('name', 'first_name', 'second_name', 'first_surname', + 'second_surname', 'type_person') + def on_change_type_person(self): + if self.type_person == '2': + self.on_change_name() + if self.type_person == '1': + pass + + @fields.depends('name', 'first_name', 'second_name', 'first_surname', + 'second_surname', 'type_person') + def on_change_name(self): + self.rebuild_name() + + @fields.depends('name', 'first_name', 'second_name', 'first_surname', + 'second_surname', 'type_person') + def on_change_first_name(self): + self.rebuild_name() + + @fields.depends('name', 'first_name', 'second_name', 'first_surname', + 'second_surname', 'type_person') + def on_change_second_name(self): + self.rebuild_name() + + @fields.depends('name', 'first_name', 'second_name', 'first_surname', + 'second_surname', 'type_person') + def on_change_second_surname(self): + self.rebuild_name() + + @fields.depends('name', 'first_name', 'second_name', 'first_surname', + 'second_surname', 'type_person') + def on_change_first_surname(self): + self.rebuild_name() + + def rebuild_name(self): + """reconstruye los campos relacionados con el nombre dependiendo de + estos y del tipo de persona.""" + + if self.type_person == '2': + if not (self.first_name or self.second_name + or self.first_surname or self.second_surname): + if self.name: + self.first_name, self.second_name, self.first_surname, \ + self.second_surname = self.split_name(self.name) + else: + return + else: + self.name = self.get_full_name() + if self.type_person == '1': + if self.name: + self.clean_split_name() + else: + self.name = self.get_full_name() + + def clean_split_name(self): + self.first_name = self.second_name = self.first_surname = self.second_surname = '' + + @staticmethod + def split_name(name): + """Divide un nombre completo en una lista de 4 elementos""" + + second_surname = None + first_surname = None + second_name = None + first_name = None + names = name.split(' ') + if len(names) > 0: + first_name = names[0] + if len(names) == 2: + second_surname = None + first_surname = names[1] + elif len(names) == 3: + first_surname = names[1] + second_surname = names[2] + elif len(names) >= 4: + second_name = names[1] + first_surname = names[2] + second_surname = " ".join(names[3:]) + return [first_name, second_name, first_surname, second_surname] + + @fields.depends('identifiers') + def on_change_with_type_tax_identifier(self, name=None): + types = self._tax_identifier_types() + if self.identifiers: + for identifier in self.identifiers: + if identifier.type in types: + return identifier.type + + @fields.depends('identifiers') + def on_change_with_tax_identifier(self, name=None): + if self.identifiers: + return self.get_tax_identifier(name) + + @classmethod + def _tax_identifier_types(cls): + types = super(Party, cls).tax_identifier_types() + types.extend(['31', '13']) + return types + + def get_full_name(self, name=None): + if self.type_person == '2': + name_list = [self.first_name, self.second_name, + self.first_surname, self.second_surname] + return " ".join([x for x in name_list if x]) + return self.name + + @staticmethod + def get_types_identifier(): + PartyIdentifier = Pool().get('party.identifier') + return PartyIdentifier.type.selection + + def pre_validate(self): + super(Party, self).pre_validate() + if not self.identifiers: + raise PartyIdentifierError(gettext( + 'account_co_co.msg_not_identifier')) + + +class PartyIdentifier(metaclass=PoolMeta): + "Party Identifier Colombian" + __name__ = "party.identifier" + + expedition_city = fields.Many2One( + "country.subdivision", 'Ciudad de Expedicion', + help="Lugar donde fue expedido el documento de identidad", + domain=[ + ('parent', '!=', None)], + states={'invisible': Not(Equal(Eval('type'), '13')), } + ) + rut = fields.Boolean('Rut', + states={ + 'invisible': And( + Not(Equal(Eval('type'), ('12'))), + Not(Equal(Eval('type'), ('13'))), + Not(Equal(Eval('type'), ('31')))), + 'readonly': Equal(Eval('type'), ('31'))}) + check_digit = fields.Function( + fields.Integer('DV', + help='Digito de Verificacion colombiano', + states={'invisible': ~Eval('rut', False)}), + 'on_change_with_check_digit') + + @classmethod + def __setup__(cls): + super(PartyIdentifier, cls).__setup__() + cls.type.selection = TAX_CO_IDENTIFIERS + cls.type.required = True + table = cls.__table__() + cls._sql_constraints += [ + ('UniqueIdentifier', Unique(table, table.code, table.type), + 'La identificacion ya existe') + ] + + @fields.depends('rut', 'type') + def on_change_type(self): + if self.type == '31': + self.rut = True + + @fields.depends('type', 'code') + def on_change_with_check_digit(self, name=None): + try: + import stdnum.co.nit # la version debe ser mayor a la 1.2 o 1.3 + except BaseException: + raise PartyIdentifierError(gettext( + 'account_co_co.msg_stdnum_error')) + if self.type and self.code: + if self.type in ('12', '13', '31') and self.code.isdigit(): + return int(stdnum.co.nit.calc_check_digit(self.code)) + + @fields.depends('type', 'party', 'code', 'rut') + def check_code(self): + + super(PartyIdentifier, self).check_code() + tax_identifiers = ['12', '13', '31'] + + if self.type == '31': + self.rut = True + if self.rut is not False and self.type in tax_identifiers: + # generalizar multiples paises + # puede ser por el country del party de la company actual + try: + # la version debe ser mayor a la 1.2 o 1.3 + import stdnum.co.nit + except BaseException: + raise PartyIdentifierError(gettext( + 'account_co_co.msg_stdnum_error')) + + if self.code.isdigit() is not True: + raise PartyIdentifierError(gettext( + 'account_co_co.msg_invalid_vat_str')) + + if not stdnum.co.nit.is_valid(self.code + str(self.check_digit)): + if self.party and self.party.id > 0: + party = self.party.rec_name + else: + party = '' + raise PartyIdentifierError( + gettext('account_co_co.msg_invalid_vat', + code=self.code)) + + if self.type in tax_identifiers and not self.code.isdigit(): + if self.party and self.party.id > 0: + party = self.party.rec_name + else: + party = '' + raise PartyIdentifierError( + gettext('account_co_co.msg_invalid_vat', + code=self.code)) + + @staticmethod + def default_rut(): + return False + + def get_rec_name(self, name=None): + if self.code: + return self.code + elif self.id: + return self.id + return '' + + +class PartyTaxLevelCode(ModelSQL, ModelView): + "Party Tax Level Code" + __name__ = 'party.party_tax_level_code' + + party = fields.Many2One('party.party', 'Party', ) + tax_level_code = fields.Many2One('party.tax_level_code', 'TaxLevelCode') + + +class ContactMechanism(sequence_ordered(), ModelSQL, ModelView): + "Contact Mechanism" + __name__ = 'party.contact_mechanism' + __metaclass__ = PoolMeta + + @classmethod + def __setup__(cls): + super(ContactMechanism, cls).__setup__() + cls.type.selection.extend(CO_CONTACT_MECHANISM_TYPES) + + +class Address(ModelSQL, ModelView): + "Address" + + __metaclass__ = PoolMeta + __name__ = 'party.address' + + subdivision_municipality = fields.Many2One( + "country.subdivision", + 'Municipality', + domain=[ + ('country', '=', Eval('country', -1)), + ('parent', '=', Eval('subdivision', -1)), + ('type', '=', 'municipality') + ], + depends=['country', 'subdivision', 'city'], + required=True + ) + subdivision_localities = fields.Many2One( + "country.subdivision", + 'Localities', + domain=[ + ('country', '=', Eval('country', -1)), + ('parent', '=', Eval('subdivision', -1)), + ('type', '=', 'localities'), + ], + depends=['country', 'subdivision'], + ) + + @fields.depends('subdivision', 'subdivision_municipality', 'country') + def on_change_country(self): + super(Address, self).on_change_country() + if (self.subdivision_municipality + and self.subdivision_municipality.parent != self.subdivision): + self.subdivision_municipality = None + self.subdivision_localities = None + + @fields.depends('subdivision', 'subdivision_municipality', + 'subdivision_localities') + def on_change_subdivision(self): + pool = Pool() + Subdivision = pool.get('country.subdivision') + bogota = Subdivision.search(['code', '=', 'CO-11001']) + + if hasattr(super(Address, self), 'on_change_subdivision'): + super(Address, self).on_change_subdivision() + if (self.subdivision_municipality + and self.subdivision_municipality.parent != self.subdivision): + self.subdivision_municipality = None + self.subdivision_localities = None + + if self.subdivision and self.subdivision.code == "CO-11": + self.subdivision_municipality = bogota[0].id + else: + self.subdivision_localities = None + + if self.subdivision_localities and self.subdivision.code != "CO-11": + self.subdivision_localities = None + + @fields.depends('city', 'subdivision_municipality') + def on_change_subdivision_municipality(self): + if self.subdivision_municipality: + self.city = self.subdivision_municipality.name + else: + self.city = None + self.subdivision_localities = None diff --git a/modules/account_co_co/party.xml b/modules/account_co_co/party.xml new file mode 100644 index 0000000..1ddfbc1 --- /dev/null +++ b/modules/account_co_co/party.xml @@ -0,0 +1,27 @@ + + + + + + party.party + + party_form + + + party.party + + party_tree + + + party.identifier + + identifier_form + + + party.identifier + + identifier_tree + + + diff --git a/modules/account_co_co/rut.py b/modules/account_co_co/rut.py new file mode 100644 index 0000000..1c8a906 --- /dev/null +++ b/modules/account_co_co/rut.py @@ -0,0 +1,9 @@ +from trytond.model import fields, ModelSQL, ModelView + + +class TaxLevelCode(ModelSQL, ModelView): + "Tax Level Code" + __name__ = 'party.tax_level_code' + + code = fields.Char('Code', required=True) + name = fields.Char('Name', required=True) diff --git a/modules/account_co_co/rut.xml b/modules/account_co_co/rut.xml new file mode 100644 index 0000000..8cc755b --- /dev/null +++ b/modules/account_co_co/rut.xml @@ -0,0 +1,34 @@ + + + + + + Parties Tax Level Code + party.tax_level_code + + + + party.tax_level_code + tree + party_tax_level_code_tree + + + + party.tax_level_code + form + party_tax_level_code_form + + + + + + + + + + + + + + diff --git a/modules/account_co_co/setup.py b/modules/account_co_co/setup.py new file mode 100755 index 0000000..1640d57 --- /dev/null +++ b/modules/account_co_co/setup.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 +import io +import os +import re +from configparser import ConfigParser + +from setuptools import find_packages, setup + +MODULE2PREFIX = {} + + +def read(fname): + content = io.open( + os.path.join(os.path.dirname(__file__), fname), + 'r', encoding='utf-8').read() + content = re.sub( + r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content) + return content + + +def get_require_version(name): + require = '%s >= %s.%s, < %s.%s' + require %= (name, major_version, minor_version, + major_version, minor_version + 1) + return require + + +config = ConfigParser() +config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg'))) +info = dict(config.items('tryton')) +for key in ('depends', 'extras_depend', 'xml'): + if key in info: + info[key] = info[key].strip().splitlines() +version = info.get('version', '0.0.1') +major_version, minor_version, _ = version.split('.', 2) +major_version = int(major_version) +minor_version = int(minor_version) +name = 'trytondo_account_co_co' + +requires = [] +for dep in info.get('depends', []): + if not re.match(r'(ir|res)(\W|$)', dep): + prefix = MODULE2PREFIX.get(dep, 'trytond') + requires.append(get_require_version('%s_%s' % (prefix, dep))) +requires.append(get_require_version('trytond')) + +tests_require = [get_require_version('proteus')] + +setup(name=name, + version=version, + description='Account for Colombia', + long_description=read('README.rst'), + author='OneCluster', + author_email='info@onecluster.org', + url='https://gitea.onecluster.org/OneTeam/trytondo-account_co_co', + keywords='account, colombia', + package_dir={'trytond.modules.account_co_co': '.'}, + packages=( + ['trytond.modules.account_co_co'] + + ['trytond.modules.account_co_co.%s' % p + for p in find_packages()] + ), + package_data={ + 'trytond.modules.account_co_co': (info.get('xml', []) + + ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt', + 'icons/*.svg', 'tests/*.rst', 'tests/*.json']), + }, + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Plugins', + 'Framework :: Tryton', + 'Intended Audience :: Developers', + 'Intended Audience :: Financial and Insurance Industry', + 'Intended Audience :: Legal Industry', + 'License :: OSI Approved :: ' + 'GNU General Public License v3 or later (GPLv3+)', + 'Natural Language :: Bulgarian', + 'Natural Language :: Catalan', + 'Natural Language :: Chinese (Simplified)', + 'Natural Language :: Czech', + 'Natural Language :: Dutch', + 'Natural Language :: English', + 'Natural Language :: Finnish', + 'Natural Language :: French', + 'Natural Language :: German', + 'Natural Language :: Hungarian', + 'Natural Language :: Indonesian', + 'Natural Language :: Italian', + 'Natural Language :: Persian', + 'Natural Language :: Polish', + 'Natural Language :: Portuguese (Brazilian)', + 'Natural Language :: Romanian', + 'Natural Language :: Russian', + 'Natural Language :: Slovenian', + 'Natural Language :: Spanish', + 'Natural Language :: Turkish', + 'Natural Language :: Ukrainian', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: Implementation :: CPython', + 'Topic :: Office/Business', + ], + license='GPL-3', + python_requires='>=3.8', + # install_requires=requires, + extras_require={ + 'test': tests_require, + }, + zip_safe=False, + entry_points=""" + [trytond.modules] + account_co_co = trytond.modules.account_co_co + """, # noqa: E501 + ) diff --git a/modules/account_co_co/subdivision.py b/modules/account_co_co/subdivision.py new file mode 100644 index 0000000..bf66dbc --- /dev/null +++ b/modules/account_co_co/subdivision.py @@ -0,0 +1,10 @@ +from trytond.pool import PoolMeta + + +class Subdivision(metaclass=PoolMeta): + __name__ = 'country.subdivision' + + @classmethod + def __setup__(cls): + super(Subdivision, cls).__setup__() + cls.type.selection.append(('localities', 'Localities')) diff --git a/modules/account_co_co/subdivisions_colombia.xml b/modules/account_co_co/subdivisions_colombia.xml new file mode 100644 index 0000000..2b3b75c --- /dev/null +++ b/modules/account_co_co/subdivisions_colombia.xml @@ -0,0 +1,242 @@ + + + + + Colombia + CO + COL + 170 + + + Amazonas + department + + CO-91 + 91 + + + Antioquia + department + + CO-05 + 05 + + + Arauca + department + + CO-81 + 81 + + + Atlántico + department + + CO-08 + 08 + + + Bolívar + department + + CO-13 + 13 + + + Boyacá + department + + CO-15 + 15 + + + Caldas + department + + CO-17 + 17 + + + Caquetá + department + + CO-18 + 18 + + + Casanare + department + + CO-85 + 85 + + + Cauca + department + + CO-19 + 19 + + + Cesar + department + + CO-20 + 20 + + + Chocó + department + + CO-27 + 27 + + + Córdoba + department + + CO-23 + 23 + + + Cundinamarca + department + + CO-25 + 25 + + + Bogotá + capital district + + CO-11 + 11 + + + Guainía + department + + CO-94 + 94 + + + Guaviare + department + + CO-95 + 95 + + + Huila + department + + CO-41 + 41 + + + La Guajira + department + + CO-44 + 44 + + + Magdalena + department + + CO-47 + 47 + + + Meta + department + + CO-50 + 50 + + + Nariño + department + + CO-52 + 52 + + + Norte de Santander + department + + CO-54 + 54 + + + Putumayo + department + + CO-86 + 86 + + + Quindío + department + + CO-63 + 63 + + + Risaralda + department + + CO-66 + 66 + + + San Andrés y Providencia + department + + CO-88 + 88 + + + Santander + department + + CO-68 + 68 + + + Sucre + department + + CO-70 + 70 + + + Tolima + department + + CO-73 + 73 + + + Valle del Cauca + department + + CO-76 + 76 + + + Vaupés + department + + CO-97 + 97 + + + Vichada + department + + CO-99 + 99 + + + diff --git a/modules/account_co_co/tests/__init__.py b/modules/account_co_co/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/modules/account_co_co/tests/test_account_co_co.py b/modules/account_co_co/tests/test_account_co_co.py new file mode 100644 index 0000000..8c42065 --- /dev/null +++ b/modules/account_co_co/tests/test_account_co_co.py @@ -0,0 +1,9 @@ +from trytond.tests.test_tryton import ModuleTestCase + + +class AccountCoCoTestCase(ModuleTestCase): + 'Test Account Co Co module' + module = 'account_co_co' + + +del ModuleTestCase diff --git a/modules/account_co_co/tipo_responsabilidad.xml b/modules/account_co_co/tipo_responsabilidad.xml new file mode 100644 index 0000000..e384b39 --- /dev/null +++ b/modules/account_co_co/tipo_responsabilidad.xml @@ -0,0 +1,33 @@ + + + + + Gran contribuyente + O-13 + + + Autorretenedor + O-15 + + + Agente de retención en el impuesto sobre las ventas + O-23 + + + Régimen Simple de Tributación – SIMPLE + O-47 + + + Impuesto sobre las ventas + O-48 + + + No responsable de IVA + O-49 + + + No aplica - Otros + R-99-PN + + + diff --git a/modules/account_co_co/tox.ini b/modules/account_co_co/tox.ini new file mode 100644 index 0000000..601a866 --- /dev/null +++ b/modules/account_co_co/tox.ini @@ -0,0 +1,15 @@ +[tox] +envlist = {py36,py37,py38}-{sqlite,postgresql},pypy3-{sqlite,postgresql} + +[testenv] +commands = {envpython} setup.py test +deps = + {py36,py37,py38}-postgresql: psycopg2 >= 2.5 + pypy3-postgresql: psycopg2cffi >= 2.5 + py36-sqlite: sqlitebck +setenv = + sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} + postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} + sqlite: DB_NAME={env:SQLITE_NAME::memory:} + postgresql: DB_NAME={env:POSTGRESQL_NAME:test} +install_command = pip install --pre --find-links https://trydevpi.tryton.org/?mirror=github {opts} {packages} diff --git a/modules/account_co_co/tryton.cfg b/modules/account_co_co/tryton.cfg new file mode 100644 index 0000000..c462677 --- /dev/null +++ b/modules/account_co_co/tryton.cfg @@ -0,0 +1,19 @@ +[tryton] +version=6.8.0 +depends: + ir + party + country + account +xml: + account.xml + party.xml + address.xml + rut.xml + message.xml + subdivisions_colombia.xml + municipalities_colombia.xml + localities_colombia.xml + address_subdivision_types_colombia.xml + tipo_responsabilidad.xml + configuration.xml \ No newline at end of file diff --git a/modules/account_co_co/view/address_form.xml b/modules/account_co_co/view/address_form.xml new file mode 100644 index 0000000..ee89854 --- /dev/null +++ b/modules/account_co_co/view/address_form.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/modules/account_co_co/view/configuration_form.xml b/modules/account_co_co/view/configuration_form.xml new file mode 100644 index 0000000..32b4013 --- /dev/null +++ b/modules/account_co_co/view/configuration_form.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/modules/account_co_co/view/identifier_form.xml b/modules/account_co_co/view/identifier_form.xml new file mode 100644 index 0000000..2f1aaff --- /dev/null +++ b/modules/account_co_co/view/identifier_form.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/modules/account_co_co/view/identifier_tree.xml b/modules/account_co_co/view/identifier_tree.xml new file mode 100644 index 0000000..fa05970 --- /dev/null +++ b/modules/account_co_co/view/identifier_tree.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/modules/account_co_co/view/party_form.xml b/modules/account_co_co/view/party_form.xml new file mode 100644 index 0000000..0cd9687 --- /dev/null +++ b/modules/account_co_co/view/party_form.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + diff --git a/modules/account_co_co/view/party_tax_level_code_form.xml b/modules/account_co_co/view/party_tax_level_code_form.xml new file mode 100644 index 0000000..eba4363 --- /dev/null +++ b/modules/account_co_co/view/party_tax_level_code_form.xml @@ -0,0 +1,7 @@ + +
+