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
    Rantai Pasokan
    • 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
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-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
    • Estate Management
    • 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
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
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

What does OSV mean in OpenERP modules?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
modulesormosv
3 Replies
39018 Tampilan
Avatar
P Mittal

I came across the word "osv" in almost all the OpenERP modules. What does it stand for? Has it something to do with the OpenERP Object Relational Mapper?

6
Avatar
Buang
Andres Camilo Briñez Nuñez

Hi, I casually meet myself with the following issue. odoo.service - Odoo Open Source ERP and CRM
Loaded: loaded (/lib/systemd/system/odoo.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-01-08 00:20:52 CET; 13min ago
Process: 2458496 ExecStart=/usr/bin/odoo --config /etc/odoo/odoo.conf --logfile /var/log/odoo/odoo-server.log (code=exited, status=1/FAIL>
Main PID: 2458496 (code=exited, status=1/FAILURE)

Jan 08 00:20:52 Bicicletasdelasabana2 odoo[2458496]: from .osv.query import Query
Jan 08 00:20:52 Bicicletasdelasabana2 odoo[2458496]: File "/usr/lib/python3/dist-packages/odoo/osv/__init__.py", line 4, in <module>
Jan 08 00:20:52 Bicicletasdelasabana2 odoo[2458496]: from . import osv
Jan 08 00:20:52 Bicicletasdelasabana2 odoo[2458496]: File "/usr/lib/python3/dist-packages/odoo/osv/osv.py", line 5, in <module>
Jan 08 00:20:52 Bicicletasdelasabana2 odoo[2458496]: from .orm import Model, TransientModel, AbstractModel
Jan 08 00:20:52 Bicicletasdelasabana2 odoo[2458496]: File "/usr/lib/python3/dist-packages/odoo/osv/orm.py", line 8, in <module>
Jan 08 00:20:52 Bicicletasdelasabana2 odoo[2458496]: from ..models import (
Jan 08 00:20:52 Bicicletasdelasabana2 odoo[2458496]: ImportError: cannot import name 'MetaModel' from partially initialized module 'odoo.mode>
Jan 08 00:20:52 Bicicletasdelasabana2 systemd[1]: odoo.service: Main process exited, code=exited, status=1/FAILURE
Jan 08 00:20:52 Bicicletasdelasabana2 systemd[1]: odoo.service: Failed with result 'exit-code'.

Avatar
ClueLogics Technologies Pvt. Ltd.
Jawaban Terbai

Hi Mr. Mittal

osv is a class and an OpenERP descriptor class and all the class( model) must inherit it for OpenERP module deployment.

osv class inside in OSV module in OpenERP server , which content all the OpenERP properties like you can see _column, _defaults and other many things there such as name etc so we must inherit in our openerp model (class)

Thanks
sandeep

8
Avatar
Buang
Avatar
Andreas Maertens
Jawaban Terbai

As I tried to find out I came along one site:

http://members.hellug.gr/xrg/openerp-doc/html/api_reference/osv/osv.html

There they say: osv = "Objects Services"

It just points to the orm classes.

source: osv.py in server/openerp/osv/osv.py

from openerp.osv.orm import MetaModel, Model, TransientModel, AbstractModel
...
# deprecated - for backward compatibility.
osv = Model
osv_memory = TransientModel
osv_abstract = AbstractModel # ;-)

So you could also use orm.Model to create addons. It's the same. ;)

11
Avatar
Buang
Avatar
Brett Lehrer
Jawaban Terbai

OSV = Object Service

Keeps the definitions of objects and their fields in memory, more or less.

1
Avatar
Buang
Kalmen Chia

i saw class previously is osv.osv , now is osv.Model , so the later version for new class should begin with osv.Model ?

Brett Lehrer

That does work, and seems to be the direction they're pushing, but be careful about inheritance in 7.0 at least. I've noticed issues when trying to inherit, for example, an osv.osv_memory class with an osv.TransientModel class. As long as you're consistent you should be fine.

P Mittal
Penulis

That answers it well. Yes, I also see osv.Model used sometimes where I thought osv.osv should be used. Where can I get a list of all the classes and functions available under "osv" along with what they could be used for. (Reading the osv code for that is one option I have, but I would prefer if I could get some straight docs.)

Brett Lehrer

As of just this morning, OpenERP has rolled out an update to their trunk documentation, available here: https://doc.openerp.com/trunk. The page specifically covering object and field functions is here: https://doc.openerp.com/trunk/server/03_module_dev_02

Most OSV functions are actually in orm.py. osv.py is pretty slim and just wraps the execution of actions so that if an error is raised in the middle of an action, the database can be rolled back to it's state prior, avoiding partial records from being written to the database.

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
Tutorial that explains interaction with the OpenERP ORM?
modules orm
Avatar
Avatar
Avatar
2
Mar 15
11556
How to use the osv ORM to fetch all products in Python? (Or all customers, or any other type)
python orm osv
Avatar
Avatar
1
Mar 15
6737
Change values of a model field at __init__.py Diselesaikan
modules models orm api
Avatar
Avatar
1
Okt 19
5310
Execute query when installing addon Diselesaikan
modules addons orm query
Avatar
Avatar
2
Mei 18
10847
How does ORM method inheritance work?
modules orm openerp7.0 methods
Avatar
0
Agu 15
5622
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
  • Tugas
  • 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 ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

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