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

Error in creating a custom paperformat

Suscribirse

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

Se marcó esta pregunta
qwebtemplatesreportpaperformat
1 Responder
7556 Vistas
Avatar
Ationg Shake

I have a custom module and created a custom paperformat.


__openerp__.py

{
    'name': " POS Template",
    'author': "Ashiong",
    'version': '1.0',
    'description': """
    - Test
    """,
    'depends': ['stock',
                ],
    'data': [
            'data/report_paperformat.xml',
            'views/delivery_receipt_report.xml',
            'views/picking_report.xml',
    ],
    'auto_install': False,
}

picking_report.xml

        <report             
            id="action_report_delivery_receipt"            
            string="Delivery Receipt (Test POS)"             model="stock.picking"             report_type="qweb-pdf"             name="my_module.test_delivery_receipt"             file="my_module.test_delivery_receipt"         />
        <record id="action_report_test_delivery_receipt" model="ir.actions.report.xml">             <field name="paperformat_id" ref="my_module.test_pos_paperformat"/>         </record>

report_paperformat.xml

    <!-- POS --> 
       <record id="test_pos_paperformat" model="report.paperformat">
        <field name="name">Test Paperformat</field>
        <field name="default" eval="True" />
        <field name="format">custom</field>
        <field name="page_height">150</field>
        <field name="page_width">60</field>
        <field name="orientation">Portrait</field>
        <field name="margin_top">3</field>
        <field name="margin_bottom">3</field>
        <field name="margin_left">3</field>
        <field name="margin_right">3</field>
        <field name="header_line" eval="False" />
        <field name="header_spacing">3</field>
        <field name="dpi">130</field>
       </record>

Once I install my custom module, the system will return an error message:

ParseError: "null value in column "name" violates not-null constraint
DETAIL:  Failing row contains (710, 1, 2017-08-10 10:18:05.557211, null, 1, 2017-08-10 10:18:05.557211, null, ir.actions.report.xml, null, null, t, pdf, null, null, null, null, t, null, f, null, null, null, f, null, 28, 80, null, 1, database, null, null, 1, off, utf_8, f, class Parser(report_sxw.rml_parse):
    def __init__(self, cr, u..., static, f, default, default, null, t, f, null, oo-odt, null).
" while parsing /home/custom_addons/my_module/views/picking_report.xml:13, near
<record id="action_report_pos_delivery_receipt" model="ir.actions.report.xml">
            <field name="paperformat_id" ref="my_module.test_pos_paperformat"/>
        </record>






0
Avatar
Descartar
Avatar
Axel Mendoza
Mejor respuesta

The bug is here

<record id="action_report_test_delivery_receipt" model="ir.actions.report.xml">
            <field name="paperformat_id" ref="my_module.test_pos_paperformat"/>
        </record>

Because action_report_test_delivery_receipt does not exist in your module. Perhaps you wanna use action_report_delivery_receipt

1
Avatar
Descartar
Ationg Shake
Autor

Hi Sir, I have a follow up question.

I tried to clicked on the button (Delivery Receipt (POS Test) and I encountered this error:

QWebTemplateNotFound: External ID not found in the system: my_module.test_delivery_receipt

Tho I defined the same template in in delivery_receipt_report.xml

<template id="test_delivery_receipt">

<t t-call="report.html_container">

<t t-foreach="docs" t-as="o">

<div class="page" style="font-Size: 9px;">

<div class="row">

<div class="col-xs-12 text-center">

Partner Name:<span t-esc="o.partner_id.name" class="oe_bold"/><br/>

Scheduled Date: <span t-field="o.min_date"/><br/>

Source Document: <span t-field="o.origin"/><br/>

</div>

</div>

</div>

</t>

</t>

</template>

Axel Mendoza

and the template test_delivery_receipt is defined in the module my_module?

curious name for a module :)

Ationg Shake
Autor

Yes, I added the xml (delivery_receipt_report.xml) in the __openerp__.py. I didn't give the exact name of my module, I just put it that way to specify that it is the module name.

¿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
Two paper formats for one report
qweb report paperformat
Avatar
Avatar
Avatar
Avatar
3
may 24
4089
QWeb format text and field in same line Resuelto
qweb templates report odooV8
Avatar
Avatar
1
dic 23
19854
Insert a pdf file/page into the qweb report view template
pdf view qweb templates report
Avatar
Avatar
Avatar
3
abr 25
3295
odoo 16 report target new page scss
qweb report
Avatar
Avatar
1
abr 25
2200
Missing external identifier on new external layout template Resuelto
qweb report
Avatar
Avatar
2
mar 25
2802
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