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
    • Discuss
    • 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

How i can compare fields.Date with another?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
viewsmodelsfields.date
3 Replies
7253 Tampilan
Avatar
Tihomir Stoychev Stoychev

Hello!

Im pretty newbie on this but im trying to learn and expand my knowledge.

I have a hotel which has a booking system, this booking system takes from user 2 dates , booking start and booking end. I would like to check when a new user tries to make a new booking if his date inserted is not overlaping another booking, do you copy me?


I think is by using the constrains odoo gives but how i can compare dates? For example if user a introduces that he wants a booking from 02/09/2018 to 04/09/2018 and user b tries to make a book for 03/09/2018 it should tell him that it is not possible. But how? I thought on parsing the result to EPOCH/posix time but i also dont know how to do it, im also a newbie on python.


Someone can help me?  

0
Avatar
Buang
Fatih Piristine

this is not a question related to odoo. you should first look into data structures and learn them. then go ahead and learn little bit of python date: https://docs.python.org/3.4/library/datetime.html

Sehrish

Playing with dates in python:

For date manipulation

1- http://learnopenerp.blogspot.com/2018/01/python-date-manipulation.html

For date formatting

2- http://learnopenerp.blogspot.com/2018/02/python-strftime-datetime-formatting.html

For adding time periods etc

3- http://learnopenerp.blogspot.com/2018/02/python-timedelta.html

Avatar
Pawan Kumar Sharma
Jawaban Terbai

Hello @Tihomir,

You can use following filter domain for remove overlap bookings for your hotel.

domain = [('start_date', '<=', self.booking_upto),('end_date', '>=', self.booking_from)]
booking = self.env['hotal.booking'].search(domain)

where booking_upto and booking_from date fields from 'hotel.booking'. And start_date & end_date field model from where you booking.

Also you can check this principle in HR Management.

Hopefully this will helpful for you.

1
Avatar
Buang
Avatar
San
Jawaban Terbai

Buen día.

Yo comenzaría por hacer la prueba con el módulo de citas https://www.youtube.com/watch?v=nSnc5W5cuwQ, registrando cada habitación como un recurso.

1. Registrar un recurso por tipo de habitación que tienes en tu hotel.

2. Crear los horarios disponibles, poniendo el tiempo en base a la cantidad de habitaciones disponibles, para que puedan reservar en un día sólo la cantidad de habitaciones de ese tipo que se tienen disponibles, Internamente la hora de la habitación para llevar el control la podrían tomar como la habitación, ejemplo: reserva de la habitación 11 h 00, sería la habitación 211.

3. Hacer un pequeño ajuste en la página para que muestre el día de reserva en lugar de la hora.

Puedes descargar completamente gratis y con usuarios ilimitados, la aplicación de página WEB y citas, agregando módulos gratuitos como blogs, chat en linea, presentaciones, flotillas etc... en el siguiente link:  https://www.odoo.com/es_ES/page/appointments

Espero la idea le sea de ayuda. Saludos!

0
Avatar
Buang
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
Viewing Field from another Model
views models
Avatar
Avatar
1
Feb 18
4112
Why not all model fields shown in defalt view?
views models
Avatar
Avatar
1
Feb 16
4343
Adjust View Order by Field
views models
Avatar
1
Mar 15
4901
Want to make a field invisible based on another field in a view Diselesaikan
views python models
Avatar
Avatar
1
Nov 23
3534
Can't create view (model not found) Diselesaikan
views models odoo10
Avatar
Avatar
Avatar
2
Mei 23
8875
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