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 to create a today´s filter for different time zones

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
quickstartFiltersQuickstart
1 Balas
3285 Tampilan
Avatar
Andrea Watty Ruiz (anwr)

In some cases, it is necessary to view the records of the day, the filter should be useful in different apps.

0
Avatar
Buang
Avatar
Andrea Watty Ruiz (anwr)
Penulis Jawaban Terbai

In some cases, it is necessary to view the records of the day (for example the sales of that day). To achieve this, we can create a filter that shows records from that period.

The base filter we will use is as follows:

["&", ("date", ">=", datetime.datetime.combine(context_today(), datetime.time(0, 0, 0))), ("date", "

Explanation of what the filter does:

  • "Date" = the field to be filtered
  • ">=" = Greater than or equal to
  • datetime.datetime.combine(context_today(), datetime.time(0, 0, 0)) = today’s date from 00:00:00
  • "Date" = the field to be filtered
  • "
  • datetime.datetime.combine(context_today(), datetime.time(23, 59, 59)) = today’s date up to 23:59:59

Note: The "date" field should be changed to the field you need to search.

However, this filter will need to be adjusted according to Greenwich Mean Time (GMT), as Odoo considers time starting from 00:00. If we used the filter as shown above, it would not display the correct information worldwide.

First, identify your user's time zone. You can do this by going to Settings > Users & Companies > Users > Select a user > Preferences > Check Time Zone.

Once you have identified the user's time zone, find the GMT offset for that zone. This is necessary to modify the filter accordingly.

In this case, we are in the GMT-6 time zone, which means that a time filter would look like this:

For example, if we filter by date and want to see all records with a date of 08/22/2024 at 00:00:00, Odoo will display records with a date of 08/22/2024 06:00:00 due to our GMT-6 time zone.

To display the correct time in our filter, we need to add (in the case of GMT-6) the 6-hour "delay" we have. The base filter would look like this:

["&", ("date", ">=", datetime.datetime.combine(context_today(), datetime.time(6, 0, 0))), ("date", "

Explanation of what the filter does:

  • "Date" = the field to be filtered
  • ">=" = Greater than or equal to
  • datetime.datetime.combine(context_today(), datetime.time(6, 0, 0)) = today’s date from 06:00:00
  • "Date" = the field to be filtered
  • "
  • datetime.datetime.combine(context_today() + datetime.timedelta(days=1), datetime.time(5, 59, 59)) = today’s date plus one day up to 05:59:59

Note: In the less than or equal part, the + datetime.timedelta(days=1) moves us to the next day. If we need to subtract it, we should use a minus sign (-).

Documentation: datetime: Python


Exercise 1:

We need to view the sales orders generated today. To do this, modify the base filter by changing the name of the date field and adjusting the time to work in the GMT-6 time zone.

Note: Developer mode must be enabled to use the filter.

This filter can be replicated across various models, countries, and time zones. The important part is understanding the logic of how it works so that it can be adapted to your needs.


Exercise 2:

The manager needs to see the information in real time, he would like to enter the system at the end of the day and see in a graphic way how many products they sold today. 

Create a new dashboard 

Dashboard > Configuration > New 

Name your dashboard as POS reports (or as needed), add a line and publish it 


Go to the Point of Sale app and enter the orders reports, enter your filter and group by product, now you will see how many products you sold today. 

Point of Sale > Reports > Orders


Insert the graphic in a spreadsheet and select the dashboard you want to show the report



It will automatically show you the spreadsheet, you can edit it if you need to. This functionality will let you add more graphics and add text.



Go to the dashboard app and select the “POS reports” board, the graphic will be showing the sales information of today.

Note: You can add as many graphics as you need, depending on the information the manager needs to analyze.


Using this filter allows the customer to quickly gain insight into the company's daily operations. By focusing on records from the current day, users can efficiently track and analyze recent activities, making it easier to stay informed and make timely decisions.

2
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
How do I connect the Epson TM-T88VII to Odoo?
quickstart Quickstart
Avatar
Avatar
2
Okt 25
1089
How to Set Customer-Specific Product Names Diselesaikan
quickstart Quickstart
Avatar
1
Nov 25
1714
✅ Odoo E-commerce: How to discriminate deliveries based on the type of clients
quickstart Quickstart
Avatar
0
Agu 25
1572
How can Import an existing Spreadsheets with formulas with out doing it manually? Diselesaikan
quickstart Quickstart
Avatar
2
Agu 25
2057
Does Odoo manage WebP ? Diselesaikan
quickstart Quickstart
Avatar
Avatar
Avatar
3
Jul 25
4815
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