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

Salary calculation on the basis of hours the employees worked

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
2 Replies
12548 Tampilan
Avatar
Victor Cardozo

Hello, 


I am trying to set up the payroll app to make all the calculations automatically for employees whose salary is in a $/hour basis. problem is, I cant find the right python expressions for it to work (I am using the enterprise and I do not have access to the py file) therefore, I can only change in the payroll app and all I am giving is the following: 



                    # Available variables:

                    #----------------------

                    # payslip: object containing the payslips

                    # employee: hr.employee object

                    # contract: hr.contract object

                    # rules: object containing the rules code (previously computed)

                    # categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).

                    # worked_days: object containing the computed worked days.

                    # inputs: object containing the computed inputs.


                    # Note: returned value have to be set in the variable 'result'


                    result = ___________________________


What would need to be written in the blank above so the system can multiply the worked hours times the salary?


Thank you very much! 

2
Avatar
Buang
Avatar
Paresh Wagh
Jawaban Terbai

Hi Victor:

Try this.

result = contract.hourly_wage * worked_days.WORK100.number_of_hours

NOTE: WORK100 refers to the Attendance object.

You may also want to see how the Worker Pay Salary Rule is set up in the demo data. It provides an example of how to set up a payslip for an hourly worker.

1
Avatar
Buang
Victor Cardozo
Penulis

Thank you very much! this was super helpful!

Victor Cardozo
Penulis

I have another question and after looking at the demo I couldn't find it anywhere.

If I have a contract with an employee where he earns 5$/hour up to 40 hours a week. But then, 7$/hour after the 40th hour. How could I make that command?

Ex.

the employee worked 46 hours this week

I'd like the command to perform the following equation = (46hrs - 40 hrs) 8 7$/ hr = 42$

Thank you!

Paresh Wagh

There are different ways to do this.

If you are able to capture the hours separately as regular hours and extra hours, you could create a Work Entry type called "Extra Hours" that you could use in your calculations. However, you may need to do a customization to capture the additional rate for the extra hours in the Contract or use one of the input types to specify it in the Payslip.

The other way would be to adjust your formula to apply the extra rate in the formula itself. I wouldn't recommend this option since it would lead to hard coding unless you have a standard overtime rate like a percentage that applies to all hourly employees/contractors.

Victor Cardozo
Penulis

That is my problem precisely, I cant find a way to separate extra hours from regular hours. the contract is giving me only the option to add the base salary, nothing more. I was thinking about using "if functions" in python expressions but couldnt find the right command (if there is one)

Victor Cardozo
Penulis

I managed to add different Extra hours for my payroll by defining them as different work entries and using the same equation you showed me in your answer (thanks by the way) However, in my company, I have different kinds of Extra hour rates (night shift, Day shift, sunday shift and so on...) and I am adding them all to my payroll structure.

Since I have them as "Condition always true" when I run a payslip with no Extra hours gives me an error since that condition cant be met

How could I write a python expression that applies the Extra hours rules "IF" there is extra hours in the payslip?

is there a python expression I could use in the conditions to make this work?

Thank you very much!

Paresh Wagh

Please post a screenshot of how you have currently defined the calculation for the extra hours. You can upload the screenshot to one of the image sharing sites like imgur and post the link here.

Victor Cardozo
Penulis

Sure! https://imgur.com/gallery/JhM9suz

Victor Cardozo
Penulis

forgot to say in the previous comment. HED100 (Extra Hour for Daytime) is the name for a work entry which Im using to compute the extra hours!

Avatar
Emilio San Jose
Jawaban Terbai

Just want to add that the Attendance object in version 14 seems to be "WORK" and not "WORK100"

0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
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