Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Inherited views

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
viewinheritancefieldmodeldesign
1 Beantwoorden
6382 Weergaven
Avatar
Andrea Dalseno

Hi I'm trying to make an inherited view of res.partner.

My model (to begin) is as simple as this:

class genial_2015(osv.osv):

"""Db test genial_2015 """

_name = 'genial.2015'

_inherit = 'res.partner'

_columns = {

'titolo': fields.char ('Titolo', size = 31)

}

So it inherits from res.partner. And it works fine (I will have more fields later).

I'm trying to inherit the "base.view_partner_form" view (so that I will have all the fields properly formatted and the view design in place) and add my custom field to it.

This is my view

<record model="ir.ui.view" id="view_genial_2015_form">

<field name="name">genial.2015.form</field>

<field name="model">genial.2015</field>

<field name="priority" eval="1"/>

<field name="type">form</field>

<field name="inherit_id" ref="base.view_partner_form"/>

<field name="arch" type="xml">

<form string="Partners">

<xpath expr="//field[@name='website']" position="after">

<field name="titolo" />

</xpath>

</form>

</field>

</record>

The module installs and I can see the form, but it's not the well formatted and designed res.partner.from, it's a mess with all the fields confused. Why? What am I doing wrong? Or what am I missing? This is a link to my window (hope it works).

http://postimg.org/image/s6ugg0iod/

My action definition is:

<record model="ir.actions.act_window" id="action_genial_2015">

<field name="name">genial.2015</field>

<field name="type">ir.actions.act_window</field>

<field name="res_model">genial.2015</field>

<field name="view_type">form</field>

<field name="view_mode">form</field>

</record>

I tried to give the view the same name as res.partner with the same model. In such a case I can see the view properly formatted, but there is no way to show my custom field. If I try with <field genial_2015_name="titolo" /> I got an error!

I tried to give the view a lower priority, but nothing changed. Of course modifying res.partner model will solve the problem, but I'd like to understand why I can't make it work with an inherited model.

I'm running  Odoo Version 8.0-a2115ef on Ubuntu 14.04 (Bitnami stack)

Thanks.

0
Avatar
Annuleer
Avatar
Andrea Dalseno
Auteur Beste antwoord

I tired to remove the _name declaration form my model as suggested here:

https://www.odoo.com/forum/help-1/question/view-inherit-from-res-partner-appears-all-one-page-with-no-styling-or-formatting-30444

But it didn't work either.

Ok, after reading a post here, I managed to have my view properly formatted. View does not inherit the design so you have to recreate yourself (I wonder what inheritance means?) and here is the result with my field under the website field.

http://postimg.org/image/95lfipgh5/

The problem is that I installed a couple of modules that modified the res.partner view (a tab for geolocalization data and a button for a map). This is the res.partner view:

http://postimg.org/image/7hhtugqqx/

What do I have to do to have them in my view too? Copy and paste the code again? What inheritance means then? At this point I had better modify res.partner instead of create my own model, hadn't I?

Any suggestion?

Thanks.

0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
How to make a field readonly in a form view according to another model field value? Opgelost
form view field readonly model
Avatar
Avatar
Avatar
6
apr. 22
44233
Inherited fields, modified model and views
v8 fields view inheritance model
Avatar
Avatar
4
okt. 15
10482
Add field from another module to project.issue kanban view Opgelost
project view inheritance kanban model
Avatar
Avatar
Avatar
3
sep. 15
7131
Add field from another module to project.issue kanban view
project view inheritance kanban model
Avatar
0
sep. 15
47
Custom float field with % sign Opgelost
view field model float custom_view
Avatar
Avatar
1
jul. 15
4478
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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