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č

Creating a new model example?

Naroči se

Get notified when there's activity on this post

This question has been flagged
models
6 Odgovori
30694 Prikazi
Avatar
Dale E. Moore

Where can I find examples of creating new models (tables) online? Or perhaps I should look in the source code. Do you have any suggestions as to where I should start looking?

I'm especially interested in following the proper method of relating the project model one2many new items.

1
Avatar
Opusti
Sehrish

Hope this will helps: https://learnopenerp.blogspot.com/2020/09/how-to-create-model-in-odoo13.html

Avatar
Max
Best Answer

Hi,

Creating Models in OpenERP is a fairly straightforward process, and can be done in two ways, depending on the context.

1) Create a dedicated module for OpenERP that installs your model when the module is installed.
2) Create a new model directly in your OpenERP database using the user interface.

Option 1 is good if you plan on distributing your model to other people. It is also safer because if, for whatever reason, you need to create a new database or want to deploy a second version of OpenERP, all you have to do is re-deploy the module - all your hard work is backed up. Open 1 does, however, require some technical programming knowledge. You also get full access to the OpenERP API and the python programming language.

Option 2 is good if you are the only person who will use the model, and if it is a small, simple project. They are stored directly in the database. It is easier to do, and requires no programming knowledge, however you will be limited to very simple data in / data out functionality. Good for, for example, storing a bunch of text notes with dates etc.

For option 1, there are lots of articles on the web. I would start out by reading the OpenERP module development article. This article describes the anatomy of an OpenERP module, followed by more in-depth usage instructions for each aspect.

For option 2, you can start out by going directly to the Settings > Technical > Database Structure > Models section of OpenERP (version 7) while logged in as the administrator. From there, you can create models like any other record in OpenERP! Don't forget that your model will need a Menu Item so you can manage the records (Notice the handy "Create a Menu" button on the model form view). You might also want to make custom Views to display your records.

Specifically for one2many Documentation for one2many fields can be found here. This will be especially useful if using option 1 (creating a module) but will also help you understand how relational fields are used within OpenERP.

Good luck!

4
Avatar
Opusti
Martin

Module development did probably not change much between 6.1 and 7.0, right? Anyway, it would be nice to have the example updated to the latest release, including usage of the new web interface. Is there any complete example for 7.0 available? Thanks in advance!

Max

You are right - module development has not really changed between 6.1 and 7.0. Nevertheless, I have found this link: http://doc.openerp.com/trunk/developers/server/03_module_dev/ which seems to be a more up to date version of the OpenERP module development article linked above - I have updated my answer.

Dhana Babu

I have created the model through code see this http://codeimplementer.blogspot.in/2013/10/how-to-create-new-model-in-existing.html

Marc Wagener

Is it possible to create a model for existing tables? (sale_order_tax doesn't have)

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
How can I use two models in an API (foreign key - relations)?
models
Avatar
0
dec. 24
2166
Import Data From Another Model Solved
models
Avatar
Avatar
1
mar. 24
3273
how can i return a form view from a model method and i just want to show only a specific field instead of all the fields of this model ? Solved
models
Avatar
Avatar
1
jun. 23
13438
Error al tratar de borrar un campo en un modelo.
models
Avatar
0
jan. 23
3766
_sql_constraints problem
models
Avatar
Avatar
2
sep. 20
5156
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