Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Edit Invoice template through addon

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
xmlinvoicelayouts
1 Responder
1688 Vistas
Avatar
Milos Boksan

Hello all,

I am trying to edit a couple of thing on the invoice template:

1. The arrangement of customer information
2. Remove some columns from the table
3. Correctly display the sections in the invoice template

I need to emphasise that this MUST BE DONE through an inherited module located in "opt/odoo/data/addons/16.0/ADDON_NAME". There are reasons for this.

So far what I have created is a directory named "update_invoice_template" that contains the following:

__init__.py

*empty*

__manifest__.py

{
    "name" : "Styled Invoice Template",
    "version" : "2.0",
    "category" : "Customization",
    'depends': ['account'],
    'data': [
        'views/report_invoice_document_styled. xml',
        'views/report_invoice_with_payments_styled. xml',
    ],
    'installable': True,
}

views (directory)

- report_invoice_document_styled.xml
(I've removed the "less than" symbol from the beginning of each row otherwise the code refused to be displayed)

​?xml version="1.0" encoding="utf-8"?>
odoo>
template inherit_id="account.report_invoice_document" id="report_invoice_document_styled">
xpath expr="//div[@name='address_not_same_as_shipping']" position="replace">
div class="col-6" name="address_not_same_as_shipping">
t t-set="address">
address class="mb-0">
​ ​ ​ ​t t-set="company_name" t-value="o.partner_id.parent_id.name"/>
​ ​ ​ ​t t-set="legal_form_name" t-value="o.partner_id.parent_id.company_legal_form_id.name"/>
​ ​ ​ ​ ​t t-set="street" t-value="o.partner_id.street"/>
​ ​ ​ ​t t-set="zip_code" t-value="o.partner_id.zip"/>
​ ​ ​ ​t t-set="city" t-value="o.partner_id.city"/>
​ ​ ​ ​t t-set="temp_country_code" t-value="o.partner_id.country_id.id"/>
​ ​ ​ ​t t-set="temp_language" t-value="o.partner_id.lang"/>
​ ​ ​ ​t t-set="country_name" t-value="env['res.country'].browse(temp_country_code).with_context(lang=temp_language).name"/>
​ ​ ​ ​span>
​ ​ ​ ​br/>
​ ​ ​ ​span>
​ ​ ​ ​br/>
​ ​ ​ ​span>
​ ​ ​ ​br/>
​ ​ ​ ​span>
/address>
div t-if="o.partner_id.parent_id.vat" id="partner_vat_address_same_as_shipping"
​t t-if="o.company_id.account_fiscal_country_id.vat_label" t-esc="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
​​t t-else="">Tax ID:
/div>
/t>
/div>
/xpath>
xpath expr="//div[@class='mt-5']" position="attributes">
​ attribute name="style">font-size: 12px
/xpath>
xpath expr="//th[@name='th_taxes']" position="replace"/>
xpath expr="//td[span/@id='line_tax_ids']" position="replace"/>
/template>
/odoo>

- report_invoice_with_payments_styled.xml
(I've removed the "less than" symbol from the beginning of each row otherwise the code refused to be displayed)

?xml version="1.0" encoding="utf-8"?>
odoo>
template inherit_id="account.report_invoice_with_payments" id="report_invoice_with_payments_styled">
t t-call="web.html_container">
t t-foreach="docs" t-as="o">
t t-set="lang" t-value="o.partner_id.lang"/>
t t-set="print_with_payments" t-value="True"/>
t t-if="o._get_name_invoice_report() == 'account.report_invoice_document_styled'" t-call="account.report_invoice_document_styled" t-lang="lang"/>
/t>
/t>
/template>
/odoo>

The app appears in Odoo, successfully installs, all external identifiers are craeted successfully, but the changes arent applied. Can anyone assist?

Thanks in advance

0
Avatar
Descartar
Avatar
Milos Boksan
Autor Mejor respuesta

Any help?

0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Enable Counters in odoo what is the use of it Resuelto
xml
Avatar
Avatar
1
mar 25
2621
uploading xml for invoicing tax not taken
xml
Avatar
0
nov 24
2437
Thousand seperator
xml
Avatar
0
jun 24
2219
readonly to specific group and when the stage is in 2, 3, 4
xml
Avatar
Avatar
1
jun 24
2807
Why is appearing this sentece Payment comunication when I print customer invoice?
invoicelayouts
Avatar
Avatar
2
feb 24
1490
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now