diff --git a/account.move-agofer_invoice_format.py b/account.move-agofer_invoice_format.py
new file mode 100755
index 0000000..b46a095
--- /dev/null
+++ b/account.move-agofer_invoice_format.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+"""Modifica el formato QWeb de facturas y devoluciones."""
+import os
+import sys
+import base64
+import odooly
+
+def use_local_resources():
+ """Facilita usar recursos en el mismo directorio del script."""
+ global __location__
+ __location__ = os.path.realpath(
+ os.path.join(os.getcwd(), os.path.dirname(__file__)))
+
+def main():
+ odooly.Client._config_file = os.path.expanduser('~/.config/odooly.ini')
+ odoo = odooly.Client.from_config('Odoo14_Production')
+ #odoo = odooly.Client.from_config('odootest27')
+
+ """Desactivar manualmente la vista:
+ * sale_stock.report_invoice_document_inherit_sale_stock
+ """
+
+ views = odoo.env['ir.ui.view']
+ baseid = 'account.report_invoice_document'
+ viewname = 'report.invoice.factura_o_devolucion_agofer'
+ viewextid = 'agofer_view.factura_o_devolucion'
+
+ reports = odoo.env['ir.actions.report']
+ repextid = 'account.account_invoices'
+
+ papers = odoo.env['report.paperformat']
+ papextid = 'agofer_paper.factura_carta'
+ papextid_base = 'base.paperformat_us'
+
+ attachments = odoo.env['ir.attachment']
+ attextid_ff = 'agofer_adjunto.firma_factura'
+ attextid_iw = 'agofer_adjunto.icono_whatsapp'
+
+ vista_base = views.get(baseid)
+ assert vista_base.name == 'report_invoice_document'
+ reporte = open(os.path.join(__location__,
+ 'factura_o_devolucion_v14.xml')).read()
+
+ formato_carta = papers.get(papextid_base)
+
+ destino_arch = """
+
+
+
+
+
+
+
+
+ Salario:
+
+
+
+
+
+ NIT
+
+ Borrador de
+ Comprobante de
+
+
+
+ Período:
+ Fecha de liquidación:
+
+
+
+
+
+
+
+ Contrato
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
Fecha: - +
-- Fecha de vencimiento: +
+ Vencimiento:
- Condición de pago: - +
+ + Condición de pago: + +
-
-
+
+
:
-
- , - -
-
+
+ ,
+
+
+
-
+
+
+
-
- Agofer S.A.S. NIT 800.216.499–1 : -
-+ Agofer S.A.S. NIT 800.216.499–1: +
+
+
+
+ +
+
+ Description:
+
+
+
+
+
+
+
+
+
+
| № | -Description | -Quantity | -Unit Price | -+ | № | +Description | +Quantity | +Unit Price | +Disc.% | -Taxes | -+ | Amount Total Price | +IVA | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| + |
+
+ |
@@ -250,17 +333,20 @@ | - + | - | - - | - - + + + | +
+
+
+ |
||||||||
| Subtotal | - + | |||||
| IVA | ++ + | +|||||
| Total | - + | - + | ||||
| Amount Due | - + | |||||
| Description | +Quantity | +Unit Price | +Discount (%) | +Valor | +IVA | +|
|---|---|---|---|---|---|---|
| + + + + + | ++ + | ++ + | ++ + | ++ | + + | +
+ |
+
+ Observaciones
+
+
+ Fiscal Position Remark: + +
++ Este pedido de venta recoge las + condiciones comerciales pactadas entre Agofer y el + cliente; Agofer emitirá factura de venta al momento + de entregar la mercancía. + No se aceptan reclamos después de 10 días de emitida la + factura. + Consulte nuestra Promesa Comercial en + agofer.co/politicas/ +
+| Total Without Taxes | ++ + | +
| Taxes | ++ + | +
| + + Total + + | ++ + | +
+ Pesos. +
++ + + – + +
++ +
++ +
++ +
++ +
++ +
+