Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Conditional Python Code in Salary Rule of Payroll

Subscriure's

Get notified when there's activity on this post

This question has been flagged
hrpayrollhr_payrollsalary_rules
6 Respostes
18968 Vistes
Avatar
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
Avatar
Descartar
Med Said BARA

Minimum wage is probably the contract.wage !

Timour Mahieddin
Autor

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

Avatar
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
Avatar
Descartar
Med Said BARA

Do you have any comment ?

Med Said BARA

24445.55 = The maximum contribution basis

Avatar
Timour Mahieddin
Autor 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
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

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

Registrar-se
Related Posts Respostes Vistes Activitat
Integrating Paychex and ADP Payroll with Odoo
hr payroll hr_payroll
Avatar
Avatar
1
de des. 16
9923
Salary rules for other pay roles
payroll hr_payroll human_resource salary_rules
Avatar
0
de des. 24
1568
How can i make payroll calculate the payslip based on the contract date? Odoo12
payroll hr_payroll salary_rules odoo12
Avatar
0
d’oct. 19
3889
Hungary's Payroll module
hr payroll hr_payroll hungarian
Avatar
0
de febr. 17
3939
Server action hr.work.entry Solved
payroll hr_payroll
Avatar
Avatar
1
d’oct. 24
2600
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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