Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Discuss
    • Kecerdasan Buatan
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Manajemen Properti
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Konsultasi
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Field show_forecasted_qty_status_button does not exist in model product.template

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
moduleinheritanceproduct.template18.0
2 Replies
694 Tampilan
Avatar
SSSE/SIG, Luca Palo

When I try to install the module where the following inherited view is defined i get the error 

❌
Field "show_forecasted_qty_status_button" does not exist in model "product.template"

I checked 

  •     https://www.odoo.com/es_ES/forum/ayuda-1/error-partner-bank-id-cannot-be-located-in-parent-view-odoo19-292645
  • https://www.odoo.com/es_ES/forum/ayuda-1/error-msg-element-xpath-expr-cannot-be-located-in-parent-view-213940

And I verified that reference to the XML ID in my view is correct. The field show_forecasted_qty_status_button is listed from the debugger in the Product Template view.

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="product_template_procurement_form_hide_forecast" model="ir.ui.view">
        <field name="name">product.template.procurement.form.hide.forecast</field>
        <field name="model">product.template</field>
        <field name="inherit_id" ref="stock.product_template_form_view_procurement_button" />  
        <field name="priority">14</field>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='show_forecasted_qty_status_button']" position="attributes">
                <attribute name="value">0</attribute>
            </xpath>
        </field>
    </record>
</odoo> 


The other thing I tried without success was to inherit the model in order to overwrite the method of the computed field. But the log entry was not listed in the log.

class ProductTemplate( models.Model ):

    _logger = logging.getLogger(__name__)

    _inherit = ['product.template']

    """
        Removes the forecasted quantity button in product template view

        @see commit abf1ee63f41094a313ead96caccc284c0b233244
    """
    @api.depends('is_storable')
    def _compute_show_qty_status_button(self):
        self._logger.info('###################################### _compute_show_qty_status_button ########################################')
        for template in self:
            template.show_on_hand_qty_status_button = template.is_storable
            template.show_forecasted_qty_status_button = False
0
Avatar
Buang
Codesphere Tech

Hello
I've test the same scenario in my local V18 env and not getting any error while installing or upgrading the module.

Avatar
Vivek Kundaliya
Jawaban Terbai

The issue is that in Odoo 18, the field show_forecasted_qty_status_button may not be defined directly in the stock.product_template_form_view_procurement_button view - it may be added by a different inherited view layer. Here is how to debug and fix this:

Step 1: Find which view actually contains this field
With Developer Mode enabled:
1. Open a product form
2. Click the debug menu (bug icon) > Edit View
3. Look through the combined view to find which ir.ui.view ID actually renders the show_forecasted_qty_status_button field
4. Inherit THAT view instead of stock.product_template_form_view_procurement_button

Step 2: Check the field definition
In Odoo 18, check addons/stock/models/product.py for the exact field definition. The field may be defined as a computed field only available when certain conditions are met (e.g., the product must be storable). Your XPath may fail if the field is not present in the view arch at install time.

Step 3: Fix your XPath - target a different expression
Instead of targeting the field itself, try targeting the button widget directly. In the final view, look for the button that shows the forecasted qty and target its name attribute.

Step 4: Priority matters
Your view has priority 14. If the view that adds show_forecasted_qty_status_button also has a low priority, it may not have been applied yet when your view tries to reference it. Try increasing your priority to a higher number (e.g., 50) so it applies after the base views.

Most likely fix:
The field is probably added by a different stock view, not stock.product_template_form_view_procurement_button. Use the Odoo debug view inspector to find the correct inherit_id, then change your inherit_id to that view.

0
Avatar
Buang
Avatar
Zehntech Technologies Inc.
Jawaban Terbai

Hello,

It looks like the issue is not with the XML ID itself, but with the fact that the field show_forecasted_qty_status_button is probably not present in the inherited view architecture (stock.product_template_form_view_procurement_button) at the moment your XPath is applied.

In Odoo 18, some of these quantity status fields/buttons are added through layered inherited views and may not be directly available in that specific parent view.

Also, in your Python override, the compute method name should exactly match the original method definition from the source model, otherwise Odoo will not execute your custom logic.

You may want to:

  • verify the final inherited view structure using Developer Mode,
  • inherit the correct intermediate view,
  • or target the button element directly instead of the field.

Hope this works for you! If you need any help implementing this or want a more optimized approach, feel free to reach out for further discussion.

Regards,

Zehntech Technologies Inc.

santosh.sekwadia@zehntech.com

0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
How to change the standard "New Quotation" form? Diselesaikan
module form inheritance
Avatar
Avatar
1
Feb 23
3592
OpenERP engine modification. How?
module inheritance engine
Avatar
0
Mar 15
5236
How to remove certain columns from an inherited model? Diselesaikan
module inheritance model project.task
Avatar
Avatar
Avatar
Avatar
3
Nov 22
15035
search field value from one module to another
module fields inheritance menu
Avatar
Avatar
1
Sep 22
3396
How to move a "manual" model to a custom module? Diselesaikan
module custom studio odoo 18.0
Avatar
Avatar
1
Mar 26
1314
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Karir
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah software terintegrasi dengan 70+ aplikasi seperti CRM, Akuntansi, Inventaris, Sales, eCommerce, Marketing, POS; plus fitur lokal Indonesia!

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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