İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

How do I link the Timesheets app with Payroll to calculate the salaries of my hourly workers?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
hrPayrollQuickstartSF-ExpertsV17.0
3 Cevaplar
3211 Görünümler
Avatar
Emilio Rodríguez De la Fuente (erdf)

Hello Odooverse! 

I want to use Payroll to start registering my company's payroll. Nevertheless, some hourly workers register their worked time in the Timesheets App, and Payroll does not consider Timesheets as a work entry source. Is there a way to do it? I am using this salary structure:


As you observe is not too complex:

However, I want it to be calculated from the timesheet records instead of calculating the worked time based on the work entry sources (attendance, planning, or working schedule).

0
Avatar
Vazgeç
Avatar
Emilio Rodríguez De la Fuente (erdf)
Üretici En İyi Yanıt

Hello Emilio! 

The answer to this question could be as detailed as the business case, depending on case by case. So, to achieve this, you need to create a new salary rule or modify an existing one. 

The computation should be based on Python Code: 

hours = 0   

Line explanation: setting the variable hours to 0.


lines = payslip.env[ 'account.analytic.line' ].search( [ ('employee_id' , '=', payslip.employee_id.id), ('validated_status', '=', 'validate'), ('date', '>=', payslip.date_from), ('date', '


Line explanation:  This code retrieves all the analytic lines (account.analytic.line) for the employee on the payslip that has been validated and is within the current payroll period.


  • payslip.env['account.analytic.line']:  This accesses the account.analytic.line model, which refers to the analytic lines or timesheet records in Odoo.
  • .search: The search() function looks for records that meet the criteria specified in the list of tuples (search criteria).
  • ('employee_id', '=', payslip.employee_id.id): Filters the analytic lines to get only those associated with the specific employee that appears on the payslip (payslip.employee_id.id).
  • ('validated_status', '=', 'validate'): Filters the analytic lines to get only those that have been validated, meaning they have been approved or confirmed.
  • ('date', '>=', payslip.date_from): Filters the analytic lines to get only those that were recorded starting from the payslip start date (payslip.date_from).
  • ('date', ': Filters the analytic lines to get only those that were recorded up to the payslip end date (payslip.date_to).


for line in lines:

    hours += line.unit_amount

result_qty = hours

result = contract.hourly_wage

Explanation: The for loop iterates over each analytic line stored in "Lines," so each "Line" represents a record of time worked by the employee. Then, the code sums all the hours and inputs the total hours in result_qty, which will result in the hourly wage in the employee contract.

Disclaimer: the code may depend on what or how you want to impact your payroll calculations.

Before applying my solution, please think about other important factors that may be relevant to your payroll calculation: 

  • As you may have seen, this does not generate work entries such as overtime. When someone works more than the agreed-upon amount, you may need to create another salary rule to calculate that. 
  • And if Time Off generates Timesheets, consider this when applying this solution.

Disclaimer: This is only a general solution to the business case. Additional specifications are needed to cover it in more detail, which may apply depending on the specific case, as I mentioned earlier.

4
Avatar
Vazgeç
Ray Carnes (ray)

On Earth 76483 I already answered this, but yours is better.

Avatar
Matthew Messner
En İyi Yanıt

Is it possible that someone could walk through how to actually implement this? I'm not code savvy and I am not sure if I am making the rule correctly. It seems very odd that Odoo does not have this built into payroll. Asking contractors to Check In to attendance and fill out timesheets so we can tract project hours is unreasonable and cumbersome. 

I just need hours worked and logged in timesheets to be able to be tracked as Work Entries and be added to Payslips. 

EDIT:

This process does work with some caveats. 

 After making a new Rule by adding the code to the Python Computation, the rule needs to be added to a Salary Structure. Within a new pay slip you can Compute Sheet in the Salary Computation tab. 

This will give you the hours pulled from the timesheets. As mentioned in the other answers, it pulls time indiscriminately, so any hours that are logged will be added. This is an issue if a worker is logging hours that they are not to be paid for. 

Another issue is that these wages are not record as Basic Wages and will not show up in the Payslip reports or the Payslip List. This is an issue when reconciling money in Accounts. 



0
Avatar
Vazgeç
Avatar
Arseniy Finberg
En İyi Yanıt

Actual salary rule code, working on odoo 17 (based on upper comment with slight edits)

hours = 0   

lines = payslip.env['account.analytic.line'].search([

    ('employee_id', '=', payslip.employee_id.id),

    ('validated_status', '=', 'validate'),

    ('date', '>=', payslip.date_from),

    ('date', '<=', payslip.date_to)  # Corrected the condition here

])

for line in lines:

    hours += line.unit_amount

result_qty = hours

result = contract.hourly_wage

0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Alternating Working Schedules in Odoo! Çözüldü
hr Quickstart SF-Experts WorkingSchedule
Avatar
1
Şub 25
3287
In recruitment App V17.0 ¿what is the main difference between Recruiter and Interviewer? Çözüldü
hr Quickstart SF-Experts Recruitment
Avatar
Avatar
2
Eki 24
2634
In Time Off, How can I check the Time Off balances of my employees? Çözüldü
hr Quickstart SF-Experts TimeOff
Avatar
1
Nis 24
3344
Traceability of tardiness in employees Çözüldü
hr Attendances Quickstart SF-Experts
Avatar
1
Nis 24
2247
What are the New Releases for Fleet V17.1? Çözüldü
fleet hr Quickstart SF-Experts
Avatar
Avatar
2
Nis 24
2098
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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