Commit ba2020ea authored by Jorge Sanabria's avatar Jorge Sanabria
Browse files

Update

parent ec0d11b5
# 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__/
......@@ -35,7 +35,7 @@
# Odoo, OCA and Jorels dependencies
'depends': [
'account',
'snailmail_account',
# 'snailmail_account',
'l10n_co',
#'web_notify',
'update_from_csv',
......
This diff is collapsed.
......@@ -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")
......
......@@ -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)
......
......@@ -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_filename.endswith(ext):
zip_filename += ext
attachments = [(zip_filename, zip_attachments.datas)]
else:
attachments = [(a.name, a.datas) for a in zip_attachments]
res[res_id]['attachments'] += attachments
......
......@@ -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&amp;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
......@@ -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>
......
......@@ -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 key</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 Key</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>
......
/.idea
/.directory
*.pyc
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment