Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Jorels Community
Edi
Commits
ba2020ea
Commit
ba2020ea
authored
Nov 02, 2020
by
Jorge Sanabria
Browse files
Update
parent
ec0d11b5
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
11850 additions
and
133 deletions
+11850
-133
l10n_co_edi_jorels/.gitignore
l10n_co_edi_jorels/.gitignore
+188
-0
l10n_co_edi_jorels/__manifest__.py
l10n_co_edi_jorels/__manifest__.py
+1
-1
l10n_co_edi_jorels/i18n/es_CO.po
l10n_co_edi_jorels/i18n/es_CO.po
+11423
-0
l10n_co_edi_jorels/models/account_invoice.py
l10n_co_edi_jorels/models/account_invoice.py
+179
-104
l10n_co_edi_jorels/models/config/res_company.py
l10n_co_edi_jorels/models/config/res_company.py
+5
-3
l10n_co_edi_jorels/models/config/res_config_settings.py
l10n_co_edi_jorels/models/config/res_config_settings.py
+5
-1
l10n_co_edi_jorels/models/mail_template.py
l10n_co_edi_jorels/models/mail_template.py
+4
-6
l10n_co_edi_jorels/report/report_invoice.xml
l10n_co_edi_jorels/report/report_invoice.xml
+19
-7
l10n_co_edi_jorels/views/account_invoice_view.xml
l10n_co_edi_jorels/views/account_invoice_view.xml
+5
-2
l10n_co_edi_jorels/views/config/res_config_settings_views.xml
..._co_edi_jorels/views/config/res_config_settings_views.xml
+18
-9
update_from_csv/.gitignore
update_from_csv/.gitignore
+3
-0
No files found.
l10n_co_edi_jorels/.gitignore
0 → 100644
View file @
ba2020ea
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
#lib/
#lib64/
parts/
sdist/
var/
wheels/
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
.hypothesis/
.pytest_cache/
# Translations
#*.mo
#*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# 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
# celery beat schedule file
celerybeat-schedule
# 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/
.idea/
controllers/__pycache__/
models/__pycache__/
models/listings/__pycache__/
tests/__pycache__/
l10n_co_edi_jorels/__manifest__.py
View file @
ba2020ea
...
...
@@ -35,7 +35,7 @@
# Odoo, OCA and Jorels dependencies
'depends'
:
[
'account'
,
'snailmail_account'
,
#
'snailmail_account',
'l10n_co'
,
#'web_notify',
'update_from_csv'
,
...
...
l10n_co_edi_jorels/i18n/es_CO.po
0 → 100644
View file @
ba2020ea
This diff is collapsed.
Click to expand it.
l10n_co_edi_jorels/models/account_invoice.py
View file @
ba2020ea
This diff is collapsed.
Click to expand it.
l10n_co_edi_jorels/models/config/res_company.py
View file @
ba2020ea
...
...
@@ -40,9 +40,9 @@ class ResCompany(models.Model):
type_organization_id
=
fields
.
Many2one
(
comodel_name
=
'l10n_co_edi_jorels.type_organizations'
,
string
=
"Tipo de organización"
)
type_regime_id
=
fields
.
Many2one
(
'l10n_co_edi_jorels.type_regimes'
,
compute
=
'_compute_edi'
,
inverse
=
"_inverse_type_regime_id"
,
string
=
"Tipo de regimen"
)
inverse
=
"_inverse_type_regime_id"
,
string
=
"Tipo de regimen"
)
type_liability_id
=
fields
.
Many2one
(
'l10n_co_edi_jorels.type_liabilities'
,
compute
=
'_compute_edi'
,
inverse
=
"_inverse_type_liability_id"
,
string
=
"Tipo de responsabilidad"
)
inverse
=
"_inverse_type_liability_id"
,
string
=
"Tipo de responsabilidad"
)
business_name
=
fields
.
Char
(
string
=
"Razón social para facturar"
)
merchant_registration
=
fields
.
Char
(
string
=
"Registro mercantil"
,
compute
=
'_compute_merchant_registration'
,
store
=
True
)
...
...
@@ -58,7 +58,7 @@ class ResCompany(models.Model):
# Api key
api_key
=
fields
.
Char
(
string
=
"Api key"
)
api_url
=
fields
.
Char
(
string
=
"Api url"
)
api_url
=
fields
.
Char
(
string
=
"Api url"
,
default
=
'https://jorels.apifacturacionelectronica.xyz'
)
# Software
software_id
=
fields
.
Char
(
string
=
"Software Id"
)
...
...
@@ -73,6 +73,8 @@ class ResCompany(models.Model):
# Test
is_not_test
=
fields
.
Boolean
(
string
=
"Entorno de producción"
,
default
=
False
)
test_set_id
=
fields
.
Char
(
string
=
"TestSetId"
)
enable_validate_state
=
fields
.
Boolean
(
string
=
"Habilitar estado intermedio de Validación DIAN en la facturación"
,
default
=
True
)
# Report
report_custom_text
=
fields
.
Html
(
string
=
"Custom text"
)
...
...
l10n_co_edi_jorels/models/config/res_config_settings.py
View file @
ba2020ea
...
...
@@ -37,7 +37,8 @@ class ResConfigSettings(models.TransientModel):
# Api key
api_key
=
fields
.
Char
(
related
=
"company_id.api_key"
,
string
=
"Api key"
,
readonly
=
False
)
api_url
=
fields
.
Char
(
related
=
"company_id.api_url"
,
string
=
"Api url"
,
readonly
=
False
)
api_url
=
fields
.
Char
(
related
=
"company_id.api_url"
,
string
=
"Api url"
,
readonly
=
False
,
default
=
'https://jorels.apifacturacionelectronica.xyz'
)
# Software
software_id
=
fields
.
Char
(
related
=
"company_id.software_id"
,
string
=
"Software Id"
,
readonly
=
False
)
...
...
@@ -55,6 +56,9 @@ class ResConfigSettings(models.TransientModel):
is_not_test
=
fields
.
Boolean
(
related
=
"company_id.is_not_test"
,
string
=
"Entorno de producción"
,
default
=
False
,
readonly
=
False
)
test_set_id
=
fields
.
Char
(
related
=
"company_id.test_set_id"
,
string
=
"TestSetId"
,
readonly
=
False
)
enable_validate_state
=
fields
.
Boolean
(
related
=
"company_id.enable_validate_state"
,
string
=
"Estado internedio Validación DIAN"
,
default
=
True
,
readonly
=
False
)
# Report
report_custom_text
=
fields
.
Html
(
related
=
"company_id.report_custom_text"
,
string
=
"Custom text"
,
readonly
=
False
)
...
...
l10n_co_edi_jorels/models/mail_template.py
View file @
ba2020ea
...
...
@@ -14,13 +14,11 @@ class MailTemplate(models.Model):
zip_filename
=
invoice
.
ei_zip_name
zip_string
=
invoice
.
ei_zip_base64_bytes
zip_attachments
=
invoice
.
_generate_email_attachment
(
zip_filename
,
zip_string
)
if
len
(
zip_attachments
)
==
1
and
template
.
report_name
:
report_name
=
self
.
_render_template
(
template
.
report_name
,
template
.
model
,
res_id
)
if
len
(
zip_attachments
)
==
1
and
zip_filename
:
ext
=
'.zip'
if
not
report_
name
.
endswith
(
ext
):
report_
name
+=
ext
attachments
=
[(
report_
name
,
zip_attachments
.
datas
)]
if
not
zip_file
name
.
endswith
(
ext
):
zip_file
name
+=
ext
attachments
=
[(
zip_file
name
,
zip_attachments
.
datas
)]
else
:
attachments
=
[(
a
.
name
,
a
.
datas
)
for
a
in
zip_attachments
]
res
[
res_id
][
'attachments'
]
+=
attachments
...
...
l10n_co_edi_jorels/report/report_invoice.xml
View file @
ba2020ea
...
...
@@ -25,7 +25,7 @@
<xpath
expr=
"//t[@t-set='address']"
position=
"replace"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
t-if=
"o.ei_is_not_test and
o.ei_is_valid and
o.ei_qr_image"
class=
"col-3"
>
<div
t-if=
"o.ei_is_not_test and o.ei_qr_image"
class=
"col-3"
>
<!-- With OCA -->
<!-- <img t-att-src="'/report/qr/?value=%s&error_correction=%s' % (o.ei_qr_data, 1)" style="width:100;height:100;"/>-->
...
...
@@ -53,7 +53,7 @@
<span
t-field=
"o.company_id.report_custom_text"
/>
</div>
</div>
<div
t-if=
"not o.ei_is_not_test or not
o.ei_is_valid or not
o.ei_qr_image"
class=
"col-3"
/>
<div
t-if=
"not o.ei_is_not_test or not o.ei_qr_image"
class=
"col-3"
/>
<div
class=
"col-4"
>
<h4>
Cliente
</h4>
<div
t-if=
"o.partner_id.vat"
class=
"mt16"
>
...
...
@@ -92,13 +92,13 @@
</div>
</xpath>
<xpath
expr=
"//div[@class='page']"
position=
"inside"
>
<div
t-if=
"o.ei_is_not_test
and o.ei_is_valid
"
class=
"container"
>
<div
t-if=
"o.ei_is_not_test"
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-12"
>
<div
class=
"mt16 text-center"
>
<div
t-if=
"o.ei_is_valid"
>
<strong
t-if=
"o.type == 'out_invoice' and not o.
origin
"
>
CUFE:
</strong>
<strong
t-if=
"o.type == 'out_invoice' and o.
origin
"
>
CUDE:
</strong>
<strong
t-if=
"o.type == 'out_invoice' and not o.
debit_invoice_id
"
>
CUFE:
</strong>
<strong
t-if=
"o.type == 'out_invoice' and o.
debit_invoice_id
"
>
CUDE:
</strong>
<strong
t-if=
"o.type == 'out_refund'"
>
CUDE:
</strong>
<span
t-field=
"o.ei_uuid"
/>
</div>
...
...
@@ -112,12 +112,14 @@
<span
t-field=
"o.journal_id.sequence_id.resolution_id.resolution_resolution_date"
/>
<br/>
<strong>
Rango autorizado desde:
</strong>
<span
t-field=
"o.journal_id.sequence_id.resolution_id.resolution_prefix"
/>
<span
t-field=
"o.journal_id.sequence_id.resolution_id.resolution_from"
/>
<strong>
Rango autorizado hasta:
</strong>
<strong>
hasta
</strong>
<span
t-field=
"o.journal_id.sequence_id.resolution_id.resolution_prefix"
/>
<span
t-field=
"o.journal_id.sequence_id.resolution_id.resolution_to"
/>
<strong>
Vigencia desde:
</strong>
<span
t-field=
"o.journal_id.sequence_id.resolution_id.resolution_date_from"
/>
<strong>
Vigencia
hasta
:
</strong>
<strong>
hasta
</strong>
<span
t-field=
"o.journal_id.sequence_id.resolution_id.resolution_date_to"
/>
<br/>
<strong>
Representación grafica de facturación electrónica impresa por computador por
...
...
@@ -128,6 +130,16 @@
</div>
</div>
</xpath>
<xpath
expr=
"//tr[@class='border-black o_total']"
position=
"before"
>
<tr
class=
"border-black"
style=
""
>
<td>
<strong>
Total sin retenciones
</strong>
</td>
<td
class=
"text-right"
>
<span
t-field=
"o.ei_amount_total_no_withholding"
/>
</td>
</tr>
</xpath>
</template>
</data>
</odoo>
\ No newline at end of file
l10n_co_edi_jorels/views/account_invoice_view.xml
View file @
ba2020ea
...
...
@@ -77,9 +77,12 @@
</group>
</group>
</page>
</xpath>
<xpath
expr=
"//field[@name='amount_tax']"
position=
"before"
>
<field
name=
"ei_amount_tax_no_withholding"
/>
<field
name=
"ei_amount_total_no_withholding"
class=
"oe_subtotal_footer_separator"
/>
<field
name=
"ei_amount_tax_withholding"
/>
</xpath>
</field>
</record>
</data>
...
...
l10n_co_edi_jorels/views/config/res_config_settings_views.xml
View file @
ba2020ea
...
...
@@ -37,14 +37,14 @@
<div
class=
"col-12 col-lg-6 o_setting_box"
>
<div
class=
"o_setting_left_pane"
/>
<div
class=
"o_setting_right_pane"
>
<span
class=
"o_form_label"
>
Api k
ey
</span>
<div
class=
"text-muted"
>
Ponga aquí su API Key
</div>
<div
class=
"content-group"
>
<div
class=
"row mt16"
>
<label
for=
"api_url"
class=
"col-lg-3 o_light_label"
/>
<field
name=
"api_url"
/>
</div>
</div>
<span
class=
"o_form_label"
>
Ponga aquí su API K
ey
</span>
<div
class=
"text-muted"
>
Si no tiene una, escriba a
<a
href=
"mailto:info@jorels.com"
>
info@jorels.com
</a>
</div>
<!--
<div class="content-group">
-->
<!--
<div class="row mt16">
-->
<!--
<label for="api_url" class="col-lg-3 o_light_label"/>
-->
<!--
<field name="api_url"/>
-->
<!--
</div>
-->
<!--
</div>
-->
<div
class=
"content-group"
>
<div
class=
"row mt16"
>
<label
for=
"api_key"
class=
"col-lg-3 o_light_label"
/>
...
...
@@ -137,7 +137,7 @@
<th>
<button
string=
"Crear las resoluciones en la API"
type=
"object"
name=
"button_put_environment"
class=
"oe_highlight"
/>
<br/>
Al cambiar el entorno, esto es automatico
<br/>
Al cambiar el entorno, esto es automatico
</th>
</table>
</div>
...
...
@@ -155,6 +155,15 @@
</div>
</div>
</div>
<div
class=
"col-12 col-lg-6 o_setting_box"
>
<div
class=
"o_setting_left_pane"
>
<field
name=
"enable_validate_state"
/>
</div>
<div
class=
"o_setting_right_pane"
>
<label
string=
"Habilitar estado intermedio Validación DIAN"
for=
"enable_validate_state"
/>
<div
class=
"text-muted"
>
Opciones avanzadas de envío y pruebas
</div>
</div>
</div>
</div>
<h2>
Personalización de la factura
</h2>
...
...
update_from_csv/.gitignore
0 → 100644
View file @
ba2020ea
/.idea
/.directory
*.pyc
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment