[REF] l10n_au_keypay: remove au dependency

Keypay, now called Employment Hero, is not limited to Australia
but also supports Singapore, Malaysia,...

This task will:
- remove dependencies to Australia, to make it usable with other
localisation.
- Rename the module and all references to keypay and au in order to
keep the module clean for future use.
- Implement better error messages when the api returns one.
- Render the api key, and url company specific to support using
two different API on two separate companies.

Task id # 2925767

closes odoo/documentation#7276

Related: odoo/enterprise#53685
Related: odoo/upgrade#5494
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
This commit is contained in:
Nicolas Viseur (vin) 2024-01-05 10:24:46 +08:00 committed by Jonathan Castillo (jcs)
parent 080dc64e54
commit 4210a31408
13 changed files with 139 additions and 68 deletions

View File

@ -93,11 +93,12 @@ available on Odoo.
- :doc:`Kenya - Accounting <fiscal_localizations/kenya>`
- Lithuania - Accounting
- :doc:`Luxembourg - Accounting <fiscal_localizations/luxembourg>`
- :doc:`Malaysia - Accounting <fiscal_localizations/malaysia>`
- Maroc - Accounting
- :doc:`Mexico - Accounting <fiscal_localizations/mexico>`
- Mongolia - Accounting
- :doc:`Netherlands - Accounting <fiscal_localizations/netherlands>`
- New Zealand - Accounting
- :doc:`New Zealand - Accounting <fiscal_localizations/new_zealand>`
- Norway - Accounting
- OHADA - Accounting
- Pakistan - Accounting
@ -146,8 +147,10 @@ available on Odoo.
fiscal_localizations/italy
fiscal_localizations/kenya
fiscal_localizations/luxembourg
fiscal_localizations/malaysia
fiscal_localizations/mexico
fiscal_localizations/netherlands
fiscal_localizations/new_zealand
fiscal_localizations/romania
fiscal_localizations/peru
fiscal_localizations/philippines
@ -159,3 +162,4 @@ available on Odoo.
fiscal_localizations/vietnam
fiscal_localizations/united_arab_emirates
fiscal_localizations/united_kingdom
fiscal_localizations/employment_hero

View File

@ -35,9 +35,6 @@ Configuration
- `l10n_account_customer_statements`
- Allows the management and sending of monthly customer statements from the partner ledger and
the contact form. Also used in New Zealand.
* - :guilabel:`Employment Hero Australian Payroll`
- `l10n_au_keypay`
- Synchronises all pay runs from Employment Hero with Odoos journal entries.
.. _australia/coa:
@ -861,70 +858,12 @@ from the batch.
.. _australia/employment-hero:
Employment Hero Australian Payroll
==================================
Employment Hero payroll
=======================
If your business is already up and running with `Employment Hero <https://employmenthero.com/>`_,
you can use our connector as an alternative payroll solution.
The Employment Hero module synchronises payslip accounting entries (e.g., expenses, social charges,
liabilities, taxes) automatically from Employment Hero to Odoo. Payroll administration is still done
in Employment Hero. We only record the **journal entries** in Odoo.
If your business is already up and running with :doc:`Employment Hero <employment_hero>`, you can
use our connector as an alternative payroll solution.
.. important::
KeyPay was rebranded as **Employment Hero** in March 2023.
Configuration
-------------
#. :ref:`Activate <general/install>` the :guilabel:`Employment Hero Australian Payroll` module
(`l10n_au_keypay`).
#. Configure the **Employment Hero API** by going to :menuselection:`Accounting --> Configuration
--> Settings`. More fields become visible after clicking on :guilabel:`Enable Employment Hero
Integration`.
.. image:: australia/employment-hero-integration.png
:alt: Enabling Employment Hero Integration in Odoo Accounting displays new fields in the
settings
- You can find the API Key in the :guilabel:`My Account` section of the Employment Hero platform.
.. image:: australia/employment-hero-myaccount.png
:alt: "Account Details" section on the Employment Hero dashboard
- The **Payroll URL** is pre-filled with `https://keypay.yourpayroll.com.au`.
.. warning::
Do not change the **pre-filled Payroll URL**
- You can find the **Business ID** in the Employment Hero URL. (i.e., `189241`)
.. image:: australia/employment-hero-business-id.png
:alt: The Employment Hero "Business ID" number is in the URL
- You can choose any Odoo journal to post the payslip entries.
How does the API work?
----------------------
The API syncs the journal entries from Employment Hero to Odoo and leaves them in draft mode. The
reference includes the Employment Hero payslip entry ID in brackets for the user to easily retrieve
the same record in Employment Hero and Odoo.
.. image:: australia/employment-hero-journal-entry.png
:alt: Example of a Employment Hero Journal Entry in Odoo Accounting (Australia)
By default, the synchronisation happens once per week. You can fetch the records manually by going
to :menuselection:`Accounting --> Configuration --> Settings` and, in the :guilabel:`Enable
Employment Hero Integration` option, click on :guilabel:`Fetch Payruns Manually`.
Employment Hero payslip entries also work based on double-entry bookkeeping.
The accounts used by Employment Hero are defined in the section :guilabel:`Payroll settings`.
.. image:: australia/employment-hero-chart-of-accounts.png
:alt: Chart of Accounts menu in Employment Hero
For the API to work, you need to create the same accounts as the default accounts of your Employment
Hero business (**same name and same code**) in Odoo. You also need to choose the correct account
types in Odoo to generate accurate financial reports.
To :ref:`configure the Employment Hero API <employment_hero/configuration>` for **Australia**,
use the following value as :guilabel:`Payroll URL`: `https://api.yourpayroll.com.au/`.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,73 @@
=======================
Employment Hero Payroll
=======================
The `Employment Hero <https://employmenthero.com/>`_ module synchronises payslip accounting entries
(e.g., expenses, social charges, liabilities, taxes) automatically from Employment Hero to Odoo.
Payroll administration is still done in Employment Hero. We only record the **journal entries** in
Odoo.
.. important::
KeyPay was rebranded as **Employment Hero** in March 2023.
.. _employment_hero/configuration:
Configuration
-------------
#. :ref:`Activate <general/install>` the :guilabel:`Employment Hero Payroll` module
(`l10n_employment_hero`).
#. Configure the **Employment Hero API** by going to :menuselection:`Accounting --> Configuration
--> Settings`. More fields become visible after clicking on :guilabel:`Enable Employment Hero
Integration`.
.. image:: employment_hero/employment-hero-integration.png
:alt: Enabling Employment Hero Integration in Odoo Accounting displays new fields in the
settings
- You can find the API Key in the :guilabel:`My Account` section of the Employment Hero platform.
.. image:: employment_hero/employment-hero-myaccount.png
:alt: "Account Details" section on the Employment Hero dashboard
- The **Payroll URL** is left empty by default to avoid any confusion. Please fill it according
to the documentation specific to your localization.
.. note::
Employment hero is available for :ref:`Australia <australia/employment-hero>`,
:ref:`Malaysia <malaysia/employment-hero>`,
:ref:`New Zealand <new-zealand/employment-hero>`,
:ref:`Singapore <singapore/employment-hero>`,
and the :ref:`United Kingdom <united-kingdom/employment-hero>`.
- You can find the **Business ID** in the Employment Hero URL. (i.e., `189241`)
.. image:: employment_hero/employment-hero-business-id.png
:alt: The Employment Hero "Business ID" number is in the URL
- You can choose any Odoo journal to post the payslip entries.
How does the API work?
----------------------
The API syncs the journal entries from Employment Hero to Odoo and leaves them in draft mode. The
reference includes the Employment Hero payslip entry ID in brackets for the user to easily retrieve
the same record in Employment Hero and Odoo.
.. image:: employment_hero/employment-hero-journal-entry.png
:alt: Example of a Employment Hero Journal Entry in Odoo Accounting (Australia)
By default, the synchronisation happens once per week. You can fetch the records manually by going
to :menuselection:`Accounting --> Configuration --> Settings` and, in the :guilabel:`Enable
Employment Hero Integration` option, click on :guilabel:`Fetch Payruns Manually`.
Employment Hero payslip entries also work based on double-entry bookkeeping.
The accounts used by Employment Hero are defined in the section :guilabel:`Payroll settings`.
.. image:: employment_hero/employment-hero-chart-of-accounts.png
:alt: Chart of Accounts menu in Employment Hero
For the API to work, you need to create the same accounts as the default accounts of your Employment
Hero business (**same name and same code**) in Odoo. You also need to choose the correct account
types in Odoo to generate accurate financial reports.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -0,0 +1,15 @@
========
Malaysia
========
.. _malaysia/employment-hero:
Employment Hero payroll
=======================
If your business is already up and running with :doc:`Employment Hero <employment_hero>`, you can
use our connector as an alternative payroll solution.
.. important::
To :ref:`configure the Employment Hero API <employment_hero/configuration>` for **Malaysia**, use
the following value as :guilabel:`Payroll URL`: `https://apimy.yourpayroll.io/`.

View File

@ -0,0 +1,15 @@
===========
New Zealand
===========
.. _new-zealand/employment-hero:
Employment Hero payroll
=======================
If your business is already up and running with :doc:`Employment Hero <employment_hero>`, you can
use our connector as an alternative payroll solution.
.. important::
To :ref:`configure the Employment Hero API <employment_hero/configuration>` for **New Zealand**,
use the following value as :guilabel:`Payroll URL`: `https://api.nzpayroll.co.nz/`.

View File

@ -52,3 +52,16 @@ QR-code` option to *EMV Merchant-Presented QR-code*.
Ensure that the :guilabel:`Recipient Bank` is the one you configured, as Odoo uses this field to
generate the PayNow QR code.
.. _singapore/employment-hero:
Employment Hero payroll
=======================
If your business is already up and running with :doc:`Employment Hero <employment_hero>`, you can
use our connector as an alternative payroll solution.
.. important::
To :ref:`configure the Employment Hero API <employment_hero/configuration>` for **Singapore**,
use the following value as :guilabel:`Payroll URL`: `https://apisg.yourpayroll.io/`.

View File

@ -118,3 +118,15 @@ each submission:
.. note::
During this process, the :guilabel:`Connect to HMRC` button no longer appears for other UK-based
companies.
.. _united-kingdom/employment-hero:
Employment Hero payroll
=======================
If your business is already up and running with :doc:`Employment Hero <employment_hero>`, you can
use our connector as an alternative payroll solution.
.. important::
To :ref:`configure the Employment Hero API <employment_hero/configuration>` for **United
Kingdom**, use the following value as :guilabel:`Payroll URL`: `https://api.yourpayroll.co.uk/`.