Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Students and Faculty Query in pgAdmin

Odebírat

Get notified when there's activity on this post

This question has been flagged
querypgadminodoo
3 Odpovědi
2645 Zobrazení
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
Zrušit
SmithJohn45
Autor

any help please?

SmithJohn45
Autor

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

Avatar
Kiran K
Nejlepší odpověď

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
Zrušit
SmithJohn45
Autor

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

Avatar
Arshad Zayn
Nejlepší odpověď

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
Zrušit
SmithJohn45
Autor

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
Autor

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!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Can i query _ids column data in pgAdmin?
query pgadmin
Avatar
Avatar
1
úno 24
2112
customers & vendors query in pgAdmin Vyřešeno
pgadmin odoo
Avatar
Avatar
Avatar
3
lis 23
2319
[Widget Javascript]: How to make a query on a model odoo?
javascript query odoo
Avatar
0
zář 16
5458
Reports to excel with ODBC, queries and database schema?
query excel odoo
Avatar
0
zář 15
6428
how to data query in , can view in page/tree ui
query appointment odoo V16
Avatar
0
čvc 24
1476
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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