Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

How to add a field to a wizard?

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
wizardinheritedit
1 Atsakyti
11294 Rodiniai
Portretas
Juan Formoso Vasco

I am trying to add a field (only a checkbox) to a wizard. I managed to do exactly this with other form, but it was not a wizard. But I repeated the same steps (obviously changing the respective names and variables) and I cannot see my field in the wizard. I inherited the original wizard as I did with the form which worked, but I do not know if I am doing something stupid, because I have just arrived to OpenERP a few time ago.

The structure of my module is:

my_module
|__ wizard
|   |__ __init__.py
|   |__ wizard_print.py
|
|__ __init__.py
|__ __openerp__.py
|__ my_module_wizard.xml

And my two important files are:

wizard_print.py (in a folder called wizard which has its respective __init__.py too)

from osv import fields, osv

class print_wizard(osv.osv_memory):

    _name = 'my.module.print.wizard'
    _inherit = 'original.module.print.wizard'
    
    _columns = {
        'dummy': fields.boolean('My dummy'),
    }
    _defaults = {
         'dummy': True,
     }

print_wizard()

my_module_wizard.xml (in the main folder with the __openerp__.py and __init__.py)

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record model="ir.ui.view" id="wizard_my_module_print">
            <field name="name">my.module.print.wizard.form</field>
            <field name="model">my.module.print.wizard</field>
            <field name="inherit_id" ref="original_module.wizard_original_module_print"/>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <xpath expr="/form/field[@name='original_variable']" position="after">
                    <newline/>
                    <field name="dummy"/>
                    <newline/>
                </xpath>
            </field>
         </record>
    </data>
</openerp>

Is this structure right? Should it work or is there any mistake I do not know?

0
Portretas
Atmesti
Juan Formoso Vasco
Autorius

Thank you @René Schuster! I removed both: _name from the python declaration and from the XML view. But it does not work yet.

Juan Formoso Vasco
Autorius

Ok I did not have to delete the field in the XML view! In the XML view I had to change the content of the tag : replace my.module.print.wizard by original.module.print.wizard. I had understood you wrong!

Portretas
René Schuster
Best Answer

If you inherit from an existing model and set a different _name value, an new model will be created.

I think that is not quite what you want.

Change the _name value to "original.module.print.wizard" (in the python declaration and the xml view).

For more information see the Technical Mementos section on different inheritance mechanisms: https://www.odoo.com/files/memento/OpenERP_Technical_Memento_latest.pdf

Or this: http://stackoverflow.com/questions/21111627/inheritance-of-customized-module-in-openerp

 

Regards.

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

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

Registracija
Related Posts Replies Rodiniai Veikla
How to hide edit button in inherited view with condition
hide inherit edit xpath
Portretas
0
lapkr. 15
6088
creating a new module
module inherit constraint edit
Portretas
Portretas
1
kov. 15
5740
How to do Prototpye inherit in odoo
inherit
Portretas
Portretas
Portretas
Portretas
Portretas
4
kov. 24
4357
Inheritance for account.financial.report model?
inherit
Portretas
Portretas
1
spal. 23
6343
I can't inherit a wizard (Odoo v16) Solved
wizard models inherit transientmodel odoo16features
Portretas
Portretas
Portretas
Portretas
3
rugs. 23
4237
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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