Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Error in creating a custom paperformat

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
qwebtemplatesreportpaperformat
1 Răspunde
7522 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
Imagine profil
Axel Mendoza
Cel mai bun răspuns

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
Imagine profil
Abandonează
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.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Two paper formats for one report
qweb report paperformat
Imagine profil
Imagine profil
Imagine profil
Imagine profil
3
mai 24
4047
QWeb format text and field in same line Rezolvat
qweb templates report odooV8
Imagine profil
Imagine profil
1
dec. 23
19840
Insert a pdf file/page into the qweb report view template
pdf view qweb templates report
Imagine profil
Imagine profil
Imagine profil
3
apr. 25
3268
odoo 16 report target new page scss
qweb report
Imagine profil
Imagine profil
1
apr. 25
2182
Missing external identifier on new external layout template Rezolvat
qweb report
Imagine profil
Imagine profil
2
mar. 25
2775
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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