OCA / payroll

Odoo modules for payroll management
GNU Affero General Public License v3.0
75 stars 117 forks source link

[16.0] payroll_account support in hr_payslip.py for multicurrency #167

Open pleirb opened 1 month ago

pleirb commented 1 month ago

Hi everybody how are you?

What do you think or what is suggested to be done if the payroll has to be generated not in base currency? Currently in the action_payslip_done method the value of the currency is obtained in this way:

currency = (
  slip.company_id.currency_id or slip.journal_id.company_id.currency_id
)

Reference: https://github.com/OCA/payroll/blob/d0196f8cda6a0938cb742bcdb63f322857f6a896/payroll_account/models/hr_payslip.py#L61 It wouldn't be more real if you obtained the currency in this way?:

currency = (
  slip.currency_id or slip.journal_id.currency_id
)

Of course, for this it would be necessary to have the following module installed, which is still under review in version 17.0: hr_contract_currency On the other hand, the values ​​of currency_id and amount_currency would have to be loaded into the debit and credit lines and then perform the corresponding reconciliation. I am not an expert programmer or accountant but I have carried out some tests in a local development environment (in version 16.0) also using two old modules in version 8.0 of Odoo developed by ClearCorp that I migrated to version 16.0 and thus be able to contemplate this multi-currency scenario: hr_payroll_multicurrency This module was written to extend the functionality of payroll to support multi-currency hr_payroll_account_multicurrency This module was written to extend the functionality of payroll to create journal items in multi-currency

Basically I would like to know from the main people in charge of this repository if there are intentions to incorporate multi-currency support for payrolls and if not, receive an option on the path I am following to know if it is worth contributing to what I am doing. and that others can collaborate so that this functionality is present in version 16 and later

From already thank you very much