Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Conditional Python Code in Salary Rule of Payroll

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
hrpayrollhr_payrollsalary_rules
6 Replies
18970 Rodiniai
Portretas
Timour Mahieddin

Good Day

I'm testing the Payroll App, and i want to add a salary rule of Social Security of Venezuela, but i have a problem, this rule is based in minimum Wage = 4889.11 Bs.F, i mean, if an employee gains minimun wage and always give 4% to social security, for this i use the code

(((contract.wage * 12) / 52) * 0.04) * 2 
 

But if an employee gains more than minimun wage y have to do this code

((((4889.11 * 5) * 12) / 52) * 0.04) * 2

and about 0.04 is always the 4% from employees... the code applies for companies too but with a diference, in Venezuela there's 3 types of companies, low risk who gives 9% to social security using this code

(((contract.wage * 12) / 52) * 0.09) * 2

((((4889.11 * 5) * 12) / 52) * 0.09) * 2  Depending if employee gains more than minimun wage

other companies are medium risks and give 10 % and use the code

(((contract.wage * 12) / 52) * 0.10) * 2

((((4889.11 * 5) * 12) / 52) * 0.10) * 2  Depending if employee gains more than minimun wage

and there are companies with high risks and give 11% to social security

(((contract.wage * 12) / 52) * 0.11) * 2

((((4889.11 * 5) * 12) / 52) * 0.11) * 2  Depending if employee gains more than minimun wage

My Question is, How can i check the company's type (low, medium or high) and how can i check if employee gains minimum wage or more and obtain the value for this salary rule and apply the respective code?

0
Portretas
Atmesti
Med Said BARA

Minimum wage is probably the contract.wage !

Timour Mahieddin
Autorius

Thank you, i got the idea...based in your code, i used this if contract.wage

Portretas
Med Said BARA
Best Answer

Let's call this rule IVSSEMPLOYEE. It should be computed as follow (this implies that all contract.wage are => 4889.11):

if contract.wage = 4889.11:
     result = (((contract.wage * 12) / 52) * 0.04) * 2 
elif 4889.11 < contract.wage <= 24455.55:
    result = ((((contract.wage * 5) * 12) / 52) * 0.04) * 2
else:
    result = ((((24455.55 * 5) * 12) / 52) * 0.04) * 2

2
Portretas
Atmesti
Med Said BARA

Do you have any comment ?

Med Said BARA

24445.55 = The maximum contribution basis

Portretas
Timour Mahieddin
Autorius Best Answer

no Med Said BARA, minimun wage in this country is 4889.11, sometimes an employee wins 4889.11, but other employees wins 6000 example:
Employee 1: contract.wage = 4889.11

Employee 2: contract.wage = 6000

i need to do a salary rule with python code that check if an employee wins 4889.11 or 6000 and apply the respective code.

0
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

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

Registracija
Related Posts Replies Rodiniai Veikla
Integrating Paychex and ADP Payroll with Odoo
hr payroll hr_payroll
Portretas
Portretas
1
gruod. 16
9924
Salary rules for other pay roles
payroll hr_payroll human_resource salary_rules
Portretas
0
gruod. 24
1570
How can i make payroll calculate the payslip based on the contract date? Odoo12
payroll hr_payroll salary_rules odoo12
Portretas
0
spal. 19
3890
Hungary's Payroll module
hr payroll hr_payroll hungarian
Portretas
0
vas. 17
3939
Server action hr.work.entry Solved
payroll hr_payroll
Portretas
Portretas
1
spal. 24
2601
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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