Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

Odoo Custom Report - External ID not found

Naroči se

Get notified when there's activity on this post

This question has been flagged
pythonreportingreportodoo12Odoo12.0
2 Odgovori
9764 Prikazi
Avatar
Muhammad Ahmed Rao

 am creating a custom report in Inventory (stock) module for which I have created a pop up view (window) for selection then after clicking a submit button, a python function is called. The problem is I am getting an internal server error stating

Value Error: External ID not found in the system: stock.customer_detail_report

Here is stock_report_views.xml file:

<odoo>
<data>
<report
string="Customer Report"
id="action_customer_detail_report"
model="customer.detail"
name="stock.customer_detail_report"
file="stock.customer_detail_report"
report_type="qweb-pdf"
print_report_name="Customer_Detail"
/>
</data>
</odoo>

Here is the model customer_detail.py

class CustomerDetail(models.TransientModel):
    _name = 'customer.detail'
    _description = 'Customer Detail'    

    customer_vendor = fields.Many2one('res.partner', 
                        string="Customer/Vendor", help="List of Customer and Vendors")
    PO = fields.Integer('purchase.order', related="id")
    
    def open_table(self):
        self.ensure_one()
        return self.env.ref('action_customer_detail_report').report_action(self)

Here is the pop up view (window) customer_detail.xml:

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_customer_detail" model="ir.ui.view">
<field name="name">Customer Details</field>
<field name="model">customer.detail</field>
<field name="arch" type="xml">
<form string="Choose your date">
<group>
<group>
<field name="customer_vendor" />
</group>
</group>
<footer>
<button name="open_table" string="Retrieve the Customer Details" type="object" class="btn-primary"/> <button string="Cancel" class="btn-secondary" special="cancel" /> </footer> </form> </field> </record> <record id="action_customer_detail" model="ir.actions.act_window"> <field name="name">Customer Detail</field> <field name="res_model">customer.detail</field> <field name="view_type">form</field> <field name="view_mode">form</field> <field name="view_id" ref="view_customer_detail"/> <field name="target">new</field> </record> <menuitem id="menu_customer_detail" name="Customer Detail" parent="stock.menu_warehouse_report" sequence="100" action="action_customer_detail_report"/> </odoo> <button string="Cancel" class="btn-secondary" special="cancel" />
</footer>
</form>
</field>
</record>
<record id="action_customer_detail" model="ir.actions.act_window">
<field name="name">Customer Detail</field>
<field name="res_model">customer.detail</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_customer_detail"/>
<field name="target">new</field>
</record>
<menuitem id="menu_customer_detail" name="Customer Detail" parent="stock.menu_warehouse_report" sequence="100" action="action_customer_detail_report"/>
</odoo>

And here is the final view customer_detail_report.xml:

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="action_customer_detail_report"> <t t-call="web.basic_layout">
<div class="page" style="padding-top:-10%;"> <div class="
<div class="col-xs-4" style="padding:1;"> <h1>This is a test</h1> </div> </div> </t> </template> </odoo>
<h1>This is a test</h1>
</div>
</div>
</t>
</template>
</odoo>

Here is the manifest file:

{

 'name': 'Inventory',
 'version': '1.1',
 'summary': 'Manage your stock and logistics activities',
 'description': "",
 'website': 'https://www.odoo.com/page/warehouse',
 'depends': ['product', 'barcodes'],
 'category': 'Warehouse',
 'sequence': 13,
 'demo': [
 'data/stock_demo_pre.xml',
 'data/procurement_demo.xml',
 'data/stock_demo.xml',
 'data/stock_orderpoint_demo.xml',
 'data/stock_demo2.xml',
 'data/stock_location_demo_cpu1.xml',
 'data/stock_location_demo_cpu3.xml',
],
 'data': [
 'security/stock_security.xml',
 'security/ir.model.access.csv',
 'views/stock_menu_views.xml',
 'data/stock_traceability_report_data.xml',
 'data/procurement_data.xml',  'report/report_stock_forecast.xml',
 'report/stock_report_views.xml',
 'report/report_package_barcode.xml',
 'report/report_lot_barcode.xml',
 'report/report_location_barcode.xml',
 'report/report_stockpicking_operations.xml',
 'report/report_deliveryslip.xml',
 'report/report_stockinventory.xml',
 'report/report_stock_rule.xml',
 'report/transfer_printlabel_report.xml',  'wizard/stock_change_product_qty_views.xml',
 'wizard/stock_picking_return_views.xml',
 'wizard/stock_scheduler_compute_views.xml',
 'wizard/stock_immediate_transfer_views.xml',
 'wizard/stock_backorder_confirmation_views.xml',
 'wizard/stock_overprocessed_transfer_views.xml',
 'wizard/stock_quantity_history.xml',
 'wizard/customer_detail.xml',
 'wizard/stock_rules_report_views.xml',
 'wizard/stock_warn_insufficient_qty_views.xml',
 'wizard/product_replenish_views.xml',
 'wizard/stock_track_confirmation_views.xml',
 'wizard/stock_package_destination_views.xml',
 'wizard/transfer_printlabel_view.xml',  'views/res_partner_views.xml',
 'views/product_strategy_views.xml',
 'views/stock_production_lot_views.xml',
 'views/stock_picking_views.xml',
 'views/stock_scrap_views.xml',
 'views/stock_inventory_views.xml',
 'views/stock_quant_views.xml',
 'views/stock_location_views.xml',
 'views/stock_warehouse_views.xml',
 'views/stock_move_line_views.xml',
 'views/stock_move_views.xml',
 'views/product_views.xml',
 'views/res_config_settings_views.xml',
 'views/report_stock_traceability.xml',
 'views/stock_template.xml',
 'views/stock_rule_views.xml',
 'views/stock_package_level_views.xml',
 'views/product_sequence_views.xml',  'data/default_barcode_patterns.xml',
 'data/stock_data.xml',
 'data/stock_sequence_data.xml',
],
 'qweb': [
 'static/src/xml/stock_traceability_report_backend.xml',
],
 'installable': True,
 'application': True,
 'auto_install': False,
 'pre_init_hook': 'pre_init_hook',
 'post_init_hook': '_create_warehouse',
 'uninstall_hook': 'uninstall_hook',
}

Any idea why am I not able to link the report and not getting the popup window and final report view?

0
Avatar
Opusti
Avatar
Husain Rangwala
Best Answer

Hello Muhammed

While creating report template you need to pass template id='customer_detail_report' so it will call template with your report action.
Edit customer_detail_report.xml:

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="customer_detail_report"> <t t-call="web.basic_layout">
<div class="page" style="padding-top:-10%;"> <div class="
<div class="col-xs-4" style="padding:1;"> <h1>This is a test</h1> </div> </div> </t> </template> </odoo>
1
Avatar
Opusti
Avatar
Serge Mercado
Best Answer

It's because 'customer_detail_report' doesn't exist. You named the template as action_customer_detail_report so either you change the template id to "customer_detail_report":

EDIT: I also can't see 'customer_detail_report.xml' in the manifest file.


or change the file and name in your report to "stock.action_customer_detail_report":


0
Avatar
Opusti
Serge Mercado

I also can't find "customer_detail_report.xml" declared in the manifest file.

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

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Report: IndexError: list index out of range [Odoo 12]
accounting reporting report odoo12 Odoo12.0
Avatar
Avatar
2
jun. 19
9030
How to get opening quantity
python report odoo12
Avatar
0
mar. 22
3263
How to call a py3o report using a button? Solved
reporting report odoo12
Avatar
Avatar
1
jun. 20
3478
Error: "Template not found" when trying to print custom report
reporting report odoo12
Avatar
Avatar
1
jul. 19
8727
Qweb report odoo 12
python qweb report odoo12
Avatar
0
jan. 22
464
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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