Mexico

The Mexico payroll localization covers salary computations for employees, including employee and employer payroll taxes.

Before configuring the Mexico localization, review the general payroll documentation, which covers basic configurations and settings applicable to all localizations.

Apps & modules

Install the following modules to get all the features of the Mexico payroll localization:

Name

Technical name

Dependencies

Description

Mexico - Payroll

l10n_mx_hr_payroll

  • hr_payroll

  • hr_work_entry_holidays

  • hr_payroll_holidays

Adds the required fields to manage employee payroll and time off data.

Mexico - Payroll CFDI

l10n_mx_hr_payroll_account_edi

  • l10n_mx_hr_payroll_account

  • l10n_mx_edi

Adds the ability to sign CFDI payroll documents with the government.

Mexico - Payroll with Accounting

l10n_mx_hr_payroll_account

  • hr_payroll_account

  • l10n_mx

  • l10n_mx_hr_payroll

  • l10n_mx_edi

Adds the required rules and parameters to manage local payroll calculations.

Tip

Installing the Mexico - Payroll CFDI module automatically installs both the Mexico - Payroll and Mexico - Payroll with Accounting modules.

Company configurations

First, the company must be configured. Navigate to Settings app ‣ Users & Companies ‣ Companies. From the list, select the desired company, and configure the following fields:

  • Company Name: Enter the business name in this field.

  • Address: Complete the full address, including the City, State, Zip Code, and Country.

    Important

    The state selected in the company’s address is associated as the work address by default for the employee, and the one used to calculate payroll taxes.

  • RFC: Enter the company’s RFC number.

  • Company ID : This field is not used in the Mexico localization, and should remain blank.

  • Currency: By default, MXN is selected. If not, select MXN from the drop-down menu.

  • Phone: Enter the company phone number.

  • Email: Enter the email used for general contact information.

Warning

Ensure the information is accurate, as it is used when calculating various taxes.

Employees

Every employee being paid must have their employee profiles configured for the Mexico payroll localization. Additional fields are present after configuring the database for Mexico.

To update an employee form, open the Employees app and click on the desired employee record. On the employee form, configure the required fields in the related tabs.

Work tab

Enter the Work Address for the employee in the Location section of the Work tab.

Important

The state selected in this address determines which salary rules Odoo applies when calculating taxes.

Personal tab

Ensure the employee has a minimum of one trusted bank account listed in the Bank Accounts field in the Private Contact section.

These accounts are used to pay the employee. Payroll cannot be processed for employees without a trusted bank account. If no trusted bank account is set, a warning appears on the Payroll dashboard and an error occurs when attempting to run payroll.

Ensure the Legal Name and Gender fields are populated and configured in the Personal Information section.

Ensure the following fields are properly populated in the Citizenship section:

  • Nationality (Country): The employee’s country of citizenship.

  • SSN No (Social Security Number): A personal 11-digit NSS number.

  • RFC (Registro Federal de Contribuyentes): A personal 13-digit alphanumeric tax identification number.

  • CURP (Clave Única de Registro de Población): A personal 18-character alphanumeric code.

Where all personal information is located on the employee profile.

Payroll tab

Contract overview section

This section holds information that drives salary calculations. Ensure the following fields are configured:

  • Contract: The time period the contract is valid for. If the second field is left blank, the contract runs indefinitely.

  • Wage Type: Select how the employee is paid.

    • Select Fixed Wage for salaried employees who receive the same amount each pay period.

    • Select Hourly Wage for employees paid based on hours worked.

    Tip

    Set a default Wage Type in the salary Structure Type to configure employees in bulk. If needed, the default can be overridden on individual employee records if exceptions are needed.

  • Wage: Enter the amount and frequency the employee is paid.

  • Contract Type: Determines how the employee is paid and classified, such as Indefinite Term Employment Contract, Hourly Wage Employment, Seasonal Employment Contract.

    Important

    The Contract Type field is visible on payslips.

  • Pay Category: Select Mexico: Employee. for this field. This defines when the employee is paid, their default working schedule, and the work entry type it applies to.

  • Regime Type: Select the correct regime type (Régimen de Contratación) for the employee. The selected regime type determines the employee’s benefits, taxes, and social security contributions.

Schedule section

  • Work Entry Source: Select Working Schedule, which creates work entries based on the employee’s assigned working schedule (e.g., 40 hours per week).

    Note

    The Mexico payroll localization is currently not able to create work entries from the Attendances or Planning apps.

  • Extra Hours: Tick the checkbox to allow the Attendances app to add any extra work entries logged by the employee.

  • Working Hours: Using the drop-down menu, select the default work schedule. This is particularly important for employees available to receive overtime pay (typically hourly employees, not salaried).

Options section

Enter the Holiday Bonus Rate percentage given annually ot the employee in the corresponding field. The percentage is calculated from the employee’s base salary.

If the employee is contributing to a Savings Fund, enter the monthly amount to be contributed. The employer typically matches this amount, and the money is placed in a savings account that is accessible once a year to the employee.

Vouchers section

Some companies may offer extra benefits in the form of vouchers, which are paid to employees for food and transportation costs. If the company provides these benefits, configure the following fields:

  • Payment Period: Using the drop-down menu, select how often the vouchers are paid out. The default options are either Last Day of the Month, if employees are paid at the end of the month, or In the period, if the vouchers are broken up and evenly distributed according to the payment schedule, such as weekly or bi-weekly.

  • Meal Vouchers: Enter the monthly amount paid to the employee towards food expenses.

  • Transport Vouchers: Enter the monthly amount paid to the employee towards transportation, such as bus fare or parking fees.

  • Gasoline Vouchers: Enter the monthly amount paid to the employee for their vehicle’s gas.

Note

The monetary amount for the vouchers is the monthly amount given to employees. If the Payment Period is set to In the period, Odoo calculates the voucher amount for each pay period.

For example, if an employee is paid weekly, and their Meal Voucher is set to $100, the employee receives $25 in every weekly paycheck.

The payroll tab of an employee form, filled out for Mexico.

Infonavit / Fonacot tab

Infonavit section

INFONAVIT is a government institution that assists employees with affordable mortgage credits, which can be used to buy, build, or remodel a home, or pay off an existing mortgage.

Add an Infonavit credit

To create an INFONAVIT credit, click Add a line, and a Create an Infonavit Credit pop-up window loads.

By default, the Status field is populated with In Progress. This indicates the credit is active.

Next, select the Type of credit, either a Fixed Monetary Fee, a Percentage, or a Discount Factor. After this field is configured, a corresponding field appears on the form.

Enter the Monthly Insurance to be paid directly to the debt. If any additional funds are contributed by the employee, enter the additional amount in the Extra Fixed Monthly Contribution field.

The last field corresponds to the Type selected. Enter the Fixed Monetary Fee, Percentage, or Discount Factor in the field.

Once all fields are configured, click the Save & Close button, and the credit is added to the INFONAVIT section.

The INFONAVIT section filled out for an employee.

Important

Once INFONAVIT credits are fully paid, the payroll officer must change the Status of each completed line item to Closed.

If the payroll officer does not change the status, money will continue to be contributed to the employee’s account in all subsequent paychecks.

Fonacot section

FONACOT is a Mexican government program that provides employees with low-cost loans for various needs, such as home improvements, education, or emergencies.

The FONACOT section is where employee repayments are configured.

Add a Fonacot credit

To add a line to the FONACOT section, click Add a line, and a blank line loads. The Status is set to In Progress, by default.

Enter the monthly payment amount in the Import field. If the employee wishes to make any additional payments each month, enter the value in the Extra Monthly Contribution field.

Important

Once FONACOT loans are paid off, the payroll officer must change the Status of each completed line item to Closed.

If the payroll officer does not change the status, money will continue to be taken out of the employee’s account in all subsequent paychecks.

Payroll configuration

Several sections within the Payroll app installs a salary structure, structure type, rules, and rule parameters specific to Mexico.

Prior to running payroll, the CFDI must also be configured.

CFDI configuration

The CFDI is a required electronic tax receipt that acts as a digital invoice. The CFDI must be certified by a PAC before being submitted to the Mexican Tax Administration (SAT).

This document serves as proof of income, expenses, and payroll, and requires both a UUID and a digital signature, to comply with Mexican tax laws.

First, navigate to Payroll app ‣ Configuration ‣ Settings, and scroll to the CFDI section.

Enter the Employer IMSS ID in the corresponding field, and select the appropriate Risk Type using the drop-down menu. If no risk is associated with the company, select Does Not Apply.

Note

Mexico assigns different Risk Types based on several factors, including information cross-referenced from previously submitted employee and employer. Consult the company’s payroll officer to determine the correct risk type.

Salary structures & structure types

When the l10n_mx_hr_payroll module is installed, a new Salary Structure gets installed, Mexico: Employee. This structure includes two Structure Types, a Mexico: Regular Pay, and a Mexico: Christmas Bonus.

The Salary Structure contains all the individual salary rules for each Structure Type, which informs the Payroll app how to calculate employee payslips.

The Mexico salary structures in the salary structures list.

Salary rules

To view the salary rules that inform the salary structure what to do, navigate to Payroll app ‣ Configuration ‣ Structures and expand the Mexico: Employee group to reveal the two available structure types. Click Mexico: Regular Pay to view the detailed regular pay salary rules.

The top portion of the US salary rules.

Each rule defines how pay is calculated, taking into account factors such as bonuses, allowances, vouchers, and taxes.

Rule parameters

Some calculations require specific rates associated with them, such as bonuses and holidays. Rule Parameters are capable of listing a value, either a percentage or a fixed amount, to reference in the salary rules.

Most rules pull information stored in the parameters module to get the rate of the rule (a percentage) and the cap (a dollar amount).

To view rule parameters, navigate to Payroll app ‣ Configuration ‣ Rule Parameters. Here, all rule parameters are displayed with their linked Salary Rules, which can be accessed. Review the parameters associated with a rule by looking for the Name of the rule, and make any edits as needed.

In Mexico, all companies are required to configure the following rule parameters:

  • Mexico: Risk Bonus Rate (Prima de Riesgo del IMSS): The Risk Bonus Rate is referred to as the Occupational Risk Premium (Prima de Riesgo de Trabajo). This is the amount the company must contribution to the IMSS, aka the Mexican Social Security Institute. This amount is based on the company’s accident rate, which is calculated using multiple factors, including the number of accidents the company has reported, and the general level of risk the type of company works with. The rate is determined by the IMSS for each company, therefore this rate must be updated when configuring the Mexico payroll localization.

  • Mexico: Christmas Bonus (Días de Aguinaldo): In Mexico, an annual Christmas bonus is given to all employees. The bonus must be for a minimum of 15 days of pay. Companies that provide a higher bonus must modify this value. In Odoo, all employees of a company recieve the same amout of paid days for their Chirstmas bonus.

  • Mexico: Holiday Table (Tabla de vacaciones): This rule outlines the number of vacation days an employee is allocated, based on their years of service. This must be modified, if needed, to reflect the company’s paid vacation policy.

Example

The Mexico: Risk Bonus Rate of a company is different from the one added by default in Odoo. To update this, navigate to Payroll app ‣ Configuration ‣ Rule Parameters, then, filter the results by Mexico: Risk Bonus Rate, and edit the Parameter Value.

Important

Odoo adds updated rule parameters for the current calendar year. It is not recommended to edit rule parameters (other than the four that must be reviewed and updated, listed above) unless a national or state parameter has changed, and is different from the rule parameters created by Odoo. Check with all local and national regulations before making any changes to rule parameters.

Run Mexico payroll

Before running payroll, the payroll officer must validate employee work entries to confirm pay accuracy and catch errors. This includes checking that all time off is approved and any overtime is appropriate.

Work entries sync based on the employee’s contract configuration. Odoo pulls from the assigned working schedule, attendance records, planning schedule, and approved time off.

Any discrepencies or conflicts must be resolved, then the work entries can be regenerated.

Once everything is correct, draft payslips can be created individually or in batches, referred to in the Payroll app as Pay Runs.

The work entries for a pay run, with some time off entered in the work entries.

Note

To cut down on the payroll officer’s time, it is typical to process payslips in batches, either by wage type (fixed salary vs hourly), pay schedule (weekly, bi-weekly, monthly, etc.), department (direct cost vs. administration), or any other grouping that best suits the company.

The process of running payroll includes different actions that need to be executed to ensure that the amount withheld for funds and government institutions is correct, the amount that the employee receives as their net salary is correct, and the computation of hours worked reflects the employee’s actual hours worked, among others.

When running a payroll batch, check that the period, company, and employees included are correct before starting to analyze or validate the data.

Once the payslips are drafted, review them for accuracy. Check the Worked Days and Salary Inputs tabs, and ensure the listed worked time is correct, as well as any other inputs. Add any missing inputs, such as commissions, bonuses, and ISR adjustments that are missing.

Next, check the various totals (gross pay, vouchers, IMSS contributions, CEAV, taxes, and gross pay), then click Compute Sheet to update the salary calculations, if there were edits. If everything is correct, click Validate.

The worked days tab of a payslip.

Accounting check

The accounting process when running payroll has two components: creating journal entries, and registering payments.

Journal entry creation

After payslips are confirmed and validated, journal entries are posted either individually, or in a batch. The journal entry is created first as a draft.

Important

It must be decided if journal entries are done individually or in batches before running payroll.

All payslips in a draft state.

Twenty-two accounts from the Mexico CoA are included with the payroll localization:

  • 110.01.01 Employment subsidy to apply

  • 210.02.01 Provision for vacation to pay

  • 211.01.01 Provision for employer IMSS to pay

  • 211.02.01 Provision for SAR to pay

  • 216.01.01 Withholding or income tax for wages and salaries

  • 216.11.01 IMSS withholding tax

  • 601.01.01 Wages and salaries

  • 601.07.01 Holiday Bonus

  • 601.15.01 Pantry

  • 601.19.01 Savings fund

  • 601.26.01 IMSS quota

  • 601.27.01 Contributions to infonavit

  • 601.28.01 Contributions to the SAR

  • 201.01.02 Employee Reimbursement

  • 205.06.02 Other Various Short-Term Credits (Fonacot)

  • 210.03.01 Provision for bonus to pay

  • 210.04.01 Provision for savings fund to pay

  • 211.03.01 Provision for infonavit to pay

  • 601.12.01 Bonus

  • 601.16.02 Transport (gasoline vouchers)

  • 601.16.01 Transport (support)

  • 601.74.01 Commissions on sales

Note

The CoA configuration is done by default when a company is located in Mexico. The account codes and names can be edited to suit the company’s needs. If there is no CoA account associated with a salary rule (used in a salary structure), Odoo uses the account Salary Expenses to create the journal entry, regardless of the nature of the move.

If everything seems correct on the journal entry draft, post the journal entries.

Journal entries posted.

Register Payments

After the journal entries are validated, Odoo can generate payments.

Important

To generate payments from payslips,employee’s must have a trusted bank account. If the employee’s bank account is not marked as trusted, CFDI files cannot be generated through Odoo.

Payslips with a status of paid.

Generate CFDI XML files

After payslips have bee processed and paid, a CFDI XML file must be generated, which is then electronically submitted to Mexico’s SAT.

To create the CFDI file, open the individual payslip, and click the Generate CFDI button.

Once the file has been created and sent, a record is stored in the chatter.

Close Payroll

If there are no errors, payroll is completed for the pay period.

Run Christmas bonus payroll

To run the annual Christmas bonus, follow the same workflow for regular Mexico payroll, using the Mexico: Christmas Bonus salary structure.