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č

Students and Faculty Query in pgAdmin

Naroči se

Get notified when there's activity on this post

This question has been flagged
querypgadminodoo
3 Odgovori
2661 Prikazi
Avatar
SmithJohn45

i have listed out Employees from hr_employee, now how to list students, faculty and Inventory Items in pgAdmin Query Tool writing query (sql statement) something like e.g.:

select * from tablename where ??

i just want to create Template files to import related data.

please help.

regards

0
Avatar
Opusti
SmithJohn45
Avtor

any help please?

SmithJohn45
Avtor

is here anyone know how to retrieve the required data in pgAdmin using Query Tool??

Avatar
Kiran K
Best Answer

Hi Smith,

In your custom module, check how it differentiates between students and faculty.

For example,

Let's assume that there is a selection field called "type," where the options are  [('student', 'Student'), ('faculty', 'Faculty'), ('others', 'Others')], 

Then query for students will be  

SELECT * FROM hr_employee WHERE type = 'student'

If the students have separate model, for example, 'student.student' in odoo.
Then the query will be,

SELECT * FROM student_student.

Remember to replace the '.' in the model name with '_' when mentioning the table name in the query.

Hope it helps,
Kiran K

0
Avatar
Opusti
SmithJohn45
Avtor

so, there is nothing in existing Odoo ERP... thanks to all. what about Inventory Items?
regards

Avatar
Arshad Zayn
Best Answer

For example, let's assume the following table names for Odoo:

  • Students: school_student
  • Faculty: school_faculty
  • Inventory Items: product_template

Your queries might look like this:

sqlCopy code-- List Students
SELECT * FROM school_student;

-- List Faculty
SELECT * FROM school_faculty;

-- List Inventory Items
SELECT * FROM product_template;

Note: The table names I provided are just placeholders. You need to replace them with the actual table names or models used in your Odoo instance. You can find this information by checking the database structure or consulting the Odoo documentation.

Additionally, you may want to refine your queries by specifying conditions or joining tables based on the relationships between different entities in your Odoo system. For example, if students are associated with a particular faculty, you might use a JOIN clause to retrieve data from both the school_student and school_faculty tables.

Here's a simple example assuming there's a foreign key relationship between school_student and school_faculty:

 code-- List Students with Faculty Information
SELECT school_student.*, school_faculty.*
FROM school_student
JOIN school_faculty ON school_student.faculty_id = school_faculty.id;

Again, you should adapt these queries based on your actual Odoo database structure and relationships.

0
Avatar
Opusti
SmithJohn45
Avtor

thank you @Arshad, i know how to " write query " but i don't know what are the tables in Odoo (PostgreSQL database) and what are the fields which i can reference to get "Students" or others like category_id or product_id. i want to know these informations that's why i mentioned "example" in my opening post above.

Arshad Zayn

eg : You can get employee details by select * from hr_employee where id = 2
product : product_product

SmithJohn45
Avtor

i think still i failed to convey... i want something like :

select * from res_partner where customer_rank > 0

this will retrieve all Customers and if i write:

select * from res_partner where supplier_rank > 0

this will retrieve all Suppliers

your query for hr_employee will return just what is stored with id=2 no matter he/she is student or not.

hope this clear what i want to achieve. and as mentioned in opening post, i just want to create Template files to import.

regards

Arshad Zayn

Based on what I understand from your statement:
Create a new field in hr_employee to differentiate if an employee is a student or a faculty member and use it in queries ,
As a selection field, you can create

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
Can i query _ids column data in pgAdmin?
query pgadmin
Avatar
Avatar
1
feb. 24
2129
customers & vendors query in pgAdmin Solved
pgadmin odoo
Avatar
Avatar
Avatar
3
nov. 23
2329
[Widget Javascript]: How to make a query on a model odoo?
javascript query odoo
Avatar
0
sep. 16
5465
Reports to excel with ODBC, queries and database schema?
query excel odoo
Avatar
0
sep. 15
6439
how to data query in , can view in page/tree ui
query appointment odoo V16
Avatar
0
jul. 24
1490
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