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

why custom report not changed in email?

Suscribirse

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

Se marcó esta pregunta
pdfsendmailodoo10
1 Responder
5196 Vistas
Avatar
MUHAMMED ASLAM
  • I created the custom module and override mail.template

  • I changed the "report_template" to my custom sale order report id instead of original

  • This code in base is noupdate="1", so I delete the sale order report from user interface and upgrade my custom module.

But the pdf does not change 

code sample 

<record id="sale.email_template_edi_sale" model="mail.template">

            <field name="report_template" ref="custom_itc_sale_quotation_header"/>

        </record>

Notes


is any problem in my code?How to set custom report there?

is any other method(from python) to solve this?


0
Avatar
Descartar
Avatar
Niyas Raphy (Walnut Software Solutions)
Mejor respuesta

Hi Acha Aslam, you can replace your custom mail template to sale by refering the below code,

<field name="report_template" ref="kitchen_order_print.report_custom_kitchen_order"/>

Here you have to mention your custom report name, ie, module_name.report_id .

<record id="sale.email_template_edi_sale" model="mail.template">
<field name="name">Sales Order - Send by Email</field>
<field name="email_from">${(object.user_id.email and '%s &lt;%s&gt;' % (object.user_id.name, object.user_id.email) or '')|safe}</field>
<field name="subject">NIyas</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="kitchen_order_print.report_custom_kitchen_order"/>
<field name="report_name">${(object.name or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html"></field>
</record>
1
Avatar
Descartar
MUHAMMED ASLAM
Autor

Hi Niyas,

Thanks for the answer.I changed my code like this but pdf attachment is not there.I write the code in my custom module's xml view.Finally, I copy your example to my code and replace model name and id of the custom report but only the body is loaded.the pdf attachment does not load.What is the problem?

Niyas Raphy (Walnut Software Solutions)

Hi Aslam, I have checked with the above code and i got everything working fine, default report template is getting replaced with my custom template. In your case is it showing any error or something ?

MUHAMMED ASLAM
Autor

Hi Niyas,

There no errors in my code.I did the same things that you did, but could not load the report.is any idea about this?

MUHAMMED ASLAM
Autor

Hi Niyas,

there is a warning in log file.

odoo.addons.base.ir.ir_model: Creating the ir.model.data report_sale_order in module sale instead of itc_custom..

What is the reason behind this warning?

Niyas Raphy (Walnut Software Solutions)

I just now removed the report then i try to send by email, then the attachment seems to be empty.

So follow this procedure it may help you,

first install the custom report, then install the module for replacing the existing report in the mail

MUHAMMED ASLAM
Autor

Hi Niyas,

I have used 1 custom module for custom report and replacing existing report in mail.

is want to create another module for replacing existing report in mail?

Niyas Raphy (Walnut Software Solutions)

Hi, i tried in two different modules, i already have installed a custom report in the db. i just added the code to replace the report template in the current module. and i followed the above procedure and it works.

MUHAMMED ASLAM
Autor

Thanks, Niyas, I will try that way.

¿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
How to generate a single pdf of multiple reports of the same template? Resuelto
pdf reports odoo10
Avatar
Avatar
Avatar
Avatar
9
ago 23
21730
Print Report from a different model from "print" menu. Resuelto
pdf odoo10 blankpdf
Avatar
Avatar
1
jul 20
5907
[odoo10] how to change line in pdf invoice
pdf invoice odoo10
Avatar
Avatar
2
oct 18
3821
Pass data to email template from python code Odoo 10
emailtemplate sendmail odoo10
Avatar
Avatar
1
ago 17
7839
Odoo 10: widget='pdf_viewer', download option doesn't appear when the field is defined inside notebook.
pdf widget odoo10
Avatar
0
nov 16
7460
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