Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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

How can I inherit pro forma invoice in odoo17?

Suscribirse

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

Se marcó esta pregunta
invoiceqwebtemplatesreportsproformaodoo
2 Respuestas
1296 Vistas
Avatar
Kalana Piyumantha

I want to do this activity, before doing that i need background analysis, because  I am a beginner, This is the activity,

Qweb Report

  1. Inherit Pro-forma invoice Report.
  2. Use a custom paper format: A4 size, landscape orientation, with 20mm margins.
  3. Use a shared/common layout template that includes:
  • Company logo at the top center.
  • Report title in bold.
  • Footer with the page number and printed date.

Customize report

    • Should apply created custom layout(point 3)
    • Show product image in order lines
    • Show discount in order lines
    • Add table border

My questions are?
1)What are the required files to complete this activity?

2)If Python files are not required , why? How can i find this related python file in  core?

3)How these required files connect to each files? 

4)Background of this question (purpose) can someone help me? I want to simple answers to these questions

0
Avatar
Descartar
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Mejor respuesta

Hi,

You can create a custom paper format through the UI or by using code. The page number is already shown in the report by default. To display the printed date, you need to create a custom layout. A Python file is not required, as the report is connected to the model through the report action using the binding ID, which allows you to access all data from that model.


1. Custom Paper Format

Settings-> Technical-> reporting-> Paper Formats.


- Landscape orientation can be set using the Orientation field

- Choose Pro-forma Invoice in the Associated Reports field.

- You can set the top, bottom, left, and right margins as needed.


2. Custom Layout 

Sample custom layout

<template id="report_custom_external_layout">
<!-- Multicompany -->
<t t-if="not o and doc">
<t t-set="o" t-value="doc"/>
</t>
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>
<div class="header">
<div class="row">
<img t-if="company.custom_report_header"
t-att-src="image_data_uri(company.custom_report_header)"
alt="Logo" width="100%"/>
</div>
</div>
<div class="footer o_standard_footer" style="position: relative;">
<div style="width: 100%;">
<div class="row"
style="display: -webkit-box; display: flex; -webkit-justify-content: space-between; justify-content: space-between; width: 100%;">
<div class="col-4 text-center" style="font-size: 10px;">
<span t-esc="time.strftime('%Y-%m-%d')"/>-
<span t-esc="time.strftime('%H:%M')"/>
</div>
<div class="col-4 text-center" style="font-size: 10px;">
<span>Page</span>
<span class="page"/>/
<span class="topage"/>
</div>
</div>
</div>
<div style="width: 100%;">
<img t-if="company.custom_report_footer"
t-att-src="image_data_uri(company.custom_report_footer)"
alt="Logo" width="100%"/>
</div>
</div>
<div class="article o_report_layout_standard"
t-att-data-oe-model="o and o._name"
t-att-data-oe-id="o and o.id"
t-att-data-oe-lang="o and o.env.context.get('lang')">
<t t-raw="0"/>
</div>
</template>


<div class="col-4 text-center" style="font-size: 10px;">

                    <span t-esc="time.strftime('%Y-%m-%d')"/>-

                    <span t-esc="time.strftime('%H:%M')"/>

                </div>

This code indicates - printed date and time


3. Inherit Pro-Forma Invoice 


    <template id="sale_order_report_saleorder_document"
inherit_id="sale.report_saleorder_document">
<xpath expr="//t[@t-call='web.external_layout']" position="replace">
<t t-call="module_name.report_custom_external_layout">
<!-- Details-->
</t>
</xpath>
</template>


Hope it helps.

0
Avatar
Descartar
Avatar
Jainesh Shah(Aktiv Software)
Mejor respuesta

Hello Kalana Piyumantha,

 

Please refer to the following documentation and YouTube playlist to understand how to work with PDF reports in Odoo:

 https://www.odoo.com/documentation/18.0/developer/tutorials/pdf_reports.html

 https://www.youtube.com/playlist?list=PLqRRLx0cl0hqclwqsT4cm8vkIU4NAj3uA

If you have any questions, please feel free to reach out to me. I'm happy to help!

 

Thanks & Regards,

Email:  odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari 

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

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

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Custom Invoice Report
invoice qweb templates
Avatar
0
ene 24
2272
Table for all recored / Qweb reoprts
qweb reports odoo
Avatar
1
abr 23
3839
Go through a loop n times in QWEB Resuelto
qweb templates odoo
Avatar
Avatar
Avatar
Avatar
4
abr 24
21613
Override account_invoices report to use different template Resuelto
invoice templates reports
Avatar
Avatar
2
jun 20
6672
Invoices doesnt print correctly post migration from openerp 7 to odoo 8 Resuelto
invoice qweb reports
Avatar
Avatar
3
nov 15
6202
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 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