diff --git a/README.md b/README.md index 475698f..1cebd39 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,4 @@ -[![Runbot Status](https://runbot.odoo-community.org/runbot/badge/flat/125/14.0.svg)](https://runbot.odoo-community.org/runbot/repo/github-com-oca-l10n-switzerland-125) -[![Build Status](https://travis-ci.com/OCA/l10n-switzerland.svg?branch=14.0)](https://travis-ci.com/OCA/l10n-switzerland) -[![codecov](https://codecov.io/gh/OCA/l10n-switzerland/branch/14.0/graph/badge.svg)](https://codecov.io/gh/OCA/l10n-switzerland) -[![Translation Status](https://translation.odoo-community.org/widgets/l10n-switzerland-14-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/l10n-switzerland-14-0/?utm_source=widget) - - +# Flectra Community / l10n-switzerland-flectra # l10n-switzerland @@ -17,11 +12,24 @@ This is the maitained repo of l10n_ch extension by the flectra community. If you Available addons ---------------- -addon | version | summary ---- | --- | --- -[l10n_ch_base_bank](l10n_ch_base_bank/) | 2.0.1.0.0 | Types and number validation for swiss electronic pmnt. DTA, ESR -[l10n_ch_account_tags](l10n_ch_account_tags/) | 2.0.1.0.0 | Localisation -[l10n_ch_invoice_reports](l10n_ch_invoice_reports/) | 2.0.1.0.0 | Extend invoice to add ISR/QR payment slip +| addon | version | summary | +|--------------------------------------------------------------------|-----------|-----------------------------------------------------------------| +| [ebill_paynet](ebill_paynet) | 2.0.1.0.0 | Exchange with SIXT Paynet infrastructure | +| [ebill_paynet_customer_free_ref](ebill_paynet_customer_free_ref) | 2.0.1.0.0 | eBill Paynet Customer Free Reference | +| [l10n_ch_account_payment_partner](l10n_ch_account_payment_partner) | 2.0.1.0.0 | Set bank on customer invoices | +| [l10n_ch_account_tags](l10n_ch_account_tags) | 2.0.1.0.0 | Switzerland Account Tags | +| [l10n_ch_base_bank](l10n_ch_base_bank) | 2.0.1.0.0 | Types and number validation for swiss electronic pmnt. DTA, ESR | +| [l10n_ch_hr_payroll](l10n_ch_hr_payroll) | 2.0.1.0.0 | Switzerland Payroll Rules | +| [l10n_ch_hr_payroll_report](l10n_ch_hr_payroll_report) | 2.0.1.0.0 | Switzerland Payroll Report | +| [l10n_ch_invoice_reports](l10n_ch_invoice_reports) | 2.0.1.0.0 | Extend invoice to add ISR/QR payment slip | +| [l10n_ch_isr_payment_grouping](l10n_ch_isr_payment_grouping) | 2.0.1.0.0 | Switzerland - ISR payment grouping | +| [l10n_ch_isrb](l10n_ch_isrb) | 2.0.1.0.0 | Switzerland - ISR-B | +| [l10n_ch_pain_base](l10n_ch_pain_base) | 2.0.1.0.0 | Switzerland - ISO 20022 base module | +| [l10n_ch_pain_credit_transfer](l10n_ch_pain_credit_transfer) | 2.0.1.0.0 | Switzerland - ISO 20022 credit transfer | +| [l10n_ch_report_optional](l10n_ch_report_optional) | 2.0.1.0.0 | Settings to add QR or ISR optional to report | +| [l10n_ch_states](l10n_ch_states) | 2.0.1.0.0 | Switzerland Country States | +| [l10n_ch_zip](l10n_ch_zip) | 2.0.1.0.0 | Swiss postal code (ZIP) list | +| [server_env_ebill_paynet](server_env_ebill_paynet) | 2.0.1.0.0 | Server environment for Ebill Paynet | [//]: # (end addons) @@ -31,12 +39,11 @@ addon | version | summary This repository is licensed under [AGPL-3.0](LICENSE). -However, each module can have a totally different license, as long as they adhere to OCA -policy. Consult each module's `__manifest__.py` file, which contains a `license` key -that explains its license. +However, each module can have a totally different license, as long as they adhere to FC +policy. Consult each module's `__manifest__.py` file, which contains a `license` key file that explains its license. ---- -OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit -organization whose mission is to support the collaborative development of Odoo features +FC, or the [Flectra Community](http://flectra-community.org/), is a nonprofit +organization whose mission is to support the collaborative development of Flectra features and promote its widespread use. diff --git a/ebill_paynet/README.rst b/ebill_paynet/README.rst index 0e5b378..98bb30b 100644 --- a/ebill_paynet/README.rst +++ b/ebill_paynet/README.rst @@ -7,7 +7,23 @@ eBill Paynet !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github + :target: https://github.com/OCA/l10n-switzerland/tree/14.0/ebill_paynet + :alt: OCA/l10n-switzerland +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/l10n-switzerland-14-0/l10n-switzerland-14-0-ebill_paynet + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/125/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| This module implements the exchange of electronic invoices with the SIXT Paynet infrastructure used in Switzerland. @@ -86,14 +102,14 @@ Authors * Camptocamp SA Contributors - ------------ +~~~~~~~~~~~~ - * Jamotion +* Jamotion * Thierry Ducrest * `Trobz `_: - * Dung Tran +* Dung Tran Other credits ~~~~~~~~~~~~~ -The migration of this module from 13.0 to 14.0 as financially supported by Camptocamp \ No newline at end of file +The migration of this module from 13.0 to 14.0 as financially supported by Camptocamp diff --git a/ebill_paynet/__manifest__.py b/ebill_paynet/__manifest__.py index 37ad3f9..c79513f 100644 --- a/ebill_paynet/__manifest__.py +++ b/ebill_paynet/__manifest__.py @@ -5,10 +5,10 @@ "name": "eBill Paynet", "summary": """ Paynet platform bridge implementation""", - "version": "2.0.1.0.0", + "version": "2.0.1.0.1", "license": "AGPL-3", - "author": "Camptocamp SA,Odoo Community Association (OCA), 2BIT GmbH", - "website": "https://gitlab.com/flectra-community/flectra", + "author": "Camptocamp SA,Odoo Community Association (OCA)", + "website": "https://gitlab.com/flectra-community/l10n-switzerland-flectra", "depends": [ "account", "account_invoice_export", diff --git a/ebill_paynet/messages/invoice-2003A.xml b/ebill_paynet/messages/invoice-2003A.xml index 1db7285..592bdda 100644 --- a/ebill_paynet/messages/invoice-2003A.xml +++ b/ebill_paynet/messages/invoice-2003A.xml @@ -44,11 +44,11 @@ {%- endif %} {% endfor %} - {% for picking in invoice_lines.sale_line_ids.move_ids.mapped('picking_id') %} - {%- if picking.carrier_tracking_ref and picking.state != 'cancel' %} + {% for picking in invoice_lines.sale_line_ids.move_ids.mapped('picking_id')[:9] %} + {%- if picking.state != 'cancel' %} - {{ picking.carrier_tracking_ref|truncate(35, True, "") }} + {{ picking.name }} {%- if picking.date_done %} {{ format_date(picking.date_done) }} {%- endif %} diff --git a/ebill_paynet/tests/common.py b/ebill_paynet/tests/common.py index 04cfa32..6f21b25 100644 --- a/ebill_paynet/tests/common.py +++ b/ebill_paynet/tests/common.py @@ -163,7 +163,7 @@ class CommonCase(SavepointCase, XmlTestMixin): cls.sale.date_order = "2019-06-01" # Set a delivery tracking number cls.pickings = cls.sale.order_line.move_ids.mapped("picking_id") - cls.pickings[0].carrier_tracking_ref = "track_me_if_you_can" + cls.pickings[0].name = "Picking Name" # Generate the invoice from the sale order cls.invoice = cls.sale._create_invoices() # And add some more lines on the invoice diff --git a/ebill_paynet/tests/examples/invoice_isr_b2b.xml b/ebill_paynet/tests/examples/invoice_isr_b2b.xml index 5602dd9..2288fdd 100644 --- a/ebill_paynet/tests/examples/invoice_isr_b2b.xml +++ b/ebill_paynet/tests/examples/invoice_isr_b2b.xml @@ -42,7 +42,7 @@ - track_me_if_you_can + Picking Name diff --git a/ebill_paynet/tests/examples/invoice_qr_b2b.xml b/ebill_paynet/tests/examples/invoice_qr_b2b.xml index ab23336..603676a 100644 --- a/ebill_paynet/tests/examples/invoice_qr_b2b.xml +++ b/ebill_paynet/tests/examples/invoice_qr_b2b.xml @@ -42,7 +42,7 @@ - track_me_if_you_can + Picking Name diff --git a/ebill_paynet_customer_free_ref/tests/examples/invoice_b2b.xml b/ebill_paynet_customer_free_ref/tests/examples/invoice_b2b.xml index 1ad8780..385a087 100644 --- a/ebill_paynet_customer_free_ref/tests/examples/invoice_b2b.xml +++ b/ebill_paynet_customer_free_ref/tests/examples/invoice_b2b.xml @@ -42,7 +42,7 @@ - track_me_if_you_can + Picking Name diff --git a/l10n_ch_account_payment_partner/__init__.py b/l10n_ch_account_payment_partner/__init__.py new file mode 100644 index 0000000..83e553a --- /dev/null +++ b/l10n_ch_account_payment_partner/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/l10n_ch_account_payment_partner/__manifest__.py b/l10n_ch_account_payment_partner/__manifest__.py new file mode 100644 index 0000000..0cfd77a --- /dev/null +++ b/l10n_ch_account_payment_partner/__manifest__.py @@ -0,0 +1,14 @@ +{ + "name": "Account Payment Partner for Switzerland", + "version": "2.0.1.0.0", + "category": "Banking addons", + "license": "AGPL-3", + "summary": "Set partner bank on outgoing invoices", + "author": "Jamotion GmbH", + "website": "https://jamotion.ch", + "depends": ["account_payment_partner", "l10n_ch"], + "data": [], + "demo": [], + "installable": True, + "auto_install": True, +} diff --git a/l10n_ch_account_payment_partner/models/__init__.py b/l10n_ch_account_payment_partner/models/__init__.py new file mode 100644 index 0000000..9c0a421 --- /dev/null +++ b/l10n_ch_account_payment_partner/models/__init__.py @@ -0,0 +1 @@ +from . import account_move diff --git a/l10n_ch_account_payment_partner/models/account_move.py b/l10n_ch_account_payment_partner/models/account_move.py new file mode 100644 index 0000000..2d03fad --- /dev/null +++ b/l10n_ch_account_payment_partner/models/account_move.py @@ -0,0 +1,39 @@ +# Copyright 2014-16 Akretion - Alexis de Lattre +# Copyright 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# Copyright 2021 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from flectra import api, fields, models + + +class AccountMove(models.Model): + _inherit = "account.move" + + @api.depends("partner_id", "payment_mode_id") + def _compute_partner_bank(self): + for move in self: + # No bank account assignation is done for out_invoice as this is only + # needed for printing purposes and it can conflict with + # SEPA direct debit payments. Current report prints it. + def get_bank_id(): + return move.commercial_partner_id.bank_ids.filtered( + lambda b: b.company_id == move.company_id or not b.company_id + )[:1] + + bank_id = False + if move.partner_id: + pay_mode = move.payment_mode_id + if move.move_type == "in_invoice": + if ( + pay_mode + and pay_mode.payment_type == "outbound" + and pay_mode.payment_method_id.bank_account_required + and move.commercial_partner_id.bank_ids + ): + bank_id = get_bank_id() + elif move.move_type == 'out_invoice': + if pay_mode.bank_account_link == 'fixed': + bank_id = pay_mode.fixed_journal_id.bank_account_id + + if bank_id: + move.partner_bank_id = bank_id diff --git a/l10n_ch_account_payment_partner/static/description/icon.png b/l10n_ch_account_payment_partner/static/description/icon.png new file mode 100644 index 0000000..98cf47e Binary files /dev/null and b/l10n_ch_account_payment_partner/static/description/icon.png differ diff --git a/l10n_ch_account_payment_partner/static/description/index.html b/l10n_ch_account_payment_partner/static/description/index.html new file mode 100644 index 0000000..612042b --- /dev/null +++ b/l10n_ch_account_payment_partner/static/description/index.html @@ -0,0 +1,94 @@ +
+
+
+
+ +

Set bank on customer invoices

+

Set bank of payment mode or default bank

+
+
+
+ +
+
+

Quick Start

+
+

Installation

+
+

+ There are no dependencies so you can simply install the module. +

+
+
+
+

Configuration

+
+

+ Nothing to configure. Just use it... +

+
+
+
+

Usage

+
+

+ Create a customer invoice, select partner and the bank will be set automatically. +

+
+
+ +
+
+ +
+
+

Need more?

+

Other available modules

+
+
+
+

Module 1

+

+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt + ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo + dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor + sit amet. Lorem ipsum dolor sit amet.

+
+
+

Module 2

+

+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt + ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo + dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor + sit amet. Lorem ipsum dolor sit amet.

+
+
+

Module 3

+

Some words about the module

+
+
+
+
\ No newline at end of file diff --git a/l10n_ch_account_payment_partner/static/description/module-banner-example.png b/l10n_ch_account_payment_partner/static/description/module-banner-example.png new file mode 100644 index 0000000..977ff09 Binary files /dev/null and b/l10n_ch_account_payment_partner/static/description/module-banner-example.png differ diff --git a/l10n_ch_account_payment_partner/static/description/pricelist_partner.png b/l10n_ch_account_payment_partner/static/description/pricelist_partner.png new file mode 100644 index 0000000..d03eb93 Binary files /dev/null and b/l10n_ch_account_payment_partner/static/description/pricelist_partner.png differ diff --git a/l10n_ch_base_bank/models/invoice.py b/l10n_ch_base_bank/models/invoice.py index 005efaa..55bd4ba 100644 --- a/l10n_ch_base_bank/models/invoice.py +++ b/l10n_ch_base_bank/models/invoice.py @@ -86,7 +86,7 @@ class AccountMove(models.Model): ) ) if ( - bank_acc.acc_type != "qr-iban" + bank_acc.acc_type not in ["qr-iban", 'iban'] and ( move.currency_id.name == "CHF" and not bank_acc.l10n_ch_isr_subscription_chf diff --git a/l10n_ch_hr_payroll/COPYRIGHT b/l10n_ch_hr_payroll/COPYRIGHT new file mode 100644 index 0000000..6efddb2 --- /dev/null +++ b/l10n_ch_hr_payroll/COPYRIGHT @@ -0,0 +1,15 @@ +Most of the files are + + Copyright 2017 Open Net Srl + Copyright 2017 Open Net Sàrl + Copyright 2018 Flectra Community + +Many files also contain contributions from third +parties. In this case the original copyright of +the contributions can be traced through the +history of the source version control system. + +When that is not the case, the files contain a prominent +notice stating the original copyright and applicable +license, or come with their own dedicated COPYRIGHT +and/or LICENSE file. \ No newline at end of file diff --git a/l10n_ch_hr_payroll/LICENSE b/l10n_ch_hr_payroll/LICENSE new file mode 100644 index 0000000..3939cd9 --- /dev/null +++ b/l10n_ch_hr_payroll/LICENSE @@ -0,0 +1,663 @@ +For copyright information, please see the COPYRIGHT file. + +GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. \ No newline at end of file diff --git a/l10n_ch_hr_payroll/README.rst b/l10n_ch_hr_payroll/README.rst new file mode 100644 index 0000000..7c78717 --- /dev/null +++ b/l10n_ch_hr_payroll/README.rst @@ -0,0 +1,76 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Switzerland Payroll Rules + +This module allows you to manage the salaries of your employees + +** Features list :** + * Add Swiss salary rule categories + * Add Swiss salary rules + * Add children in school to employee + * Add LPP range to contract + * Add LPP Amount to contract. + * Add Holiday Rate to contract. + +** For further information:** + * Payroll accounting: http://open-net.ch/blog/la-comptabilite-salariale-suisse-avec-odoo-1/tag/salaires-6 + +** Remarks: ** + * To prevent overwriting your salary rules changes, an update from 1.0.8 and lower to 1.0.9 and higher creates duplicates of the salary rules. This is because with some migrated databases, one may encounter a difficulty with the existing rules (they can not be erased if they are already used). The solution is then to force the existing ones to be non-updatable. And this is done using an included pre-migration script. + * As this module proposes its own report (same as the original, but with its own footer), don't forget to make it non-updatable. + * If you choose to uninstall this module, you have to manually delete the rules. + +Known issues / Roadmap + +V1.0.0: 2014-11-07/Sge + * Add Salary rule categories. + * Add Salary rules. + * Add Employee children in school. + * Add Contract LPP rate. + +V1.0.1: 2014-11-11/Sge + * Set the 'LPP rate'' digits to 'Payroll Rate' decimal accuracy. + +V1.0.2: + * Add some minor changes, based on pull request #66 comments. + +V1.0.3-4: + * Add LPP Amount to contract. + * Add Worked Hours Rate to contract. + * Add Hourly Rate to contract. + * Compute the Wage of contract, based on Worked Hours and Hourly Rate. + * Add new salay rules + +V1.0.5: + * Add Holiday Rate to contract. + * Update "Indemnité vacances 8,33%" rule to include + "Holiday Rate" from contract. + +V1.0.6: + * Move salary rules from CSV file to XML file. + * Import salary rules only at install. + * Internal reorganization of files (.py and .xml). + +V1.0.7: + * Added: two new dependencies (hr_contract and hr_attendance) + +V1.0.8: + * Updated: the "Appears on slip" settings + * Integrated: report for the payslip, with its own footer + * Added: a pre-migration script + * pre-migration script correctly set + +V1.1: + * New: commissions and reimbursements management in pay slips and contracts + +V1.2: + * Journal entries generated by the confirmation of a payslip now inherits correctly of the partner's name +V1.3: + * Move commission and reimbursement management to hr_payroll_commission and hr_payroll_expense modules + +Contributors + +* Jamotion +* Sebastien Gendre +* Yvon-Philippe Crittin \ No newline at end of file diff --git a/l10n_ch_hr_payroll/__init__.py b/l10n_ch_hr_payroll/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/l10n_ch_hr_payroll/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/l10n_ch_hr_payroll/__manifest__.py b/l10n_ch_hr_payroll/__manifest__.py new file mode 100644 index 0000000..8060c15 --- /dev/null +++ b/l10n_ch_hr_payroll/__manifest__.py @@ -0,0 +1,33 @@ + +{ + 'name': 'Switzerland - Payroll Flectra', + 'summary': 'Switzerland Payroll Rules for Flectra 2.0', + 'category': 'Localization', + 'author': "Open Net Sàrl,Odoo Community Association (OCA), Jamotion GmbH", + 'depends': [ + 'hr_payroll', + 'hr_payroll_account', + 'hr_contract', + 'hr_attendance' + ], + 'version': '2.0.0.0.0', + 'auto_install': False, + 'demo': [], + 'website': '', + 'license': 'AGPL-3', + 'data': [ + 'security/ir.model.access.csv', + 'data/decimal.precision.xml', + 'data/hr.salary.rule.category.xml', + 'data/hr.salary.rule.xml', + 'views/hr_salary_rule_view.xml', + 'views/hr_employee_view.xml', + 'views/hr_contract_view.xml', + 'views/hr_payroll_view.xml', + 'views/hr_payroll_config_view.xml', + 'views/hr_payslip_view.xml', + 'views/hr_payslip_line_view.xml', + 'views/lpp_contract_view.xml' + ], + 'installable': True +} diff --git a/l10n_ch_hr_payroll/data/decimal.precision.xml b/l10n_ch_hr_payroll/data/decimal.precision.xml new file mode 100644 index 0000000..e795dcd --- /dev/null +++ b/l10n_ch_hr_payroll/data/decimal.precision.xml @@ -0,0 +1,19 @@ + + + + + Payroll + 2 + + + + Payrollrate + 4 + + + + Account + 2 + + + diff --git a/l10n_ch_hr_payroll/data/hr.salary.rule.category.xml b/l10n_ch_hr_payroll/data/hr.salary.rule.category.xml new file mode 100644 index 0000000..f50f0ff --- /dev/null +++ b/l10n_ch_hr_payroll/data/hr.salary.rule.category.xml @@ -0,0 +1,83 @@ + + + + + Employees + + + + + Basic + BASIC + + + + Allowance + ALW + + + + Gross + GROSS + + + + Deduction + DED + + + + Net + NET + + + + Company Contribution + COMP + + + + House Rent Allowance + HRA + + + + Dearness Allowance + DA + + + + Travel Allowance + Travel + + + + Meal Allowance + Meal + + + + Medical Allowance + Medical + + + + Other Allowance + Other + + + + Free allowance + FALW + + + Full Company Contribution + COSTS + + + + Information + INFO + + + diff --git a/l10n_ch_hr_payroll/data/hr.salary.rule.xml b/l10n_ch_hr_payroll/data/hr.salary.rule.xml new file mode 100644 index 0000000..7adbaec --- /dev/null +++ b/l10n_ch_hr_payroll/data/hr.salary.rule.xml @@ -0,0 +1,638 @@ + + + + + + + + + + Basic Salary + + BASIC + + none + none + code + result = contract.wage + + + + Gross + + GROSS + + none + code + result = categories.BASIC + categories.ALW + categories.HRA + categories.Travel + + + + Net Salary + + NET + + none + code + result = categories.BASIC + categories.ALW + categories.HRA + categories.Travel + categories.GROSS + categories.Medical + categories.DED + + + + + House Rent Allowance + + HRA + + none + + + percentage + contract.wage + 30 + + + + Dearness Allowance + + DA + + none + code + result = contract.da + + + + Travel Allowance + + Travel + + none + fix + 3000 + + + + + + Meal Allowance + + Meal + + none + code + result = contract.meal_allowance + + + + Medical Allowance + + Medical + + none + code + result = contract.medical_allowance + + + + + + + + + + + + + + + + Employee Contribution + + EC + + none + + + fix + -300 + + + + + Other Allowance + + Other + + none + code + result = contract.other_allowance + + + + + + + fix + False + 5020 + none + UI + 1 + 120 + + + + + + fix + False + 5020 + none + UI + 1 + 120 + + + + code + False + 5020_C + none + 999999 + UI Company + +per_in_limit = employee.company_id.ac_per_in_limit / 100 +result = ((categories.BASIC + categories.ALW)*per_in_limit) + + min(categories.BASIC + categories.ALW, employee.company_id.ac_limit) + 1 + categories.BASIC + categories.ALW + 121 + + + + + code + True + 5020_E + none + 999999 + UI Employee + +per_in_limit = employee.company_id.ac_per_in_limit / 100 +result = ((categories.BASIC + categories.ALW)*per_in_limit) + + min(categories.BASIC + categories.ALW, employee.company_id.ac_limit) + 1 + categories.BASIC + categories.ALW + 121 + + + + + fix + False + 5030 + +result = (categories.BASIC + categories.ALW) > employee.company_id.ac_limit and (categories.BASIC + categories.ALW) - employee.company_id.ac_limit > 0 + + UI SOL + 1 + 122 + + + + code + False + 5030_C + 999999 + python + +result = (categories.BASIC + categories.ALW) > employee.company_id.ac_limit and (categories.BASIC + categories.ALW) - employee.company_id.ac_limit > 0 + + UI Company's Solidarity + +limit = employee.company_id.ac_limit +per_off_limit = employee.company_id.ac_per_off_limit / 100 +result = (((categories.BASIC + categories.ALW) - limit)*per_off_limit) + + (categories.BASIC + categories.ALW) - employee.company_id.ac_limit + 1 + categories.BASIC + categories.ALW + 123 + + + + + code + True + 5030_E + 999999 + python + +result = (categories.BASIC + categories.ALW) > employee.company_id.ac_limit and (categories.BASIC + categories.ALW) - employee.company_id.ac_limit > 0 + + UI Employee's Solidarity + +limit = employee.company_id.ac_limit +per_off_limit = employee.company_id.ac_per_off_limit / 100 +result = (((categories.BASIC + categories.ALW) - limit)*per_off_limit) + + (categories.BASIC + categories.ALW) - employee.company_id.ac_limit + 1 + categories.BASIC + categories.ALW + 123 + + + + + code + True + 3030 + python + result = contract.employee_id.children + contract.employee_id.children_student > 0 + Family Allowances + +result = 0 +result += contract.employee_id.children * employee.company_id.fa_amount_child +result += contract.employee_id.children_student * employee.company_id.fa_amount_student +min_number_childs = employee.company_id.fa_min_number_childs - 1 +if contract.employee_id.children + contract.employee_id.children_student > min_number_childs: + child_supp = contract.employee_id.children + contract.employee_id.children_student - min_number_childs + result += child_supp * employee.company_id.fa_amount_additional + + 1 + categories.BASIC + categories.ALW + 50 + + + + fix + False + 5010 + none + 999999 + OAI/II/IC + Old Age Insurance, Invalidity Insurance, Income Compensation + 1 + 110 + + + + code + False + 5010_C + none + 999999 + OAI/II/IC Company + +per = employee.company_id.avs_per +result = (per*(categories.BASIC + categories.ALW))/100 + + categories.BASIC + categories.ALW + 1 + 111 + + + + + code + True + 5010_E + none + 999999 + OAI/II/IC Employee + +per = employee.company_id.avs_per +result = (per*(categories.BASIC + categories.ALW))/100 + + categories.BASIC + categories.ALW + 1 + 111 + + + + + code + False + 6030 + none + 999999 + Administrative Fees + Administrative Fees to the OAI + +per = employee.company_id.fadmin_per +result = (per*(categories.BASIC + categories.ALW))/100 + + categories.BASIC + categories.ALW + 1 + 210 + + + + code + True + 5060 + python + result = contract.imp_src > 0 + 999999 + Source Tax + +per = contract.imp_src +result = -(per*(categories.BASIC + categories.ALW + categories.FALW))/100 + + categories.BASIC + categories.ALW + categories.FALW + 1 + 160 + + + + fix + False + 5041 + none + 999999 + AI + 1 + 140 + + + + code + False + 5041_C + none + 999999 + AI Company + +per = employee.company_id.laa_per +result = (per*(categories.BASIC + categories.ALW))/100 + + categories.BASIC + categories.ALW + 1 + 141 + + + + + code + True + 5041_E + none + 999999 + AI Employee + +per = employee.company_id.laa_per +result = (per*(categories.BASIC + categories.ALW))/100 + + categories.BASIC + categories.ALW + 1 + 141 + + + + + fix + False + 5042 + none + 999999 + SDA + Sickness Daily Allowance + 1 + 150 + + + + code + False + 5042_C + none + 999999 + SDA Company + +per = employee.company_id.lca_per +result = (per*(categories.BASIC + categories.ALW))/100 + + categories.BASIC + categories.ALW + 1 + 151 + + + + + code + True + 5042_E + none + 999999 + SDA Employee + +per = employee.company_id.lca_per +result = (per*(categories.BASIC + categories.ALW))/100 + + categories.BASIC + categories.ALW + 1 + 151 + + + + + fix + False + 5050 + none + 999999 + OBP + + 1 + categories.BASIC + categories.ALW + 130 + + + + code + False + 5050_C + python + result = (contract.lpp_rate or contract.lpp_amount) > 0 + OBP Company + +minimum_legal = employee.company_id.lpp_min +maximum_range = employee.company_id.lpp_max +amount = contract.wage_fulltime * 12 +if contract.lpp_rate != 0: + if contract.lpp_contract_id: + amount = amount - contract.lpp_contract_id.dc_amount + amount = amount / 12 + amount = amount * (contract.occupation_rate / 100) + amount = amount * (payslip.working_rate / 100) + if amount > maximum_range: + result = -(maximum_range)*((contract.lpp_rate)/100) + elif amount < minimum_legal and not contract.lpp_contract_id: + result = -(minimum_legal)*((contract.lpp_rate)/100) + else: + result = -(amount)*((contract.lpp_rate)/100) +else: + result = -contract.lpp_amount + + +-contract.lpp_amount or ((((contract.wage_fulltime*12) - (contract.lpp_contract_id.dc_amount or 0))/12)*(contract.occupation_rate/100)*(payslip.working_rate/100)) + + 1 + 132 + + + + + code + True + 5050_E + python + result = (contract.lpp_rate or contract.lpp_amount) > 0 + OBP Employee + +minimum_legal = employee.company_id.lpp_min +maximum_range = employee.company_id.lpp_max +amount = contract.wage_fulltime * 12 +if contract.lpp_rate != 0: + if contract.lpp_contract_id: + amount = amount - contract.lpp_contract_id.dc_amount + amount = amount / 12 + amount = amount * (contract.occupation_rate / 100) + amount = amount * (payslip.working_rate / 100) + if amount > maximum_range: + result = -(maximum_range)*((contract.lpp_rate)/100) + elif amount < minimum_legal and not contract.lpp_contract_id: + result = -(minimum_legal)*((contract.lpp_rate)/100) + else: + result = -(amount)*((contract.lpp_rate)/100) +else: + result = -contract.lpp_amount + + +-contract.lpp_amount or ((((contract.wage_fulltime*12) - (contract.lpp_contract_id.dc_amount or 0))/12)*(contract.occupation_rate/100)*(payslip.working_rate/100)) + + 1 + 131 + + + + + fix + False + 5063_VD + none + 999999 + AS Families (VD) + 1 + 165 + + + + code + False + 5063_VD_C + none + 999999 + AS Families (VD) Company + +per = employee.company_id.pc_f_vd_per +result = (per*(categories.BASIC + categories.ALW))/100 + + categories.BASIC + categories.ALW + 1 + 166 + + + + + code + True + 5063_VD_E + none + 999999 + AS Families (VD) Employee + +per = employee.company_id.pc_f_vd_per +result = (per*(categories.BASIC + categories.ALW))/100 + + categories.BASIC + categories.ALW + 1 + 166 + + + + + True + 1000 + none + 999999 + Basic CH + + code + +if payslip.wage_type == 'hour': + result = contract.wage*payslip.worked_hours +else: + result = contract.wage*payslip.working_rate/100 + + + + + code + True + 5000 + none + 999999 + Gross CH + result = categories.BASIC + categories.ALW + categories.FALW + 1 + 100 + + + + code + True + 6500 + none + 999999 + Net CH + result = categories.BASIC + categories.ALW + categories.DED + categories.FALW + 1 + 200 + + + + code + True + TOTAL_DED + none + 999999 + Total Deduction + result = categories.DED + 1 + 195 + + + + + + + + BASE + Base for new structures + + + + + + REGULAR + Regular Pay + + + + + \ No newline at end of file diff --git a/l10n_ch_hr_payroll/i18n/de.po b/l10n_ch_hr_payroll/i18n/de.po new file mode 100644 index 0000000..d71b1fa --- /dev/null +++ b/l10n_ch_hr_payroll/i18n/de.po @@ -0,0 +1,710 @@ +# Translation of Flectra Server. +# This file contains the translation of the following modules: +# * l10n_ch_hr_payroll +# +msgid "" +msgstr "" +"Project-Id-Version: Flectra Server 2.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-18 13:52+0000\n" +"PO-Revision-Date: 2022-01-18 15:17+0100\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"Language: de\n" +"X-Generator: Poedit 3.0\n" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LAA +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "AI" +msgstr "UVG" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LAA_C +msgid "AI Company" +msgstr "UVG Arbeitgeber" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LAA_E +msgid "AI Employee" +msgstr "UVG Angestellter" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.PC_F_VD +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "AS Families (VD)" +msgstr "SVA Kantonal Familien (VD)" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.PC_F_VD_C +msgid "AS Families (VD) Company" +msgstr "SVA Kantonal Firma" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.PC_F_VD_E +msgid "AS Families (VD) Employee" +msgstr "SVA Kantonal Mitarbeiter" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Accounting" +msgstr "Buchhaltung" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fa_amount_additional +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fa_amount_additional +msgid "Additional allowance amount" +msgstr "Zusätzlicher Freibetrag" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fa_min_number_childs +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fa_min_number_childs +msgid "Additional allowance for the" +msgstr "Zusätzliche Zulage für die" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.FADMIN +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Administrative Fees" +msgstr "Verwaltungsgebühren" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,note:l10n_ch_hr_payroll.FADMIN +msgid "Administrative Fees to the OAI" +msgstr "Verwaltungsgebühren an die SVA" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.ALW +msgid "Allowance" +msgstr "Beihilfe" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__python_amount +msgid "Amount - Python" +msgstr "Betrag" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__amount_base +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__amount_base +msgid "Amount Base" +msgstr "Betrag Basis" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fa_amount_child +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fa_amount_child +msgid "Amount per child (0-16)" +msgstr "Betrag pro Kind (0-16)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fa_amount_student +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fa_amount_student +msgid "Amount per student (16+)" +msgstr "Betrag pro Schüler (16+)" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.BASIC +msgid "Basic" +msgstr "Basis" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.BASIC_CH +msgid "Basic CH" +msgstr "Basis CH" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_basic +msgid "Basic Salary" +msgstr "Grundgehalt" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Cancel" +msgstr "Abbrechen" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Cantonal rules" +msgstr "Kantonale Regeln" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_res_company +msgid "Companies" +msgstr "Unternehmen" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__company_id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__company_id +msgid "Company" +msgstr "Firma" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.COMP +msgid "Company Contribution" +msgstr "Unternehmensbeitrag" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__contract_id +msgid "Contract id's" +msgstr "Vertrags-IDs" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__name +msgid "Contract name" +msgstr "Vertragsname" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__cc +msgid "Counterparty account" +msgstr "Gegenkonto" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__create_uid +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__create_uid +msgid "Created by" +msgstr "Erstellt von" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__create_date +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__create_date +msgid "Created on" +msgstr "Erstellt am" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_da +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.DA +msgid "Dearness Allowance" +msgstr "Teuerungszulage" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__laa_c +msgid "Debts AI" +msgstr "Schulden AI" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.DED +msgid "Deduction" +msgstr "Abzug" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__dc_amount +msgid "Deduction Amount" +msgstr "Abzugsbetrag" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__display_name +msgid "Display Name" +msgstr "Anzeigename" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_employee +msgid "Employee" +msgstr "Mitarbeiter" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_contract +msgid "Employee Contract" +msgstr "Arbeitnehmervertrag" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_ec +msgid "Employee Contribution" +msgstr "Arbeitnehmerbeitrag" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.ALFA +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Family Allowances" +msgstr "Familienzulagen" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.FALW +msgid "Free allowance" +msgstr "Kostenlose Zulage" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.COSTS +msgid "Full Company Contribution" +msgstr "Vollständiger Unternehmensbeitrag" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__wage_fulltime +msgid "Full-time Wage" +msgstr "Vollzeitlohn" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "General" +msgstr "Allgemein" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_taxable +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.GROSS +msgid "Gross" +msgstr "Brutto" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.GROSS_CH +msgid "Gross CH" +msgstr "Brutto CH" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__basic +msgid "Gross Salary" +msgstr "Bruttogehalt" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_payroll_config +msgid "HR Payroll Config" +msgstr "Lohnbuchhaltung Einstellungen" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll.selection__hr_contract__wage_type__hour +msgid "Hourly" +msgstr "Stündlich" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_hra +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.HRA +msgid "House Rent Allowance" +msgstr "Zuschuss zur Hausmiete" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__id +msgid "ID" +msgstr "ID" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.INFO +msgid "Information" +msgstr "Information" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_d +msgid "Institutions of Providence (OBP)" +msgstr "Institutionen der Vorsehung (OBP)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_lpp_contract +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "LPP Contract" +msgstr "BVG-Vertrag" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company____last_update +msgid "Last Modified on" +msgstr "Zuletzt geändert am" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__write_uid +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__write_uid +msgid "Last Updated by" +msgstr "Zuletzt aktualisiert von" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__write_date +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__write_date +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_max +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__lpp_max +msgid "Maximum legal" +msgstr "Maximal legal" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__ac_limit +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__ac_limit +msgid "Maximum limit" +msgstr "Höchstgrenze" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_meal +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.Meal +msgid "Meal Allowance" +msgstr "Verpflegungszuschuss" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_medical +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.Medical +msgid "Medical Allowance" +msgstr "Medizinische Zulage" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_min +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__lpp_min +msgid "Minimum legal" +msgstr "Mindestens legal" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll.selection__hr_contract__wage_type__month +msgid "Monthly" +msgstr "Monatlich" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category__name +msgid "Name" +msgstr "Name" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.NET +msgid "Net" +msgstr "Netto" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.NET_CH +msgid "Net CH" +msgstr "Netto CH" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_net +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__net +msgid "Net Salary" +msgstr "Nettogehalt" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__note +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__note +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category__note +msgid "Note" +msgstr "Notiz" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee__children +msgid "Number of Children at school" +msgstr "Anzahl der Kinder in der Schule" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee__children_student +msgid "Number of Children student" +msgstr "Anzahl Kinder Schüler" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__non_working_days +msgid "Number of non-working days (not payable)" +msgstr "Anzahl arbeitsfreier Tage (nicht zahlbar)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__worked_hours +msgid "Number of worked hours" +msgstr "Anzahl der Arbeitsstunden" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__working_days +msgid "Number of working days" +msgstr "Anzahl Arbeitstage" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AVS +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "OAI/II/IC" +msgstr "AHV/IV/EO" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AVS_C +msgid "OAI/II/IC Company" +msgstr "AHV/IV/EO Firmenbeitrag" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AVS_E +msgid "OAI/II/IC Employee" +msgstr "AHV/IV/EO Mitarbeiterbeitrag" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LPP +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.hr_contract_form_l10n_ch_inherit +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "OBP" +msgstr "BVG" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__lpp_amount +msgid "OBP Amount" +msgstr "BVG-Betrag" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LPP_C +msgid "OBP Company" +msgstr "BVG Firmenbeitag" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__lpp_contract_id +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_lpp_contract_form +msgid "OBP Contract" +msgstr "BVG-Vertrag" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LPP_E +msgid "OBP Employee" +msgstr "BVG Mitarbeiterbeitrag" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__lpp_rate +msgid "OBP Rate (%)" +msgstr "BVG-Rate (%)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_contract_ids +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__lpp_contract_ids +msgid "OBP contract ids" +msgstr "BVG-Vertrags-ID" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__occupation_rate +msgid "Occupation Rate (%)" +msgstr "Beschäftigungsquote (%)" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,note:l10n_ch_hr_payroll.AVS +msgid "Old Age Insurance, Invalidity Insurance, Income Compensation" +msgstr "Altersvorsorge, Invalidenversicherung, Erwerbsersatzordnung" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_other +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.Other +msgid "Other Allowance" +msgstr "Andere Zulagen" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__other_costs +msgid "Other staff costs" +msgstr "Sonstige Personalkosten" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Parameters" +msgstr "Parameter" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_payslip +msgid "Pay Slip" +msgstr "Lohnabrechnung" + +#. module: l10n_ch_hr_payroll +#: model:ir.actions.act_window,name:l10n_ch_hr_payroll.action_view_hr_payroll_config +#: model:ir.ui.menu,name:l10n_ch_hr_payroll.menu_hr_payroll_config +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Payroll Configuration" +msgstr "Lohnbuchhaltung Konfiguration" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_payslip_line +msgid "Payslip Line" +msgstr "Gehaltsabrechnungszeile" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__percentage +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__percentage +msgid "Percentage" +msgstr "Prozentsatz" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__ac_per_in_limit +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__ac_per_in_limit +msgid "Percentage (%)" +msgstr "Prozentsatz (%)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__avs_per +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__avs_per +msgid "Percentage (%) - AVS" +msgstr "Prozentsatz (%)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fadmin_per +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fadmin_per +msgid "Percentage (%) - FADMIN" +msgstr "Prozentsatz (%)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__laa_per +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__laa_per +msgid "Percentage (%) - LAA" +msgstr "Prozentsatz (%)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lca_per +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__lca_per +msgid "Percentage (%) - LCA" +msgstr "Prozentsatz (%)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__pc_f_vd_per +msgid "Percentage (%) - PC_VD" +msgstr "Prozentsatz (%)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__pc_f_vd_per +msgid "Percentage (%) PC_VD" +msgstr "Prozentsatz (%)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__ac_per_off_limit +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__ac_per_off_limit +msgid "Percentage (off limit) (%)" +msgstr "Prozentsatz (aus dem Limit) (%)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__python_rate +msgid "Rate (%) - Python" +msgstr "Satz (%)" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LCA +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "SDA" +msgstr "NBU" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LCA_C +msgid "SDA Company" +msgstr "NBU Unternehmen" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LCA_E +msgid "SDA Employee" +msgstr "NBU Mitarbeiter" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_salary_rule +msgid "Salary Rule" +msgstr "Gehaltsregel" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_salary_rule_category +msgid "Salary Rule Category" +msgstr "Gehaltsregelkategorie" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Save" +msgstr "Speichern" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,note:l10n_ch_hr_payroll.LCA +msgid "Sickness Daily Allowance" +msgstr "Krankentaggeld" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__avs_d +msgid "Social Insurance (OAI/II/IC)" +msgstr "Sozialversicherung (AHV/IV/EO)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__avs_c +msgid "Social charges (OAI/II/IC)" +msgstr "Sozialabgaben (AHV/IV/EO)" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_c +msgid "Social charges (OBP)" +msgstr "Sozialabgaben (BVG)" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.IMP_SRC +msgid "Source Tax" +msgstr "Quellensteuer" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__imp_src +msgid "Source Tax (%)" +msgstr "Quellensteuer (%)" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Special Rules" +msgstr "Sonderregeln" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__staff_ins +msgid "Staff Insurance" +msgstr "Personalversicherung" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Standard Rules" +msgstr "Standardregeln" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.TOTAL_DED +msgid "Total Deduction" +msgstr "Total Abzüge" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_travel +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.Travel +msgid "Travel Allowance" +msgstr "Reisekostenzuschuss" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "UI" +msgstr "ALV" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_C +msgid "UI Company" +msgstr "ALV Firmenbeitrag" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_C_SOL +msgid "UI Company's Solidarity" +msgstr "ALV freiwilliger Firmenbeitrag" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_E +msgid "UI Employee" +msgstr "ALV Mitarbeiter" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_E_SOL +msgid "UI Employee's Solidarity" +msgstr "ALV freiwilliger Mitarbeiterbeitrag" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_SOL +msgid "UI SOL" +msgstr "ALV SOL" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__wage_type +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__wage_type +msgid "Wage Type" +msgstr "Lohnart" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__working_rate +msgid "Working Rate (%)" +msgstr "Arbeitsrate (%)" + diff --git a/l10n_ch_hr_payroll/i18n/l10n_ch_hr_payroll.pot b/l10n_ch_hr_payroll/i18n/l10n_ch_hr_payroll.pot new file mode 100644 index 0000000..1256268 --- /dev/null +++ b/l10n_ch_hr_payroll/i18n/l10n_ch_hr_payroll.pot @@ -0,0 +1,707 @@ +# Translation of Flectra Server. +# This file contains the translation of the following modules: +# * l10n_ch_hr_payroll +# +msgid "" +msgstr "" +"Project-Id-Version: Flectra Server 2.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-18 14:18+0000\n" +"PO-Revision-Date: 2022-01-18 14:18+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LAA +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "AI" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LAA_C +msgid "AI Company" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LAA_E +msgid "AI Employee" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.PC_F_VD +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "AS Families (VD)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.PC_F_VD_C +msgid "AS Families (VD) Company" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.PC_F_VD_E +msgid "AS Families (VD) Employee" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Accounting" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fa_amount_additional +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fa_amount_additional +msgid "Additional allowance amount" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fa_min_number_childs +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fa_min_number_childs +msgid "Additional allowance for the" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.FADMIN +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Administrative Fees" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,note:l10n_ch_hr_payroll.FADMIN +msgid "Administrative Fees to the OAI" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.ALW +msgid "Allowance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__python_amount +msgid "Amount - Python" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__amount_base +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__amount_base +msgid "Amount Base" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fa_amount_child +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fa_amount_child +msgid "Amount per child (0-16)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fa_amount_student +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fa_amount_student +msgid "Amount per student (16+)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.BASIC +msgid "Basic" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.BASIC_CH +msgid "Basic CH" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_basic +msgid "Basic Salary" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Cancel" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Cantonal rules" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_res_company +msgid "Companies" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__company_id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__company_id +msgid "Company" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.COMP +msgid "Company Contribution" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__contract_id +msgid "Contract id's" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__name +msgid "Contract name" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__cc +msgid "Counterparty account" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__create_uid +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__create_uid +msgid "Created by" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__create_date +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__create_date +msgid "Created on" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_da +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.DA +msgid "Dearness Allowance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__laa_c +msgid "Debts AI" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.DED +msgid "Deduction" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__dc_amount +msgid "Deduction Amount" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__display_name +msgid "Display Name" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_employee +msgid "Employee" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_contract +msgid "Employee Contract" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_ec +msgid "Employee Contribution" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.ALFA +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Family Allowances" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.FALW +msgid "Free allowance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.COSTS +msgid "Full Company Contribution" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__wage_fulltime +msgid "Full-time Wage" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "General" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_taxable +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.GROSS +msgid "Gross" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.GROSS_CH +msgid "Gross CH" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__basic +msgid "Gross Salary" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_payroll_config +msgid "HR Payroll Config" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll.selection__hr_contract__wage_type__hour +msgid "Hourly" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_hra +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.HRA +msgid "House Rent Allowance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__id +msgid "ID" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.INFO +msgid "Information" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_d +msgid "Institutions of Providence (OBP)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_lpp_contract +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "LPP Contract" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company____last_update +msgid "Last Modified on" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__write_uid +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__write_date +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_lpp_contract__write_date +msgid "Last Updated on" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_max +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__lpp_max +msgid "Maximum legal" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__ac_limit +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__ac_limit +msgid "Maximum limit" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_meal +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.Meal +msgid "Meal Allowance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_medical +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.Medical +msgid "Medical Allowance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_min +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__lpp_min +msgid "Minimum legal" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll.selection__hr_contract__wage_type__month +msgid "Monthly" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category__name +msgid "Name" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.NET +msgid "Net" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.NET_CH +msgid "Net CH" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_net +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__net +msgid "Net Salary" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__note +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__note +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule_category__note +msgid "Note" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee__children +msgid "Number of Children at school" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee__children_student +msgid "Number of Children student" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__non_working_days +msgid "Number of non-working days (not payable)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__worked_hours +msgid "Number of worked hours" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__working_days +msgid "Number of working days" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AVS +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "OAI/II/IC" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AVS_C +msgid "OAI/II/IC Company" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AVS_E +msgid "OAI/II/IC Employee" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LPP +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.hr_contract_form_l10n_ch_inherit +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "OBP" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__lpp_amount +msgid "OBP Amount" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LPP_C +msgid "OBP Company" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__lpp_contract_id +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_lpp_contract_form +msgid "OBP Contract" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LPP_E +msgid "OBP Employee" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__lpp_rate +msgid "OBP Rate (%)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_contract_ids +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__lpp_contract_ids +msgid "OBP contract ids" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__occupation_rate +msgid "Occupation Rate (%)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,note:l10n_ch_hr_payroll.AVS +msgid "Old Age Insurance, Invalidity Insurance, Income Compensation" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_other +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.Other +msgid "Other Allowance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__other_costs +msgid "Other staff costs" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Parameters" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_payslip +msgid "Pay Slip" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.actions.act_window,name:l10n_ch_hr_payroll.action_view_hr_payroll_config +#: model:ir.ui.menu,name:l10n_ch_hr_payroll.menu_hr_payroll_config +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Payroll Configuration" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_payslip_line +msgid "Payslip Line" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__percentage +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_salary_rule__percentage +msgid "Percentage" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__ac_per_in_limit +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__ac_per_in_limit +msgid "Percentage (%)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__avs_per +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__avs_per +msgid "Percentage (%) - AVS" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__fadmin_per +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__fadmin_per +msgid "Percentage (%) - FADMIN" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__laa_per +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__laa_per +msgid "Percentage (%) - LAA" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lca_per +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__lca_per +msgid "Percentage (%) - LCA" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__pc_f_vd_per +msgid "Percentage (%) - PC_VD" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__pc_f_vd_per +msgid "Percentage (%) PC_VD" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__ac_per_off_limit +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_res_company__ac_per_off_limit +msgid "Percentage (off limit) (%)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip_line__python_rate +msgid "Rate (%) - Python" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LCA +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "SDA" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LCA_C +msgid "SDA Company" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.LCA_E +msgid "SDA Employee" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_salary_rule +msgid "Salary Rule" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_salary_rule_category +msgid "Salary Rule Category" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Save" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,note:l10n_ch_hr_payroll.LCA +msgid "Sickness Daily Allowance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__avs_d +msgid "Social Insurance (OAI/II/IC)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__avs_c +msgid "Social charges (OAI/II/IC)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__lpp_c +msgid "Social charges (OBP)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.IMP_SRC +msgid "Source Tax" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__imp_src +msgid "Source Tax (%)" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Special Rules" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payroll_config__staff_ins +msgid "Staff Insurance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "Standard Rules" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.TOTAL_DED +msgid "Total Deduction" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.hr_rule_travel +#: model:hr.salary.rule.category,name:l10n_ch_hr_payroll.Travel +msgid "Travel Allowance" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll.view_hr_payroll_config_form +msgid "UI" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_C +msgid "UI Company" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_C_SOL +msgid "UI Company's Solidarity" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_E +msgid "UI Employee" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_E_SOL +msgid "UI Employee's Solidarity" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:hr.salary.rule,name:l10n_ch_hr_payroll.AC_SOL +msgid "UI SOL" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract__wage_type +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__wage_type +msgid "Wage Type" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_payslip__working_rate +msgid "Working Rate (%)" +msgstr "" diff --git a/l10n_ch_hr_payroll/models/__init__.py b/l10n_ch_hr_payroll/models/__init__.py new file mode 100644 index 0000000..408ca88 --- /dev/null +++ b/l10n_ch_hr_payroll/models/__init__.py @@ -0,0 +1,7 @@ +from . import hr_payslip +from . import hr_salary_rule +from . import hr_salary_rule_category +from . import hr_employee +from . import res_company +from . import hr_payroll_config +from . import hr_contract diff --git a/l10n_ch_hr_payroll/models/hr_contract.py b/l10n_ch_hr_payroll/models/hr_contract.py new file mode 100644 index 0000000..82eb887 --- /dev/null +++ b/l10n_ch_hr_payroll/models/hr_contract.py @@ -0,0 +1,43 @@ +# Copyright 2017 Open Net Srl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from flectra import fields, models, api + + +class HrContract(models.Model): + _inherit = 'hr.contract' + + lpp_rate = fields.Float( + string='OBP Rate (%)', + digits='Payrollrate') + lpp_amount = fields.Float( + string='OBP Amount', + digits='Account') + lpp_contract_id = fields.Many2one( + string='OBP Contract', + comodel_name='lpp.contract', + #inverse_name='contract_id' + ) + + imp_src = fields.Float( + string='Source Tax (%)', + digits='Payrollrate') + + wage_type = fields.Selection( + string="Wage Type", + selection=[('month', "Monthly"), ('hour', "Hourly")], + default='month') + wage_fulltime = fields.Float( + string='Full-time Wage', + digits='Account', + default=0) + occupation_rate = fields.Float( + string='Occupation Rate (%)', + digits='Account', + default=100.0) + + @api.onchange('occupation_rate', 'wage_fulltime') + def _onchange_wage_rate_fulltime(self): + for contract in self: + contract.wage = \ + contract.wage_fulltime * (contract.occupation_rate / 100) diff --git a/l10n_ch_hr_payroll/models/hr_employee.py b/l10n_ch_hr_payroll/models/hr_employee.py new file mode 100644 index 0000000..14c98b0 --- /dev/null +++ b/l10n_ch_hr_payroll/models/hr_employee.py @@ -0,0 +1,11 @@ +# Copyright 2017 Open Net Srl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from flectra import fields, models + + +class HrEmployee(models.Model): + _inherit = 'hr.employee' + + children = fields.Integer('Number of Children at school') + children_student = fields.Integer('Number of Children student') diff --git a/l10n_ch_hr_payroll/models/hr_payroll_config.py b/l10n_ch_hr_payroll/models/hr_payroll_config.py new file mode 100644 index 0000000..16a8d34 --- /dev/null +++ b/l10n_ch_hr_payroll/models/hr_payroll_config.py @@ -0,0 +1,454 @@ +# Copyright 2017 Open Net Srl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from flectra import models, fields, api + + +class HrPayrollConfig(models.TransientModel): + _name = 'hr.payroll.config' + _description = 'HR Payroll Config' + + @api.model + def _get_default_cc(self): + all_equal = False + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.AC_E', 'credit'), + ('l10n_ch_hr_payroll.AC_E_SOL', 'credit'), + ('l10n_ch_hr_payroll.ALFA', 'credit'), + ('l10n_ch_hr_payroll.AVS_E', 'credit'), + ('l10n_ch_hr_payroll.PC_F_VD_E', 'credit'), + ('l10n_ch_hr_payroll.BASIC_CH', 'credit'), + ('l10n_ch_hr_payroll.LAA_E', 'credit'), + ('l10n_ch_hr_payroll.LCA_E', 'credit'), + ('l10n_ch_hr_payroll.LPP_E', 'credit'), + ('l10n_ch_hr_payroll.NET_CH', 'debit')]) + + return all_equal + + @api.model + def _get_default_basic(self): + all_equal = False + + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.BASIC_CH', 'debit')]) + + return all_equal + + @api.model + def _get_default_net(self): + all_equal = False + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.NET_CH', 'credit')]) + + return all_equal + + @api.model + def _get_default_avs_d(self): + all_equal = False + + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.AC_C', 'debit'), + ('l10n_ch_hr_payroll.AC_C_SOL', 'debit'), + ('l10n_ch_hr_payroll.AC_E', 'debit'), + ('l10n_ch_hr_payroll.AC_E_SOL', 'debit'), + ('l10n_ch_hr_payroll.ALFA', 'debit'), + ('l10n_ch_hr_payroll.AVS_C', 'debit'), + ('l10n_ch_hr_payroll.AVS_E', 'debit'), + ('l10n_ch_hr_payroll.PC_F_VD_C', 'debit'), + ('l10n_ch_hr_payroll.PC_F_VD_E', 'debit'), + ('l10n_ch_hr_payroll.FADMIN', 'credit')]) + + return all_equal + + @api.model + def _get_default_avs_c(self): + all_equal = False + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.AC_C', 'credit'), + ('l10n_ch_hr_payroll.AC_C_SOL', 'credit'), + ('l10n_ch_hr_payroll.AVS_C', 'credit'), + ('l10n_ch_hr_payroll.PC_F_VD_C', 'credit')]) + + return all_equal + + @api.model + def _get_default_lpp_d(self): + all_equal = False + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.LPP_C', 'debit'), + ('l10n_ch_hr_payroll.LPP_E', 'debit')]) + + return all_equal + + @api.model + def _get_default_lpp_c(self): + all_equal = False + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.LPP_C', 'credit')]) + + return all_equal + + @api.model + def _get_default_laa_c(self): + all_equal = False + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.LAA_C', 'debit'), + ('l10n_ch_hr_payroll.LAA_E', 'debit'), + ('l10n_ch_hr_payroll.LCA_C', 'debit'), + ('l10n_ch_hr_payroll.LCA_E', 'debit')]) + + return all_equal + + @api.model + def _get_default_staff_ins(self): + all_equal = False + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.LAA_C', 'credit'), + ('l10n_ch_hr_payroll.LCA_C', 'credit')]) + + return all_equal + + @api.model + def _get_default_other_costs(self): + all_equal = False + all_equal = self.search_account_by_rule([ + ('l10n_ch_hr_payroll.FADMIN', 'debit')]) + + return all_equal + + @api.model + def search_account_by_rule(self, rules_types): + res = False + last_res = False + + for rule_type in rules_types: + # rule_type = ('l10n_ch_hr_payroll.AC_E','credit') + rule = rule_type[0] + type = rule_type[1] + rule = self.env['hr.salary.rule'].search([ + ('id', '=', self.env.ref(rule).id) + ]) + if rule: + rule = rule[0] + if type == 'debit': + res = rule.account_debit + else: + res = rule.account_credit + + if last_res != res and last_res is not False: + return False + last_res = res + return res + + def assign_account_to_rule(self, rules, account, type): + if account.id: + ids = [] + for rule in rules: + ids.append(self.env.ref(rule).id) + rules = self.env['hr.salary.rule'].search([ + ('id', 'in', ids) + ]) + for rule in rules: + if type == 'debit': + rule.account_debit = account.id + elif type == 'credit': + rule.account_credit = account.id + + # configs default values + @api.model + def _get_default_configs(self, config): + val = getattr(self.env.user.company_id, config) + if val < 0: + val = -val + return val + + @api.model + def _get_default_lpp_contracts(self): + return self.env.user.company_id.lpp_contract_ids + + company_id = fields.Many2one( + comodel_name='res.company', + default=lambda self: self.env.user.company_id) + + # Accounting + # general + cc = fields.Many2one( + comodel_name='account.account', + string='Counterparty account', + default=_get_default_cc, + required=False) + + basic = fields.Many2one( + comodel_name='account.account', + string='Gross Salary', + default=_get_default_basic, + required=False) + + net = fields.Many2one( + comodel_name='account.account', + string='Net Salary', + default=_get_default_net, + required=False) + + # standard + avs_d = fields.Many2one( + comodel_name='account.account', + string='Social Insurance (OAI/II/IC)', + default=_get_default_avs_d, + required=False) + + avs_c = fields.Many2one( + comodel_name='account.account', + string='Social charges (OAI/II/IC)', + default=_get_default_avs_c, + required=False) + + lpp_d = fields.Many2one( + comodel_name='account.account', + string='Institutions of Providence (OBP)', + default=_get_default_lpp_d, + required=False) + + lpp_c = fields.Many2one( + comodel_name='account.account', + string='Social charges (OBP)', + default=_get_default_lpp_c, + required=False) + + laa_c = fields.Many2one( + comodel_name='account.account', + string='Debts AI', + default=_get_default_laa_c, + required=False) + + # special + staff_ins = fields.Many2one( + comodel_name='account.account', + string='Staff Insurance', + default=_get_default_staff_ins, + required=False) + + other_costs = fields.Many2one( + comodel_name='account.account', + string='Other staff costs', + default=_get_default_other_costs, + required=False) + + # Parameters + # UI(AC) + ac_limit = fields.Float( + string='Maximum limit', + default=lambda self: self._get_default_configs('ac_limit'), + digits='Account', + required=False) + ac_per_off_limit = fields.Float( + string='Percentage (off limit) (%)', + default=lambda self: self._get_default_configs('ac_per_off_limit'), + digits='Payrollrate', + required=False) + ac_per_in_limit = fields.Float( + string='Percentage (%)', + default=lambda self: self._get_default_configs('ac_per_in_limit'), + digits='Payrollrate', + required=False) + + # OAI(AVS) + avs_per = fields.Float( + string='Percentage (%) - AVS', + default=lambda self: self._get_default_configs('avs_per'), + digits='Payrollrate', + required=False) + + # FADMIN + fadmin_per = fields.Float( + string="Percentage (%) - FADMIN", + default=lambda self: self._get_default_configs('fadmin_per'), + digits='Payrollrate', + required=False) + + # AI(LAA) + laa_per = fields.Float( + string="Percentage (%) - LAA", + default=lambda self: self._get_default_configs('laa_per'), + digits='Payrollrate', + required=False) + + # SDA(LCA) + lca_per = fields.Float( + string="Percentage (%) - LCA", + default=lambda self: self._get_default_configs('lca_per'), + digits='Payrollrate', + required=False) + + # AS Families (PC Familles) + pc_f_vd_per = fields.Float( + string="Percentage (%) - PC_VD", + default=lambda self: self._get_default_configs('pc_f_vd_per'), + digits='Payrollrate', + required=False) + + # OBP(LPP) + lpp_min = fields.Float( + string="Minimum legal", + default=lambda self: self._get_default_configs('lpp_min'), + digits='Account', + required=False) + lpp_max = fields.Float( + string="Maximum legal", + default=lambda self: self._get_default_configs('lpp_max'), + digits='Account', + required=False) + + # Family allowances + fa_amount_child = fields.Float( + string="Amount per child (0-16)", + default=lambda self: self._get_default_configs('fa_amount_child'), + digits='Account', + required=False) + fa_amount_student = fields.Float( + string="Amount per student (16+)", + default=lambda self: self._get_default_configs('fa_amount_student'), + digits='Account', + required=False) + fa_min_number_childs = fields.Integer( + string="Additional allowance for the", + default=lambda self: self._get_default_configs('fa_min_number_childs'), + required=False) + fa_amount_additional = fields.Float( + string="Additional allowance amount", + default=lambda self: self._get_default_configs('fa_amount_additional'), + digits='Account', + required=False) + lpp_contract_ids = fields.One2many( + string="OBP contract ids", + related="company_id.lpp_contract_ids", + default=lambda self: self._get_default_lpp_contracts(), + readonly=False) + + + def values_to_company(self): + company_id = self.company_id + list_fields = [ + 'ac_limit', + 'fadmin_per', + 'lpp_min', + 'lpp_max', + 'fa_amount_child', + 'fa_amount_student', + 'fa_min_number_childs', + 'fa_amount_additional' + ] + list_fields_neg = [ + 'ac_per_off_limit', + 'ac_per_in_limit', + 'avs_per', + 'laa_per', + 'lca_per', + 'pc_f_vd_per' + ] + + for value in list_fields: + value_field = getattr(self, value) + company_id.write({value: value_field}) + + for value in list_fields_neg: + value_field = -(getattr(self, value)) + company_id.write({value: value_field}) + + def delete_lpp_contracts(self): + ids_to_unlink = self.env['lpp.contract'].search([ + ('company_id', '=', False) + ]) + ids_to_unlink.unlink() + + # save and create configs + def save_configs(self): + for config in self: + # -Save codes- + # cc + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.AC_E', + 'l10n_ch_hr_payroll.AC_E_SOL', + 'l10n_ch_hr_payroll.ALFA', + 'l10n_ch_hr_payroll.AVS_E', + 'l10n_ch_hr_payroll.PC_F_VD_E', + 'l10n_ch_hr_payroll.BASIC_CH', + 'l10n_ch_hr_payroll.LAA_E', + 'l10n_ch_hr_payroll.LCA_E', + 'l10n_ch_hr_payroll.LPP_E' + ], config.cc, 'credit') + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.NET_CH' + ], config.cc, 'debit') + + # basic + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.BASIC_CH' + ], config.basic, 'debit') + + # net + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.NET_CH' + ], config.net, 'credit') + + # avs_d + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.AC_C', + 'l10n_ch_hr_payroll.AC_C_SOL', + 'l10n_ch_hr_payroll.AC_E', + 'l10n_ch_hr_payroll.AC_E_SOL', + 'l10n_ch_hr_payroll.ALFA', + 'l10n_ch_hr_payroll.AVS_C', + 'l10n_ch_hr_payroll.AVS_E', + 'l10n_ch_hr_payroll.PC_F_VD_C', + 'l10n_ch_hr_payroll.PC_F_VD_E' + ], config.avs_d, 'debit') + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.FADMIN' + ], config.avs_d, 'credit') + + # avs_c + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.AC_C', + 'l10n_ch_hr_payroll.AC_C_SOL', + 'l10n_ch_hr_payroll.AVS_C', + 'l10n_ch_hr_payroll.PC_F_VD_C' + ], config.avs_c, 'credit') + + # lpp_d + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.LPP_C', + 'l10n_ch_hr_payroll.LPP_E' + ], config.lpp_d, 'debit') + + # lpp_c + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.LPP_C' + ], config.lpp_c, 'credit') + + # laa_c + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.LAA_C', + 'l10n_ch_hr_payroll.LAA_E', + 'l10n_ch_hr_payroll.LCA_C', + 'l10n_ch_hr_payroll.LCA_E' + ], config.laa_c, 'debit') + + # staff_ins + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.LAA_C', + 'l10n_ch_hr_payroll.LCA_C' + ], config.staff_ins, 'credit') + + # other_costs + config.assign_account_to_rule([ + 'l10n_ch_hr_payroll.FADMIN' + ], config.other_costs, 'debit') + + # -Save values in company + config.values_to_company() + + # Search lpp contracts without company id + config.delete_lpp_contracts() + + return True diff --git a/l10n_ch_hr_payroll/models/hr_payslip.py b/l10n_ch_hr_payroll/models/hr_payslip.py new file mode 100644 index 0000000..e922508 --- /dev/null +++ b/l10n_ch_hr_payroll/models/hr_payslip.py @@ -0,0 +1,110 @@ +# Copyright 2017 Open Net Srl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from datetime import timedelta +from flectra import fields, models, api + +import logging + +_logger = logging.getLogger(__name__) + +class HrPayslip(models.Model): + + _inherit = 'hr.payslip' + + working_days = fields.Integer( + string='Number of working days') + non_working_days = fields.Integer( + string='Number of non-working days (not payable)') + working_rate = fields.Float( + string='Working Rate (%)', + readonly=True, + default=100) + worked_hours = fields.Float( + string='Number of worked hours', + readonly=True, + compute='_compute_worked_hours') + + wage_type = fields.Selection(related='contract_id.wage_type') + + def _compute_worked_hours(self): + for payslip in self: + if payslip.contract_id.wage_type == 'hour': + dt = fields.Datetime + date_to = dt.from_string(payslip.date_to) + date_to = dt.to_string(date_to + timedelta(days=1)) + + all_time_records = self.env['hr.attendance'].search([ + ('employee_id', '=', payslip.employee_id.id), + ('check_in', '>=', payslip.date_from), + ('check_in', '<', date_to) + ]) + sum_all_hours = 0 + for time_rec in all_time_records: + sum_all_hours += time_rec.worked_hours + + sum_minutes = (sum_all_hours - int(sum_all_hours))*60 + sum_secunds = (sum_minutes - int(sum_minutes))/60 + sum_wo_sec = sum_all_hours - sum_secunds + + payslip.worked_hours = sum_wo_sec + else: + payslip.worked_hours = 0 + + @api.onchange('employee_id', 'date_from', 'date_to') + def _onchange_employee_worked_hours(self): + for payslip in self: + payslip._compute_worked_hours() + + @api.onchange('working_days', 'non_working_days') + def _onchange_working_non_working_days(self): + for payslip in self: + if payslip.working_days != 0: + worked_days = payslip.working_days - payslip.non_working_days + payslip.working_rate = \ + worked_days/float(payslip.working_days)*100 + elif payslip.working_days == 0 and payslip.non_working_days == 0: + payslip.working_rate = 100 + + def compute_sheet(self): + for payslip in self: + payslip._onchange_working_non_working_days() + payslip._onchange_employee_worked_hours() + res = super(HrPayslip, payslip).compute_sheet() + return res + + +class HrPayslipLine(models.Model): + + _inherit = 'hr.payslip.line' + + python_rate = fields.Float( + compute='_compute_python_rate', + string='Rate (%) - Python', + digits='Payrollrate', + store=True) + python_amount = fields.Float( + compute='_compute_python_amount', + string='Amount - Python', + digits='Account', + store=True) + + @api.depends('quantity', 'amount', 'rate') + def _compute_python_rate(self): + for line in self: + if line.salary_rule_id.percentage: + line.python_rate = line.salary_rule_id.percentage + elif line.rate: + line.python_rate = line.rate + else: + line.python_rate = 100 + + @api.depends('quantity', 'amount', 'rate') + def _compute_python_amount(self): + for line in self: + if line.salary_rule_id.amount_base: + line.python_amount = line.salary_rule_id.amount_base + elif line.amount: + line.python_amount = line.amount + else: + line.python_amount = 0 diff --git a/l10n_ch_hr_payroll/models/hr_salary_rule.py b/l10n_ch_hr_payroll/models/hr_salary_rule.py new file mode 100644 index 0000000..a39419e --- /dev/null +++ b/l10n_ch_hr_payroll/models/hr_salary_rule.py @@ -0,0 +1,67 @@ +# Copyright 2017 Open Net Srl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from flectra import fields, models, api +from flectra.tools.safe_eval import safe_eval + +import logging + +_logger = logging.getLogger(__name__) + +class HrSalaryRule(models.Model): + + _inherit = 'hr.salary.rule' + name = fields.Char(translate=True) + note = fields.Char(translate=True) + + percentage = fields.Float( + compute="_compute_percentage_from_company", + required=False) + amount_base = fields.Float( + required=False) + + def _compute_percentage_from_company(self): + list_fields_per = { + 'fadmin_per': ['FADMIN'], + 'avs_per': ['AVS_C', 'AVS_E'], + 'pc_f_vd_per': ['PC_F_VD_C', 'PC_F_VD_E'], + 'laa_per': ['LAA_C', 'LAA_E'], + 'lca_per': ['LCA_C', 'LCA_E'], + 'ac_per_off_limit': ['AC_C_SOL', 'AC_E_SOL'], + 'ac_per_in_limit': ['AC_C', 'AC_E'] + } + + for rule in self: + rule.percentage = False + for rule_from, rules_to in list_fields_per.items(): + for rule_to in rules_to: + data_id = self.env['ir.model.data'].search([ + ('module', '=', 'l10n_ch_hr_payroll'), + ('name', '=', rule_to) + ]) + + if len(data_id): + rule_to_modify = rule.env['hr.salary.rule'].search([ + ('id', '=', data_id.res_id) + ]) + + if rule_to_modify.id == rule.id: + rule.percentage = \ + getattr(rule.company_id, rule_from) + + + def _compute_rule(self, localdict): + res = super(HrSalaryRule, self)._compute_rule(localdict) + for rule in self: + if rule.amount_percentage_base: + rule.amount_base = \ + float(safe_eval(rule.amount_percentage_base, localdict)) + if rule.id == self.env.ref("l10n_ch_hr_payroll.LPP_C").id or \ + rule.id == self.env.ref("l10n_ch_hr_payroll.LPP_E").id: + rule.percentage = \ + -float(safe_eval("contract.lpp_rate or 100", localdict)) + + if rule.id == self.env.ref("l10n_ch_hr_payroll.IMP_SRC").id: + rule.percentage = \ + -float(safe_eval("contract.imp_src or 100", localdict)) + return res diff --git a/l10n_ch_hr_payroll/models/hr_salary_rule_category.py b/l10n_ch_hr_payroll/models/hr_salary_rule_category.py new file mode 100644 index 0000000..5b65191 --- /dev/null +++ b/l10n_ch_hr_payroll/models/hr_salary_rule_category.py @@ -0,0 +1,11 @@ +# Copyright 2017 Open Net Sàrl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from flectra import fields, models + + +class HrSalaryRuleCategory(models.Model): + + _inherit = 'hr.salary.rule.category' + name = fields.Char(translate=True) + note = fields.Char(translate=True) diff --git a/l10n_ch_hr_payroll/models/res_company.py b/l10n_ch_hr_payroll/models/res_company.py new file mode 100644 index 0000000..ea693bd --- /dev/null +++ b/l10n_ch_hr_payroll/models/res_company.py @@ -0,0 +1,120 @@ +# Copyright 2017 Open Net Srl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from flectra import fields, models + + +class LPPContract(models.Model): + _name = 'lpp.contract' + _description = 'LPP Contract' + + company_id = fields.Many2one( + string='Company', + invisible=True, + comodel_name='res.company') + + contract_id = fields.One2many( + string="Contract id's", + comodel_name='hr.contract', + inverse_name='lpp_contract_id', + required=True + ) + + name = fields.Char( + string='Contract name', + required=True) + + dc_amount = fields.Float( + string='Deduction Amount', + required=True) + + +class ResCompany(models.Model): + _inherit = 'res.company' + + # -Parameters- + # UI(AC) + ac_limit = fields.Float( + string='Maximum limit', + default=12350, + digits='Account', + required=False) + ac_per_off_limit = fields.Float( + string='Percentage (off limit) (%)', + default='-1.0', + digits='Payrollrate', + required=False) + ac_per_in_limit = fields.Float( + string='Percentage (%)', + default='-1.1', + digits='Payrollrate', + required=False) + + # OAI(AVS) + avs_per = fields.Float( + string='Percentage (%) - AVS', + default=5.125, + digits='Payrollrate', + required=False) + + # FADMIN + fadmin_per = fields.Float( + string="Percentage (%) - FADMIN", + digits='Payrollrate', + required=False) + + # AI(LAA) + laa_per = fields.Float( + string="Percentage (%) - LAA", + digits='Payrollrate', + required=False) + + # SDA(LCA) + lca_per = fields.Float( + string="Percentage (%) - LCA", + digits='Payrollrate', + required=False) + + # AS Families (PC Famille) + pc_f_vd_per = fields.Float( + string="Percentage (%) PC_VD", + default=0.06, + digits='Payrollrate', + required=False) + + # OBP(LPP) + lpp_min = fields.Float( + string="Minimum legal", + default=1762.50, + digits='Account', + required=False) + lpp_max = fields.Float( + string="Maximum legal", + default='7050.00', + digits='Account', + required=False) + lpp_contract_ids = fields.One2many( + string="OBP contract ids", + comodel_name='lpp.contract', + inverse_name='company_id') + + # -Family Allowances- + fa_amount_child = fields.Float( + string="Amount per child (0-16)", + default='0', + digits='Account', + required=False) + fa_amount_student = fields.Float( + string="Amount per student (16+)", + default='0', + digits='Account', + required=False) + fa_min_number_childs = fields.Integer( + string="Additional allowance for the", + default='3', + required=False) + fa_amount_additional = fields.Float( + string="Additional allowance amount", + default='0', + digits='Account', + required=False) diff --git a/l10n_ch_hr_payroll/security/ir.model.access.csv b/l10n_ch_hr_payroll/security/ir.model.access.csv new file mode 100644 index 0000000..3ba7d9b --- /dev/null +++ b/l10n_ch_hr_payroll/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_lpp_contract_manager,lpp_contract,model_lpp_contract,hr_payroll.group_hr_payroll_manager,1,1,1,1 +access_lpp_contract_officer,lpp_contract,model_lpp_contract,base.group_user,1,0,0,0 +access_hr_payroll_config_manager,access_hr_payroll_config,model_hr_payroll_config,hr_payroll.group_hr_payroll_manager,1,1,1,1 +access_hr_payroll_config_officer,access_hr_payroll_config,model_hr_payroll_config,base.group_user,1,0,0,0 diff --git a/l10n_ch_hr_payroll/static/description/icon.png b/l10n_ch_hr_payroll/static/description/icon.png new file mode 100644 index 0000000..c59e295 Binary files /dev/null and b/l10n_ch_hr_payroll/static/description/icon.png differ diff --git a/l10n_ch_hr_payroll/tests/__init__.py b/l10n_ch_hr_payroll/tests/__init__.py new file mode 100644 index 0000000..c080b62 --- /dev/null +++ b/l10n_ch_hr_payroll/tests/__init__.py @@ -0,0 +1,8 @@ +# Copyright 2017 Open Net Sàrl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_contract_lpp +from . import test_max_lpp +from . import test_no_lpp_rate +from . import test_min_lpp +from . import test_wizard diff --git a/l10n_ch_hr_payroll/tests/test_contract_lpp.py b/l10n_ch_hr_payroll/tests/test_contract_lpp.py new file mode 100644 index 0000000..62db7cb --- /dev/null +++ b/l10n_ch_hr_payroll/tests/test_contract_lpp.py @@ -0,0 +1,291 @@ +# Copyright 2017 Open Net Sàrl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import logging +import flectra.tests.common as common +from datetime import datetime, timedelta +from flectra.fields import Date + +_logger = logging.getLogger(__name__) + + +class TestContractLPP(common.TransactionCase): + + def setUp(self): + super(TestContractLPP, self).setUp() + + # Some salary rules references + self.basic_ch = self.ref('l10n_ch_hr_payroll.BASIC_CH') + self.gross_ch = self.ref('l10n_ch_hr_payroll.GROSS_CH') + self.net_ch = self.ref('l10n_ch_hr_payroll.NET_CH') + self.ac_c = self.ref('l10n_ch_hr_payroll.AC_C') + self.ac_c_sol = self.ref('l10n_ch_hr_payroll.AC_C_SOL') + self.ac_e = self.ref('l10n_ch_hr_payroll.AC_E') + self.ac_e_sol = self.ref('l10n_ch_hr_payroll.AC_E_SOL') + self.alfa = self.ref('l10n_ch_hr_payroll.ALFA') + self.avs_c = self.ref('l10n_ch_hr_payroll.AVS_C') + self.avs_e = self.ref('l10n_ch_hr_payroll.AVS_E') + self.pc_f_vd_c = self.ref('l10n_ch_hr_payroll.PC_F_VD_C') + self.pc_f_vd_e = self.ref('l10n_ch_hr_payroll.PC_F_VD_E') + self.laa_c = self.ref('l10n_ch_hr_payroll.LAA_C') + self.laa_e = self.ref('l10n_ch_hr_payroll.LAA_E') + self.lca_c = self.ref('l10n_ch_hr_payroll.LCA_C') + self.lca_e = self.ref('l10n_ch_hr_payroll.LCA_E') + self.lpp_c = self.ref('l10n_ch_hr_payroll.LPP_C') + self.lpp_e = self.ref('l10n_ch_hr_payroll.LPP_E') + self.imp_src = self.ref('l10n_ch_hr_payroll.IMP_SRC') + + # I create a new employee "Richard" + self.richard_emp = self.env['hr.employee'].create({ + 'name': 'Richard', + 'children': 2, + 'children_student': 1 + }) + + # List of rules needed + self.rules_for_structure = [ + self.basic_ch, + self.gross_ch, + self.net_ch, + self.ac_c, + self.ac_e, + self.ac_c_sol, + self.ac_e_sol, + self.alfa, + self.avs_c, + self.avs_e, + self.pc_f_vd_c, + self.pc_f_vd_e, + self.laa_c, + self.laa_e, + self.lca_c, + self.lca_e, + self.lpp_c, + self.lpp_e, + self.imp_src + ] + + # I create a salary structure for "Software Developer" + self.developer_pay_structure = self.env['hr.payroll.structure'].create( + { + 'name': 'Salary Structure for Software Developer', + 'code': 'SD', + 'company_id': self.ref('base.main_company'), + 'rule_ids': [(6, 0, self.rules_for_structure)], + 'parent_id': 0 + }) + + # I create a OBP contract + self.lpp_contract = self.env['lpp.contract'].create({ + 'company_id': self.ref('base.main_company'), + 'name': 'DC_exemple', + 'dc_amount': 24675.00 + }) + + # I create a contract for "Richard" + self.richard_contract = self.env['hr.contract'].create({ + 'date_end': Date.to_string((datetime.now() + timedelta(days=365))), + 'date_start': Date.today(), + 'name': 'Contract for Richard', + 'wage_fulltime': 7500.0, + 'occupation_rate': 20.0, + 'wage': 0, + 'wage_type': 'month', + 'imp_src': 0, + 'lpp_contract_id': self.lpp_contract.id, + 'lpp_rate': 8.650, + 'lpp_amount': 0, + 'type_id': self.ref('hr_contract_types.hr_contract_type_emp'), + 'employee_id': self.richard_emp.id, + 'struct_id': self.developer_pay_structure.id + }) + + self.journal = self.env['account.journal'].create({ + 'name': 'Payroll', + 'type': 'general', + 'code': 'pay' + }) + + # I create a payslip for "Richard" + self.richard_payslip = self.env['hr.payslip'].create({ + 'name': 'Payslip of Richard', + 'employee_id': self.richard_emp.id, + 'company_id': self.ref('base.main_company'), + 'contract_id': self.richard_contract.id, + 'journal_id': self.journal.id, + 'working_days': 26, + 'non_working_days': 12 + }) + + # I create payroll config with company values + self.configs = self.env['hr.payroll.config'].create({ + 'ac_limit': 12350, + 'ac_per_off_limit': 1.0, + 'ac_per_in_limit': 1.1, + 'avs_per': 5.125, + 'pc_f_vd_per': 0.06, + 'fadmin_per': 0.25, + 'laa_per': 0.46, + 'lca_per': 0.52, + 'lpp_min': 1762.50, + 'lpp_max': 7050.00, + 'fa_amount_child': 250, + 'fa_amount_student': 330, + 'fa_min_number_childs': 3, + 'fa_amount_additional': 120 + }) + + def test_contract_lpp(self): + _logger.debug(' -- Test CONTRACT -- ') + _logger.debug(self.configs.avs_per) + + # I click on 'Save' button on payroll configuration + self.configs.save_configs() + + # OnChange wage full-time and occupation rate to calcule wage + self.richard_contract._onchange_wage_rate_fulltime() + self.assertEqual(self.richard_contract.wage, 1500) + + # OnChange working days and non working days to calcule working rate + self.richard_payslip._onchange_working_non_working_days() + self.assertEqual(self.richard_payslip.working_rate, (26-12)/26.0*100) + + # I click on 'Compute Sheet' button on payslip + self.richard_payslip.compute_sheet() + + rule_lines = self.richard_payslip.line_ids.search([ + ('salary_rule_id', 'in', self.rules_for_structure) + ]) + + _logger.debug('Test w/ contract LPP') + + for line in rule_lines: + # BASIC CH + if line.salary_rule_id.id == self.basic_ch: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + _logger.debug('BASIC CH %s' % line.python_amount) + + # GROSS CH + if line.salary_rule_id.id == self.gross_ch: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)+950), 2)) + + # NET CH + if line.salary_rule_id.id == self.net_ch: + self.assertEqual( + line.python_amount, + round(1648.30, 2)) + + # UI (AC) + if line.salary_rule_id.id == self.ac_c: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, -8.88) + if line.salary_rule_id.id == self.ac_e: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, -8.88) + # UI (AC) - SOL + if line.salary_rule_id.id == self.ac_c_sol: + self.assertEqual( + line.python_amount, 0) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, 0) + if line.salary_rule_id.id == self.ac_e_sol: + self.assertEqual( + line.python_amount, 0) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, 0) + + # ALFA + if line.salary_rule_id.id == self.alfa: + self.assertEqual( + line.python_amount, + round((2*250)+330+120, 2)) + self.assertEqual(line.python_rate, 100) + self.assertEqual(line.total, 950) + + # OAI (AVS) + if line.salary_rule_id.id == self.avs_c: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -5.125) + self.assertEqual(line.total, -41.39) + if line.salary_rule_id.id == self.avs_e: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -5.125) + self.assertEqual(line.total, -41.39) + + # AS Families (PC Famille) + if line.salary_rule_id.id == self.pc_f_vd_c: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -0.06) + self.assertEqual(line.total, -0.48) + if line.salary_rule_id.id == self.pc_f_vd_e: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -0.06) + self.assertEqual(line.total, -0.48) + + # IMP_SRC + if line.salary_rule_id.id == self.imp_src: + self.assertEqual(line.python_amount, 0) + self.assertEqual(line.python_rate, 0) + self.assertEqual(line.total, 0) + + # AI (LAA) + if line.salary_rule_id.id == self.laa_c: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -0.46) + self.assertEqual(line.total, -3.72) + if line.salary_rule_id.id == self.laa_e: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -0.46) + self.assertEqual(line.total, -3.72) + + # SDA (LCA) + if line.salary_rule_id.id == self.lca_c: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -0.52) + self.assertEqual(line.total, -4.20) + if line.salary_rule_id.id == self.lca_e: + self.assertEqual( + line.python_amount, + round((1500*((26-12)/26.0)), 2)) + self.assertEqual(line.python_rate, -0.52) + self.assertEqual(line.total, -4.20) + + # OBP (LPP) + if line.salary_rule_id.id == self.lpp_c: + calc_lpp = (((7500.0*12) - 24675)/12)*(20.0/100)*((26-12)/26.0) + self.assertEqual( + line.python_amount, + round(calc_lpp, 2)) + self.assertEqual(line.python_rate, -8.650) + self.assertEqual(line.total, -50.71) + if line.salary_rule_id.id == self.lpp_e: + calc_lpp = (((7500.0*12) - 24675)/12)*(20.0/100)*((26-12)/26.0) + self.assertEqual( + line.python_amount, + round(calc_lpp, 2)) + self.assertEqual(line.python_rate, -8.650) + self.assertEqual(line.total, -50.71) diff --git a/l10n_ch_hr_payroll/tests/test_max_lpp.py b/l10n_ch_hr_payroll/tests/test_max_lpp.py new file mode 100644 index 0000000..2e73b4c --- /dev/null +++ b/l10n_ch_hr_payroll/tests/test_max_lpp.py @@ -0,0 +1,250 @@ +# Copyright 2017 Open Net Sàrl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import logging +import flectra.tests.common as common +from datetime import datetime, timedelta +from flectra.fields import Date + +_logger = logging.getLogger(__name__) + + +class TestMaxLPP(common.TransactionCase): + + def setUp(self): + super(TestMaxLPP, self).setUp() + + # Some salary rules references + self.basic_ch = self.ref('l10n_ch_hr_payroll.BASIC_CH') + self.gross_ch = self.ref('l10n_ch_hr_payroll.GROSS_CH') + self.net_ch = self.ref('l10n_ch_hr_payroll.NET_CH') + self.ac_c = self.ref('l10n_ch_hr_payroll.AC_C') + self.ac_c_sol = self.ref('l10n_ch_hr_payroll.AC_C_SOL') + self.ac_e = self.ref('l10n_ch_hr_payroll.AC_E') + self.ac_e_sol = self.ref('l10n_ch_hr_payroll.AC_E_SOL') + self.alfa = self.ref('l10n_ch_hr_payroll.ALFA') + self.avs_c = self.ref('l10n_ch_hr_payroll.AVS_C') + self.avs_e = self.ref('l10n_ch_hr_payroll.AVS_E') + self.pc_f_vd_c = self.ref('l10n_ch_hr_payroll.PC_F_VD_C') + self.pc_f_vd_e = self.ref('l10n_ch_hr_payroll.PC_F_VD_E') + self.laa_c = self.ref('l10n_ch_hr_payroll.LAA_C') + self.laa_e = self.ref('l10n_ch_hr_payroll.LAA_E') + self.lca_c = self.ref('l10n_ch_hr_payroll.LCA_C') + self.lca_e = self.ref('l10n_ch_hr_payroll.LCA_E') + self.lpp_c = self.ref('l10n_ch_hr_payroll.LPP_C') + self.lpp_e = self.ref('l10n_ch_hr_payroll.LPP_E') + self.imp_src = self.ref('l10n_ch_hr_payroll.IMP_SRC') + + # I create a new employee "Richard" + self.richard_emp = self.env['hr.employee'].create({ + 'name': 'Richard', + 'children': 2, + 'children_student': 1 + }) + + # List of rules needed + self.rules_for_structure = [ + self.basic_ch, + self.gross_ch, + self.net_ch, + self.ac_c, + self.ac_e, + self.ac_c_sol, + self.ac_e_sol, + self.alfa, + self.avs_c, + self.avs_e, + self.pc_f_vd_c, + self.pc_f_vd_e, + self.laa_c, + self.laa_e, + self.lca_c, + self.lca_e, + self.lpp_c, + self.lpp_e, + self.imp_src + ] + + # I create a salary structure for "Software Developer" + self.developer_pay_structure = self.env['hr.payroll.structure'].create( + { + 'name': 'Salary Structure for Software Developer', + 'code': 'SD', + 'company_id': self.ref('base.main_company'), + 'rule_ids': [(6, 0, self.rules_for_structure)], + 'parent_id': 0 + }) + + # I create a contract for "Richard" + self.richard_contract = self.env['hr.contract'].create({ + 'date_end': Date.to_string((datetime.now() + timedelta(days=365))), + 'date_start': Date.today(), + 'name': 'Contract for Richard', + 'wage_fulltime': 20000.0, + 'occupation_rate': 100.0, + 'wage': 0, + 'imp_src': 4.02, + 'lpp_rate': 8.650, + 'lpp_amount': 0, + 'type_id': self.ref('hr_contract_types.hr_contract_type_emp'), + 'employee_id': self.richard_emp.id, + 'struct_id': self.developer_pay_structure.id + }) + + self.journal = self.env['account.journal'].create({ + 'name': 'Payroll', + 'type': 'general', + 'code': 'pay' + }) + + # I create a payslip for "Richard" + self.richard_payslip = self.env['hr.payslip'].create({ + 'name': 'Payslip of Richard', + 'employee_id': self.richard_emp.id, + 'company_id': self.ref('base.main_company'), + 'contract_id': self.richard_contract.id, + 'working_days': 26, + 'journal_id': self.journal.id, + 'non_working_days': 0 + }) + + # I create payroll config with company values + self.configs = self.env['hr.payroll.config'].create({ + 'ac_limit': 12350, + 'ac_per_off_limit': 1.0, + 'ac_per_in_limit': 1.1, + 'avs_per': 5.125, + 'pc_f_vd_per': 0.06, + 'fadmin_per': 0.25, + 'laa_per': 0.46, + 'lca_per': 0.52, + 'lpp_min': 1762.50, + 'lpp_max': 7050.00, + 'fa_amount_child': 250, + 'fa_amount_student': 330, + 'fa_min_number_childs': 3, + 'fa_amount_additional': 120 + }) + + def test_max_lpp(self): + _logger.debug(' -- Test MAX -- ') + + # I click on 'Save' button on payroll configuration + self.configs.save_configs() + + # OnChange wage full-time and occupation rate to calcule wage + self.richard_contract._onchange_wage_rate_fulltime() + self.assertEqual(self.richard_contract.wage, 20000) + + # OnChange working days and non working days to calcule working rate + self.richard_payslip._onchange_working_non_working_days() + self.assertEqual(self.richard_payslip.working_rate, 100) + + # I click on 'Compute Sheet' button on payslip + self.richard_payslip.compute_sheet() + + rule_lines = self.richard_payslip.line_ids.search([ + ('salary_rule_id', 'in', self.rules_for_structure) + ]) + + _logger.debug( + 'Test w/o contract LPP and Salary above LPP MAX and SOURCE TAX') + + for line in rule_lines: + # BASIC CH + if line.salary_rule_id.id == self.basic_ch: + self.assertEqual(line.python_amount, 20000) + _logger.debug('BASIC CH %s' % line.python_amount) + + # GROSS CH + if line.salary_rule_id.id == self.gross_ch: + self.assertEqual(line.python_amount, round(20000+950, 2)) + + # NET CH + if line.salary_rule_id.id == self.net_ch: + self.assertEqual(line.python_amount, 17968.49) + + # UI (AC) + if line.salary_rule_id.id == self.ac_c: + self.assertEqual(line.python_amount, 12350) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, -220) + if line.salary_rule_id.id == self.ac_e: + self.assertEqual(line.python_amount, 12350) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, -220) + # UI (AC) - SOL + if line.salary_rule_id.id == self.ac_c_sol: + self.assertEqual( + line.python_amount, 7650) + self.assertEqual(line.python_rate, -1) + self.assertEqual(line.total, -76.50) + if line.salary_rule_id.id == self.ac_e_sol: + self.assertEqual( + line.python_amount, 7650) + self.assertEqual(line.python_rate, -1) + self.assertEqual(line.total, -76.50) + + # ALFA + if line.salary_rule_id.id == self.alfa: + self.assertEqual( + line.python_amount, + round((2*250)+330+120, 2)) + self.assertEqual(line.python_rate, 100) + self.assertEqual(line.total, 950) + + # OAI (AVS) + if line.salary_rule_id.id == self.avs_c: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -5.125) + self.assertEqual(line.total, -1025) + if line.salary_rule_id.id == self.avs_e: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -5.125) + self.assertEqual(line.total, -1025) + + # AS Families (PC Famille) + if line.salary_rule_id.id == self.pc_f_vd_c: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -0.06) + self.assertEqual(line.total, -12) + if line.salary_rule_id.id == self.pc_f_vd_e: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -0.06) + self.assertEqual(line.total, -12) + + # IMP_SRC + if line.salary_rule_id.id == self.imp_src: + self.assertEqual(line.python_amount, 20950) + self.assertEqual(line.python_rate, -4.02) + self.assertEqual(line.total, -842.19) + + # AI (LAA) + if line.salary_rule_id.id == self.laa_c: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -0.46) + self.assertEqual(line.total, -92) + if line.salary_rule_id.id == self.laa_e: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -0.46) + self.assertEqual(line.total, -92) + + # SDA (LCA) + if line.salary_rule_id.id == self.lca_c: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -0.52) + self.assertEqual(line.total, -104) + if line.salary_rule_id.id == self.lca_e: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -0.52) + self.assertEqual(line.total, -104) + + # OBP (LPP) + if line.salary_rule_id.id == self.lpp_c: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -8.650) + self.assertEqual(line.total, -609.83) + if line.salary_rule_id.id == self.lpp_e: + self.assertEqual(line.python_amount, 20000) + self.assertEqual(line.python_rate, -8.650) + self.assertEqual(line.total, -609.83) diff --git a/l10n_ch_hr_payroll/tests/test_min_lpp.py b/l10n_ch_hr_payroll/tests/test_min_lpp.py new file mode 100644 index 0000000..226f571 --- /dev/null +++ b/l10n_ch_hr_payroll/tests/test_min_lpp.py @@ -0,0 +1,249 @@ +# Copyright 2017 Open Net Sàrl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import logging +import flectra.tests.common as common +from datetime import datetime, timedelta +from flectra.fields import Date + +_logger = logging.getLogger(__name__) + + +class TestMinLPP(common.TransactionCase): + + def setUp(self): + super(TestMinLPP, self).setUp() + + # Some salary rules references + self.basic_ch = self.ref('l10n_ch_hr_payroll.BASIC_CH') + self.gross_ch = self.ref('l10n_ch_hr_payroll.GROSS_CH') + self.net_ch = self.ref('l10n_ch_hr_payroll.NET_CH') + self.ac_c = self.ref('l10n_ch_hr_payroll.AC_C') + self.ac_c_sol = self.ref('l10n_ch_hr_payroll.AC_C_SOL') + self.ac_e = self.ref('l10n_ch_hr_payroll.AC_E') + self.ac_e_sol = self.ref('l10n_ch_hr_payroll.AC_E_SOL') + self.alfa = self.ref('l10n_ch_hr_payroll.ALFA') + self.avs_c = self.ref('l10n_ch_hr_payroll.AVS_C') + self.avs_e = self.ref('l10n_ch_hr_payroll.AVS_E') + self.pc_f_vd_c = self.ref('l10n_ch_hr_payroll.PC_F_VD_C') + self.pc_f_vd_e = self.ref('l10n_ch_hr_payroll.PC_F_VD_E') + self.laa_c = self.ref('l10n_ch_hr_payroll.LAA_C') + self.laa_e = self.ref('l10n_ch_hr_payroll.LAA_E') + self.lca_c = self.ref('l10n_ch_hr_payroll.LCA_C') + self.lca_e = self.ref('l10n_ch_hr_payroll.LCA_E') + self.lpp_c = self.ref('l10n_ch_hr_payroll.LPP_C') + self.lpp_e = self.ref('l10n_ch_hr_payroll.LPP_E') + self.imp_src = self.ref('l10n_ch_hr_payroll.IMP_SRC') + + # I create a new employee "Richard" + self.richard_emp = self.env['hr.employee'].create({ + 'name': 'Richard', + 'children': 2, + 'children_student': 1 + }) + + # List of rules needed + self.rules_for_structure = [ + self.basic_ch, + self.gross_ch, + self.net_ch, + self.ac_c, + self.ac_e, + self.ac_c_sol, + self.ac_e_sol, + self.alfa, + self.avs_c, + self.avs_e, + self.pc_f_vd_c, + self.pc_f_vd_e, + self.laa_c, + self.laa_e, + self.lca_c, + self.lca_e, + self.lpp_c, + self.lpp_e, + self.imp_src + ] + + # I create a salary structure for "Software Developer" + self.developer_pay_structure = self.env['hr.payroll.structure'].create( + { + 'name': 'Salary Structure for Software Developer', + 'code': 'SD', + 'company_id': self.ref('base.main_company'), + 'rule_ids': [(6, 0, self.rules_for_structure)], + 'parent_id': 0 + }) + + # I create a contract for "Richard" + self.richard_contract = self.env['hr.contract'].create({ + 'date_end': Date.to_string((datetime.now() + timedelta(days=365))), + 'date_start': Date.today(), + 'name': 'Contract for Richard', + 'wage_fulltime': 7500.0, + 'occupation_rate': 20.0, + 'wage': 0, + 'imp_src': 0, + 'lpp_rate': 8.650, + 'lpp_amount': 0, + 'type_id': self.ref('hr_contract_types.hr_contract_type_emp'), + 'employee_id': self.richard_emp.id, + 'struct_id': self.developer_pay_structure.id + }) + + self.journal = self.env['account.journal'].create({ + 'name': 'Payroll', + 'type': 'general', + 'code': 'pay' + }) + + # I create a payslip for "Richard" + self.richard_payslip = self.env['hr.payslip'].create({ + 'name': 'Payslip of Richard', + 'employee_id': self.richard_emp.id, + 'company_id': self.ref('base.main_company'), + 'contract_id': self.richard_contract.id, + 'working_days': 26, + 'journal_id': self.journal.id, + 'non_working_days': 0 + }) + + # I create payroll config with company values + self.configs = self.env['hr.payroll.config'].create({ + 'ac_limit': 10500, + 'ac_per_off_limit': 1.0, + 'ac_per_in_limit': 1.1, + 'avs_per': 5.125, + 'pc_f_vd_per': 0.06, + 'fadmin_per': 0.25, + 'laa_per': 0.46, + 'lca_per': 0.52, + 'lpp_min': 2056.25, + 'lpp_max': 7050.00, + 'fa_amount_child': 250, + 'fa_amount_student': 330, + 'fa_min_number_childs': 3, + 'fa_amount_additional': 120 + }) + + def test_min_lpp(self): + _logger.debug(' -- Test MIN -- ') + + # I click on 'Save' button on payroll configuration + self.configs.save_configs() + + # OnChange wage full-time and occupation rate to calcule wage + self.richard_contract._onchange_wage_rate_fulltime() + self.assertEqual(self.richard_contract.wage, 1500) + + # OnChange working days and non working days to calcule working rate + self.richard_payslip._onchange_working_non_working_days() + self.assertEqual(self.richard_payslip.working_rate, 100) + + # I click on 'Compute Sheet' button on payslip + self.richard_payslip.compute_sheet() + + rule_lines = self.richard_payslip.line_ids.search([ + ('salary_rule_id', 'in', self.rules_for_structure) + ]) + + _logger.debug('Test w/o contract LPP and Salary less than LPP MIN') + + for line in rule_lines: + # BASIC CH + if line.salary_rule_id.id == self.basic_ch: + self.assertEqual(line.python_amount, 1500) + _logger.debug('BASIC CH %s' % line.python_amount) + + # GROSS CH + if line.salary_rule_id.id == self.gross_ch: + self.assertEqual(line.python_amount, round(1500+950, 2)) + + # NET CH + if line.salary_rule_id.id == self.net_ch: + self.assertEqual(line.python_amount, 2163.16) + + # UI (AC) + if line.salary_rule_id.id == self.ac_c: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, -16.50) + if line.salary_rule_id.id == self.ac_e: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, -16.50) + # UI (AC) - SOL + if line.salary_rule_id.id == self.ac_c_sol: + self.assertEqual( + line.python_amount, 0) + self.assertEqual(line.python_rate, -1) + self.assertEqual(line.total, -0) + if line.salary_rule_id.id == self.ac_e_sol: + self.assertEqual( + line.python_amount, 0) + self.assertEqual(line.python_rate, -1) + self.assertEqual(line.total, -0) + + # ALFA + if line.salary_rule_id.id == self.alfa: + self.assertEqual( + line.python_amount, + round((2*250)+330+120, 2)) + self.assertEqual(line.python_rate, 100) + self.assertEqual(line.total, 950) + + # OAI (AVS) + if line.salary_rule_id.id == self.avs_c: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -5.125) + self.assertEqual(line.total, -76.88) + if line.salary_rule_id.id == self.avs_e: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -5.125) + self.assertEqual(line.total, -76.88) + + # AS Families (PC Famille) + if line.salary_rule_id.id == self.pc_f_vd_c: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -0.06) + self.assertEqual(line.total, -0.90) + if line.salary_rule_id.id == self.pc_f_vd_e: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -0.06) + self.assertEqual(line.total, -0.90) + + # AI (LAA) + if line.salary_rule_id.id == self.laa_c: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -0.46) + self.assertEqual(line.total, -6.90) + if line.salary_rule_id.id == self.laa_e: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -0.46) + self.assertEqual(line.total, -6.90) + + # IMP_SRC + if line.salary_rule_id.id == self.imp_src: + self.assertEqual(line.python_amount, 0) + self.assertEqual(line.python_rate, 0) + self.assertEqual(line.total, 0) + + # SDA (LCA) + if line.salary_rule_id.id == self.lca_c: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -0.52) + self.assertEqual(line.total, -7.80) + if line.salary_rule_id.id == self.lca_e: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -0.52) + self.assertEqual(line.total, -7.80) + + # OBP (LPP) + if line.salary_rule_id.id == self.lpp_c: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -8.650) + self.assertEqual(line.total, -177.87) + if line.salary_rule_id.id == self.lpp_e: + self.assertEqual(line.python_amount, 1500) + self.assertEqual(line.python_rate, -8.650) + self.assertEqual(line.total, -177.87) diff --git a/l10n_ch_hr_payroll/tests/test_no_lpp_rate.py b/l10n_ch_hr_payroll/tests/test_no_lpp_rate.py new file mode 100644 index 0000000..9c67be2 --- /dev/null +++ b/l10n_ch_hr_payroll/tests/test_no_lpp_rate.py @@ -0,0 +1,255 @@ +# Copyright 2017 Open Net Sàrl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import logging +import flectra.tests.common as common +from datetime import datetime, timedelta +from flectra.fields import Date + +_logger = logging.getLogger(__name__) + + +class TestNoLPP(common.TransactionCase): + + def setUp(self): + super(TestNoLPP, self).setUp() + + # Some salary rules references + self.basic_ch = self.ref('l10n_ch_hr_payroll.BASIC_CH') + self.gross_ch = self.ref('l10n_ch_hr_payroll.GROSS_CH') + self.net_ch = self.ref('l10n_ch_hr_payroll.NET_CH') + self.ac_c = self.ref('l10n_ch_hr_payroll.AC_C') + self.ac_c_sol = self.ref('l10n_ch_hr_payroll.AC_C_SOL') + self.ac_e = self.ref('l10n_ch_hr_payroll.AC_E') + self.ac_e_sol = self.ref('l10n_ch_hr_payroll.AC_E_SOL') + self.alfa = self.ref('l10n_ch_hr_payroll.ALFA') + self.avs_c = self.ref('l10n_ch_hr_payroll.AVS_C') + self.avs_e = self.ref('l10n_ch_hr_payroll.AVS_E') + self.pc_f_vd_c = self.ref('l10n_ch_hr_payroll.PC_F_VD_C') + self.pc_f_vd_e = self.ref('l10n_ch_hr_payroll.PC_F_VD_E') + self.laa_c = self.ref('l10n_ch_hr_payroll.LAA_C') + self.laa_e = self.ref('l10n_ch_hr_payroll.LAA_E') + self.lca_c = self.ref('l10n_ch_hr_payroll.LCA_C') + self.lca_e = self.ref('l10n_ch_hr_payroll.LCA_E') + self.lpp_c = self.ref('l10n_ch_hr_payroll.LPP_C') + self.lpp_e = self.ref('l10n_ch_hr_payroll.LPP_E') + self.imp_src = self.ref('l10n_ch_hr_payroll.IMP_SRC') + + # I create a new employee "Richard" + self.richard_emp = self.env['hr.employee'].create({ + 'name': 'Richard', + 'children': 2, + 'children_student': 1 + }) + + # List of rules needed + self.rules_for_structure = [ + self.basic_ch, + self.gross_ch, + self.net_ch, + self.ac_c, + self.ac_e, + self.ac_c_sol, + self.ac_e_sol, + self.alfa, + self.avs_c, + self.avs_e, + self.pc_f_vd_c, + self.pc_f_vd_e, + self.laa_c, + self.laa_e, + self.lca_c, + self.lca_e, + self.lpp_c, + self.lpp_e, + self.imp_src + ] + + # I create a salary structure for "Software Developer" + self.developer_pay_structure = self.env['hr.payroll.structure'].create( + { + 'name': 'Salary Structure for Software Developer', + 'code': 'SD', + 'company_id': self.ref('base.main_company'), + 'rule_ids': [(6, 0, self.rules_for_structure)], + 'parent_id': 0 + }) + + # I create a contract for "Richard" + self.richard_contract = self.env['hr.contract'].create({ + 'date_end': Date.to_string((datetime.now() + timedelta(days=365))), + 'date_start': Date.today(), + 'name': 'Contract for Richard', + 'wage': 50, + 'imp_src': 0, + 'lpp_rate': 0, + 'lpp_amount': 200, + 'type_id': self.ref('hr_contract_types.hr_contract_type_emp'), + 'employee_id': self.richard_emp.id, + 'struct_id': self.developer_pay_structure.id, + 'wage_type': 'hour' + }) + + # attendances to calc the worked hours + self.env['hr.attendance'].create({ + 'employee_id': self.richard_emp.id, + 'check_in': '2017-05-14 07:30:00', + 'check_out': '2017-05-14 17:00:00' + }) + + self.env['hr.attendance'].create({ + 'employee_id': self.richard_emp.id, + 'check_in': '2017-05-17 07:30:00', + 'check_out': '2017-05-17 17:00:00' + }) + + self.journal = self.env['account.journal'].create({ + 'name': 'Payroll', + 'type': 'general', + 'code': 'pay' + }) + + # I create a payslip for "Richard" + self.richard_payslip = self.env['hr.payslip'].create({ + 'name': 'Payslip of Richard', + 'employee_id': self.richard_emp.id, + 'company_id': self.ref('base.main_company'), + 'contract_id': self.richard_contract.id, + 'date_from': '2017-05-01', + 'date_to': '2017-05-31', + 'journal_id': self.journal.id, + }) + + # I create payroll config with company values + self.configs = self.env['hr.payroll.config'].create({ + 'ac_limit': 10500, + 'ac_per_off_limit': 1.0, + 'ac_per_in_limit': 1.1, + 'avs_per': 5.125, + 'pc_f_vd_per': 0.06, + 'fadmin_per': 0.25, + 'laa_per': 0.46, + 'lca_per': 0.52, + 'lpp_min': 2056.25, + 'lpp_max': 7050.00, + 'fa_amount_child': 250, + 'fa_amount_student': 330, + 'fa_min_number_childs': 3, + 'fa_amount_additional': 120 + }) + + def test_no_lpp(self): + _logger.debug(' -- Test NO LPP RATE w/ Hours -- ') + + # I click on 'Save' button on payroll configuration + self.configs.save_configs() + + # compute worked hours based in attendances + self.richard_payslip._compute_worked_hours() + self.assertEqual(self.richard_payslip.worked_hours, 19) + + # I click on 'Compute Sheet' button on payslip + self.richard_payslip.compute_sheet() + + rule_lines = self.richard_payslip.line_ids.search([ + ('salary_rule_id', 'in', self.rules_for_structure) + ]) + + _logger.debug('Test w/o LPP RATE w/ worked hours from attendance') + + for line in rule_lines: + # BASIC CH + if line.salary_rule_id.id == self.basic_ch: + self.assertEqual(line.python_amount, 950) + _logger.debug('BASIC CH %s' % line.python_amount) + + # GROSS CH + if line.salary_rule_id.id == self.gross_ch: + self.assertEqual(line.python_amount, 1900) + + # NET CH + if line.salary_rule_id.id == self.net_ch: + self.assertEqual(line.python_amount, 1630.98) + + # UI (AC) + if line.salary_rule_id.id == self.ac_c: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, -10.45) + if line.salary_rule_id.id == self.ac_e: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -1.1) + self.assertEqual(line.total, -10.45) + # UI (AC) - SOL + if line.salary_rule_id.id == self.ac_c_sol: + self.assertEqual( + line.python_amount, 0) + self.assertEqual(line.python_rate, 0) + self.assertEqual(line.total, 0) + if line.salary_rule_id.id == self.ac_e_sol: + self.assertEqual( + line.python_amount, 0) + self.assertEqual(line.python_rate, 0) + self.assertEqual(line.total, 0) + + # ALFA + if line.salary_rule_id.id == self.alfa: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, 100) + self.assertEqual(line.total, 950) + + # IMP_SRC + if line.salary_rule_id.id == self.imp_src: + self.assertEqual(line.python_amount, 0) + self.assertEqual(line.python_rate, 0) + self.assertEqual(line.total, 0) + + # OAI (AVS) + if line.salary_rule_id.id == self.avs_c: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -5.125) + self.assertEqual(line.total, -48.69) + if line.salary_rule_id.id == self.avs_e: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -5.125) + self.assertEqual(line.total, -48.69) + + # AS Families (PC Famille) + if line.salary_rule_id.id == self.pc_f_vd_c: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -0.06) + self.assertEqual(line.total, -0.57) + if line.salary_rule_id.id == self.pc_f_vd_e: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -0.06) + self.assertEqual(line.total, -0.57) + + # AI (LAA) + if line.salary_rule_id.id == self.laa_c: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -0.46) + self.assertEqual(line.total, -4.37) + if line.salary_rule_id.id == self.laa_e: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -0.46) + self.assertEqual(line.total, -4.37) + + # SDA (LCA) + if line.salary_rule_id.id == self.lca_c: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -0.52) + self.assertEqual(line.total, -4.94) + if line.salary_rule_id.id == self.lca_e: + self.assertEqual(line.python_amount, 950) + self.assertEqual(line.python_rate, -0.52) + self.assertEqual(line.total, -4.94) + + # OBP (LPP) + if line.salary_rule_id.id == self.lpp_c: + self.assertEqual(line.python_amount, -200) + self.assertEqual(line.python_rate, -100) + self.assertEqual(line.total, -200) + if line.salary_rule_id.id == self.lpp_e: + self.assertEqual(line.python_amount, -200) + self.assertEqual(line.python_rate, -100) + self.assertEqual(line.total, -200) diff --git a/l10n_ch_hr_payroll/tests/test_wizard.py b/l10n_ch_hr_payroll/tests/test_wizard.py new file mode 100644 index 0000000..7ecfe6e --- /dev/null +++ b/l10n_ch_hr_payroll/tests/test_wizard.py @@ -0,0 +1,233 @@ +# Copyright 2017 Open Net Sàrl +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import logging +import flectra.tests.common as common + +_logger = logging.getLogger(__name__) + + +class TestWizard(common.TransactionCase): + + def setUp(self): + super(TestWizard, self).setUp() + + self.configs = self.env['hr.payroll.config'] + self.configs_default = self.configs.create({}) + + # Test 1 + self.account_1 = self.env['account.account'].search([ + ('code', '=', '5000')], limit=1) + self.account_2 = self.env['account.account'].search([ + ('code', '=', '2000')], limit=1) + self.account_3 = self.env['account.account'].search([ + ('code', '=', '5800')], limit=1) + self.account_4 = self.env['account.account'].search([ + ('code', '=', '2200')], limit=1) + self.account_5 = self.env['account.account'].search([ + ('code', '=', '5700')], limit=1) + self.account_6 = self.env['account.account'].search([ + ('code', '=', '2201')], limit=1) + self.account_7 = self.env['account.account'].search([ + ('code', '=', '5700')], limit=1) + self.account_8 = self.env['account.account'].search([ + ('code', '=', '2261')], limit=1) + self.account_9 = self.env['account.account'].search([ + ('code', '=', '5900')], limit=1) + self.account_10 = self.env['account.account'].search([ + ('code', '=', '5800')], limit=1) + + self.configs_test1 = self.configs.create({ + 'cc': self.account_1.id, + 'basic': self.account_2.id, + 'net': self.account_3.id, + 'avs_d': self.account_4.id, + 'avs_c': self.account_5.id, + 'lpp_d': self.account_6.id, + 'lpp_c': self.account_7.id, + 'laa_c': self.account_8.id, + 'staff_ins': self.account_9.id, + 'other_costs': self.account_10.id, + 'ac_limit': 11500, + 'ac_per_off_limit': 1.2, + 'ac_per_in_limit': 2.1, + 'avs_per': 5.123, + 'pc_f_vd_per': 0.06, + 'fadmin_per': 0.23, + 'laa_per': 0.49, + 'lca_per': 0.82, + 'lpp_min': 2086.25, + 'lpp_max': 7010.00, + 'fa_amount_child': 250, + 'fa_amount_student': 330, + 'fa_min_number_childs': 3, + 'fa_amount_additional': 120 + }) + + self.company = self.env.user.company_id + + # I create varius OBP contract + self.lpp_contract = self.env['lpp.contract'].create({ + 'company_id': self.company.id, + 'name': 'DC_exemple', + 'dc_amount': 24675.00 + }) + self.lpp_contract2 = self.env['lpp.contract'].create({ + 'company_id': self.company.id, + 'name': 'DC_exemple2', + 'dc_amount': 24775.00 + }) + self.lpp_contract3 = self.env['lpp.contract'].create({ + 'company_id': self.company.id, + 'name': 'DC_exemple3', + 'dc_amount': 25675.00 + }) + + def test_wizard(self): + _logger.debug(' -- Test WIZARD -- ') + + self.assertEqual(self.configs_default.ac_limit, 12350) + self.assertEqual(self.configs_default.ac_per_off_limit, 1.0) + self.assertEqual(self.configs_default.ac_per_in_limit, 1.1) + self.assertEqual(self.configs_default.avs_per, 5.125) + self.assertEqual(self.configs_default.pc_f_vd_per, 0.06) + self.assertEqual(self.configs_default.fadmin_per, 0) + self.assertEqual(self.configs_default.laa_per, 0) + self.assertEqual(self.configs_default.lca_per, 0) + self.assertEqual(self.configs_default.lpp_min, 1762.50) + self.assertEqual(self.configs_default.lpp_max, 7050.00) + self.assertEqual(self.configs_default.fa_amount_child, 0) + self.assertEqual(self.configs_default.fa_amount_student, 0) + self.assertEqual(self.configs_default.fa_min_number_childs, 3) + self.assertEqual(self.configs_default.fa_amount_additional, 0) + _logger.debug('OK : Test Defaults Wizard') + + # Delete connection with the company + self.lpp_contract2.company_id = False + self.nb_contracts_lpp = self.env['lpp.contract'].search([]) + self.assertEqual(len(self.nb_contracts_lpp), 3) + + # I click on 'Save' button on payroll configuration + self.configs_test1.save_configs() + + # See number of contracts before deleting + self.nb_contracts_lpp = self.env['lpp.contract'].search([]) + self.assertEqual(len(self.nb_contracts_lpp), 2) + _logger.debug('OK : Test if OBP contract was deleted') + + # Rules tests + def rules_acc_equal_test(self, list_rules_types, test_code, account): + all_equal = True + if len(account) != 0: + for rule_type in list_rules_types: + rule = rule_type[0] + type = rule_type[1] + rule = self.env['hr.salary.rule'].search([ + ('id', '=', self.env.ref(rule).id) + ]) + if rule: + rule = rule[0] + if type == 'debit': + res = rule.account_debit + else: + res = rule.account_credit + if res.code != test_code: + all_equal = False + return all_equal + + list_rule_cc = [ + ('l10n_ch_hr_payroll.AC_E', 'credit'), + ('l10n_ch_hr_payroll.AC_E_SOL', 'credit'), + ('l10n_ch_hr_payroll.ALFA', 'credit'), + ('l10n_ch_hr_payroll.AVS_E', 'credit'), + ('l10n_ch_hr_payroll.PC_F_VD_E', 'credit'), + ('l10n_ch_hr_payroll.BASIC_CH', 'credit'), + ('l10n_ch_hr_payroll.LAA_E', 'credit'), + ('l10n_ch_hr_payroll.LCA_E', 'credit'), + ('l10n_ch_hr_payroll.LPP_E', 'credit'), + ('l10n_ch_hr_payroll.NET_CH', 'debit') + ] + list_rule_basic = [ + ('l10n_ch_hr_payroll.BASIC_CH', 'debit') + ] + list_rule_net = [ + ('l10n_ch_hr_payroll.NET_CH', 'credit') + ] + list_rule_avs_d = [ + ('l10n_ch_hr_payroll.AC_C', 'debit'), + ('l10n_ch_hr_payroll.AC_C_SOL', 'debit'), + ('l10n_ch_hr_payroll.AC_E', 'debit'), + ('l10n_ch_hr_payroll.AC_E_SOL', 'debit'), + ('l10n_ch_hr_payroll.ALFA', 'debit'), + ('l10n_ch_hr_payroll.AVS_C', 'debit'), + ('l10n_ch_hr_payroll.AVS_E', 'debit'), + ('l10n_ch_hr_payroll.PC_F_VD_C', 'debit'), + ('l10n_ch_hr_payroll.PC_F_VD_E', 'debit'), + ('l10n_ch_hr_payroll.FADMIN', 'credit') + ] + list_rule_avs_c = [ + ('l10n_ch_hr_payroll.AC_C', 'credit'), + ('l10n_ch_hr_payroll.AC_C_SOL', 'credit'), + ('l10n_ch_hr_payroll.AVS_C', 'credit'), + ('l10n_ch_hr_payroll.PC_F_VD_C', 'credit') + ] + list_rule_lpp_d = [ + ('l10n_ch_hr_payroll.LPP_C', 'debit'), + ('l10n_ch_hr_payroll.LPP_E', 'debit') + ] + list_rule_lpp_c = [ + ('l10n_ch_hr_payroll.LPP_C', 'credit') + ] + list_rule_laa_c = [ + ('l10n_ch_hr_payroll.LAA_C', 'debit'), + ('l10n_ch_hr_payroll.LAA_E', 'debit'), + ('l10n_ch_hr_payroll.LCA_C', 'debit'), + ('l10n_ch_hr_payroll.LCA_E', 'debit') + ] + list_rule_staff_ins = [ + ('l10n_ch_hr_payroll.LAA_C', 'credit'), + ('l10n_ch_hr_payroll.LCA_C', 'credit') + ] + list_rule_other_costs = [ + ('l10n_ch_hr_payroll.FADMIN', 'debit') + ] + + # Test if all the rules from the list have the same id as given + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_cc, '5000', self.account_1)) + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_basic, '2000', self.account_2)) + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_net, '5800', self.account_3)) + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_avs_d, '2200', self.account_4)) + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_avs_c, '5700', self.account_5)) + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_lpp_d, '2201', self.account_6)) + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_lpp_c, '5700', self.account_7)) + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_laa_c, '2261', self.account_8)) + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_staff_ins, '5900', self.account_9)) + self.assertEqual(True, rules_acc_equal_test( + self, list_rule_other_costs, '5800', self.account_10)) + _logger.debug('OK : Test Saved Rules') + + # Tests if values are in company + self.assertEqual(self.company.ac_limit, 11500) + self.assertEqual(self.company.ac_per_off_limit, -1.2) + self.assertEqual(self.company.ac_per_in_limit, -2.1) + self.assertEqual(self.company.avs_per, -5.123) + self.assertEqual(self.company.pc_f_vd_per, -0.06) + self.assertEqual(self.company.fadmin_per, 0.23) + self.assertEqual(self.company.laa_per, -0.49) + self.assertEqual(self.company.lca_per, -0.82) + self.assertEqual(self.company.lpp_min, 2086.25) + self.assertEqual(self.company.lpp_max, 7010.00) + self.assertEqual(self.company.fa_amount_child, 250) + self.assertEqual(self.company.fa_amount_student, 330) + self.assertEqual(self.company.fa_min_number_childs, 3) + self.assertEqual(self.company.fa_amount_additional, 120) + _logger.debug('OK : Test Saved Values sent to company') diff --git a/l10n_ch_hr_payroll/views/hr_contract_view.xml b/l10n_ch_hr_payroll/views/hr_contract_view.xml new file mode 100644 index 0000000..e0702ca --- /dev/null +++ b/l10n_ch_hr_payroll/views/hr_contract_view.xml @@ -0,0 +1,26 @@ + + + + hr.contract.form.inherit_ch_01 + hr.contract + + + + + + + + + + + + + + + + + + + + + diff --git a/l10n_ch_hr_payroll/views/hr_employee_view.xml b/l10n_ch_hr_payroll/views/hr_employee_view.xml new file mode 100644 index 0000000..086c516 --- /dev/null +++ b/l10n_ch_hr_payroll/views/hr_employee_view.xml @@ -0,0 +1,15 @@ + + + + hr.employee.form.inherit_ch_01 + hr.employee + + + form + + + + + + + diff --git a/l10n_ch_hr_payroll/views/hr_payroll_config_view.xml b/l10n_ch_hr_payroll/views/hr_payroll_config_view.xml new file mode 100644 index 0000000..4c4fd33 --- /dev/null +++ b/l10n_ch_hr_payroll/views/hr_payroll_config_view.xml @@ -0,0 +1,159 @@ + + + + hr.payroll.config.form + hr.payroll.config + +
+ + +
+

General

+
+ + + + + +
+

Standard Rules

+
+ + + + + + + + + + + + + +
+

Special Rules

+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ + + Payroll Configuration + ir.actions.act_window + hr.payroll.config + form + + new + + + +
diff --git a/l10n_ch_hr_payroll/views/hr_payroll_view.xml b/l10n_ch_hr_payroll/views/hr_payroll_view.xml new file mode 100644 index 0000000..ab2dd62 --- /dev/null +++ b/l10n_ch_hr_payroll/views/hr_payroll_view.xml @@ -0,0 +1,31 @@ + + + + hr.salary.rule.list_l10n_ch_inherit1 + hr.salary.rule + + + + + sequence + + + + + + + + hr.payroll.struc_l10n_ch_inherit2 + hr.payroll.structure + + + + + sequence + + + + + + + diff --git a/l10n_ch_hr_payroll/views/hr_payslip_line_view.xml b/l10n_ch_hr_payroll/views/hr_payslip_line_view.xml new file mode 100644 index 0000000..42d1bba --- /dev/null +++ b/l10n_ch_hr_payroll/views/hr_payslip_line_view.xml @@ -0,0 +1,23 @@ + + + + hr.payslip.line.tree.inherit_ch_01 + hr.payslip.line + + + + + 1 + + + + + + 1 + + + + + + + diff --git a/l10n_ch_hr_payroll/views/hr_payslip_view.xml b/l10n_ch_hr_payroll/views/hr_payslip_view.xml new file mode 100644 index 0000000..110e6f8 --- /dev/null +++ b/l10n_ch_hr_payroll/views/hr_payslip_view.xml @@ -0,0 +1,43 @@ + + + + hr.payslip.form.inherit_ch_01 + hr.payslip + + + + + + + + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + diff --git a/l10n_ch_hr_payroll/views/hr_salary_rule_view.xml b/l10n_ch_hr_payroll/views/hr_salary_rule_view.xml new file mode 100644 index 0000000..2c856d2 --- /dev/null +++ b/l10n_ch_hr_payroll/views/hr_salary_rule_view.xml @@ -0,0 +1,23 @@ + + + + hr.salary.rule.form.inherit_ch_info + hr.salary.rule + + + + + {'readonly':[('category_id','=',%(INFO)d)]} + + + {'readonly':[('category_id','=',%(INFO)d)]} + + + {'readonly':[('category_id','=',%(INFO)d)]} + + + {'readonly':[('category_id','=',%(INFO)d)]} + + + + diff --git a/l10n_ch_hr_payroll/views/lpp_contract_view.xml b/l10n_ch_hr_payroll/views/lpp_contract_view.xml new file mode 100644 index 0000000..e4cdf6c --- /dev/null +++ b/l10n_ch_hr_payroll/views/lpp_contract_view.xml @@ -0,0 +1,15 @@ + + + + lpp.contract.form + lpp.contract + +
+ + + + +
+
+
+
diff --git a/l10n_ch_hr_payroll_report/COPYRIGHT b/l10n_ch_hr_payroll_report/COPYRIGHT new file mode 100644 index 0000000..338e368 --- /dev/null +++ b/l10n_ch_hr_payroll_report/COPYRIGHT @@ -0,0 +1,15 @@ +Most of the files are + + + + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + False + True + False + + + True + False + False + + + True + False + False + + + True + False + True + + + True + False + False + + diff --git a/l10n_ch_hr_payroll_report/i18n/de.po b/l10n_ch_hr_payroll_report/i18n/de.po new file mode 100644 index 0000000..5219bfc --- /dev/null +++ b/l10n_ch_hr_payroll_report/i18n/de.po @@ -0,0 +1,218 @@ +# Translation of Flectra Server. +# This file contains the translation of the following modules: +# * l10n_ch_hr_payroll_report +# +msgid "" +msgstr "" +"Project-Id-Version: Flectra Server 2.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-18 14:19+0000\n" +"PO-Revision-Date: 2022-01-18 15:22+0100\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"Language: de\n" +"X-Generator: Poedit 3.0\n" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Amount" +msgstr "Betrag" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__04 +msgid "April" +msgstr "April" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__08 +msgid "August" +msgstr "August" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__code +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Code" +msgstr "Code" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__code_and_name +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Code and name" +msgstr "Code und Name" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__currency_id +msgid "Currency" +msgstr "Währung" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__12 +msgid "December" +msgstr "Dezember" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__display_name +msgid "Display Name" +msgstr "Anzeigename" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_line__report_display_details_columns +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__report_display_details_columns +msgid "Display details columns" +msgstr "Detailspalten anzeigen" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__employee_id +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Employee" +msgstr "Mitarbeiter" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__02 +msgid "February" +msgstr "Februar" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Group By" +msgstr "Gruppiere nach" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__id +msgid "ID" +msgstr "ID" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_line__report_is_net_amount +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__report_is_net_amount +msgid "Is net amount" +msgstr "Ist Nettobetrag" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_line__report_is_total_rule +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__report_is_total_rule +msgid "Is total rule" +msgstr "Ist die totale Regel" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__01 +msgid "January" +msgstr "Januar" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__07 +msgid "July" +msgstr "Juli" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__06 +msgid "June" +msgstr "Juni" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule____last_update +msgid "Last Modified on" +msgstr "Zuletzt geändert am" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__03 +msgid "March" +msgstr "März" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__05 +msgid "May" +msgstr "Mai" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__month +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Month" +msgstr "Monat" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__name +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Name" +msgstr "Name" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__11 +msgid "November" +msgstr "November" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__10 +msgid "October" +msgstr "Oktober" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Pay Slip" +msgstr "Lohnabrechnung" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.actions.act_window,name:l10n_ch_hr_payroll_report.action_report_hr_payslip_yearly_report_tree +#: model:ir.ui.menu,name:l10n_ch_hr_payroll_report.menu_action_report_hr_payslip_yearly_report_tree +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_pivot +msgid "Pay Slip Yearly Report" +msgstr "Lohnabrechnung Jahresbericht" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Rate" +msgstr "Rate" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.hr_salary_rule_specific_form +msgid "Report options" +msgstr "Berichtsoptionen" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.ui.menu,name:l10n_ch_hr_payroll_report.main_menu_hr_payroll_reports +msgid "Reports" +msgstr "Berichte" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model,name:l10n_ch_hr_payroll_report.model_hr_salary_rule +msgid "Salary Rule" +msgstr "Gehaltsregel" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Search" +msgstr "Suche" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__09 +msgid "September" +msgstr "September" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Today date:" +msgstr "Heutiges Datum:" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__total +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Total" +msgstr "Gesamt" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__year +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Year" +msgstr "Jahr" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model,name:l10n_ch_hr_payroll_report.model_hr_payslip_yearly_report +msgid "Yearly HR Payslip Report" +msgstr "Lohnabrechnung Jahresbericht" diff --git a/l10n_ch_hr_payroll_report/i18n/l10n_ch_hr_payroll_report.pot b/l10n_ch_hr_payroll_report/i18n/l10n_ch_hr_payroll_report.pot new file mode 100644 index 0000000..616ead6 --- /dev/null +++ b/l10n_ch_hr_payroll_report/i18n/l10n_ch_hr_payroll_report.pot @@ -0,0 +1,216 @@ +# Translation of Flectra Server. +# This file contains the translation of the following modules: +# * l10n_ch_hr_payroll_report +# +msgid "" +msgstr "" +"Project-Id-Version: Flectra Server 2.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-14 13:27+0000\n" +"PO-Revision-Date: 2022-01-14 13:27+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Amount" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__04 +msgid "April" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__08 +msgid "August" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__code +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Code" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__code_and_name +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Code and name" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__currency_id +msgid "Currency" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__12 +msgid "December" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__display_name +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__display_name +msgid "Display Name" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_line__report_display_details_columns +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__report_display_details_columns +msgid "Display details columns" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__employee_id +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Employee" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__02 +msgid "February" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Group By" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__id +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__id +msgid "ID" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_line__report_is_net_amount +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__report_is_net_amount +msgid "Is net amount" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_line__report_is_total_rule +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule__report_is_total_rule +msgid "Is total rule" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__01 +msgid "January" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__07 +msgid "July" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__06 +msgid "June" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report____last_update +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_salary_rule____last_update +msgid "Last Modified on" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__03 +msgid "March" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__05 +msgid "May" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__month +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Month" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__name +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Name" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__11 +msgid "November" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__10 +msgid "October" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Pay Slip" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.actions.act_window,name:l10n_ch_hr_payroll_report.action_report_hr_payslip_yearly_report_tree +#: model:ir.ui.menu,name:l10n_ch_hr_payroll_report.menu_action_report_hr_payslip_yearly_report_tree +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_pivot +msgid "Pay Slip Yearly Report" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Rate" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.hr_salary_rule_specific_form +msgid "Report options" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.ui.menu,name:l10n_ch_hr_payroll_report.main_menu_hr_payroll_reports +msgid "Reports" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model,name:l10n_ch_hr_payroll_report.model_hr_salary_rule +msgid "Salary Rule" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Search" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields.selection,name:l10n_ch_hr_payroll_report.selection__hr_payslip_yearly_report__month__09 +msgid "September" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Today date:" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__total +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.report_payslip +msgid "Total" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll_report.field_hr_payslip_yearly_report__year +#: model_terms:ir.ui.view,arch_db:l10n_ch_hr_payroll_report.view_report_hr_payslip_yearly_report_filter +msgid "Year" +msgstr "" + +#. module: l10n_ch_hr_payroll_report +#: model:ir.model,name:l10n_ch_hr_payroll_report.model_hr_payslip_yearly_report +msgid "hr.payslip.yearly.report" +msgstr "" diff --git a/l10n_ch_hr_payroll_report/models/__init__.py b/l10n_ch_hr_payroll_report/models/__init__.py new file mode 100644 index 0000000..b2c10f0 --- /dev/null +++ b/l10n_ch_hr_payroll_report/models/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2017 Julien Coux (Camptocamp) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import hr_payslip_yearly_report +from . import hr_salary_rule diff --git a/l10n_ch_hr_payroll_report/models/hr_payslip_yearly_report.py b/l10n_ch_hr_payroll_report/models/hr_payslip_yearly_report.py new file mode 100644 index 0000000..24b7af2 --- /dev/null +++ b/l10n_ch_hr_payroll_report/models/hr_payslip_yearly_report.py @@ -0,0 +1,66 @@ +# Copyright 2017 Julien Coux (Camptocamp) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from flectra import tools +from flectra import models, fields + + +class HrPayslipYearlyReport(models.Model): + _name = 'hr.payslip.yearly.report' + _description = 'Yearly HR Payslip Report' + _auto = False + + employee_id = fields.Many2one( + comodel_name='hr.employee', + string='Employee' + ) + + code = fields.Char( + string='Code', + ) + name = fields.Char( + string='Name', + ) + code_and_name = fields.Char( + string='Code and name', + ) + year = fields.Char( + string='Year', + ) + month = fields.Selection( + selection=[ + ('01', 'January'), ('02', 'February'), ('03', 'March'), + ('04', 'April'), ('05', 'May'), ('06', 'June'), + ('07', 'July'), ('08', 'August'), ('09', 'September'), + ('10', 'October'), ('11', 'November'), ('12', 'December') + ], + ) + total = fields.Monetary( + string='Total' + ) + currency_id = fields.Many2one( + comodel_name='res.currency', + string='Currency' + ) + + def init(self): + tools.drop_view_if_exists(self._cr, 'hr_payslip_yearly_report') + query = """CREATE or REPLACE VIEW hr_payslip_yearly_report as ( +SELECT + hpl.id AS id, + hp.employee_id AS employee_id, + hpl.code AS code, + hpl.name AS name, + hpl.code || ' - ' || hpl.name AS code_and_name, + TO_CHAR(hp.date_from, 'YYYY') as year, + TO_CHAR(hp.date_from, 'MM') as month, + hpl.total AS total, + c.currency_id AS currency_id +FROM + hr_payslip_line hpl +INNER JOIN + hr_payslip hp ON hpl.slip_id = hp.id +INNER JOIN + res_company c ON hp.company_id = c.id + )""" + self._cr.execute(query) diff --git a/l10n_ch_hr_payroll_report/models/hr_salary_rule.py b/l10n_ch_hr_payroll_report/models/hr_salary_rule.py new file mode 100644 index 0000000..58036bd --- /dev/null +++ b/l10n_ch_hr_payroll_report/models/hr_salary_rule.py @@ -0,0 +1,21 @@ +# Copyright 2017 Julien Coux (Camptocamp) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from flectra import models, fields + + +class HrSalaryRule(models.Model): + _inherit = 'hr.salary.rule' + + report_is_total_rule = fields.Boolean( + string='Is total rule', + ) + + report_display_details_columns = fields.Boolean( + string='Display details columns', + default=True, + ) + + report_is_net_amount = fields.Boolean( + string='Is net amount', + ) diff --git a/l10n_ch_hr_payroll_report/report/report_payslip.xml b/l10n_ch_hr_payroll_report/report/report_payslip.xml new file mode 100644 index 0000000..125b4e5 --- /dev/null +++ b/l10n_ch_hr_payroll_report/report/report_payslip.xml @@ -0,0 +1,142 @@ + + + + + + + + diff --git a/l10n_ch_hr_payroll_report/security/ir.model.access.csv b/l10n_ch_hr_payroll_report/security/ir.model.access.csv new file mode 100644 index 0000000..66a1787 --- /dev/null +++ b/l10n_ch_hr_payroll_report/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_hr_payslip_yearly_report,hr.payslip.yearly.report,model_hr_payslip_yearly_report,hr_payroll.group_hr_payroll_manager,1,0,0,0 diff --git a/l10n_ch_hr_payroll_report/static/description/icon.png b/l10n_ch_hr_payroll_report/static/description/icon.png new file mode 100644 index 0000000..c59e295 Binary files /dev/null and b/l10n_ch_hr_payroll_report/static/description/icon.png differ diff --git a/l10n_ch_hr_payroll_report/views/hr_payslip_yearly_report.xml b/l10n_ch_hr_payroll_report/views/hr_payslip_yearly_report.xml new file mode 100644 index 0000000..286d15e --- /dev/null +++ b/l10n_ch_hr_payroll_report/views/hr_payslip_yearly_report.xml @@ -0,0 +1,48 @@ + + + + + + + hr.payslip.yearly.report.select + hr.payslip.yearly.report + + + + + + + + + + + + + + + + + + + + + hr.payslip.yearly.report.pivot + hr.payslip.yearly.report + + + + + + + + + + + + Pay Slip Yearly Report + hr.payslip.yearly.report + pivot + + + diff --git a/l10n_ch_hr_payroll_report/views/hr_salary_rule.xml b/l10n_ch_hr_payroll_report/views/hr_salary_rule.xml new file mode 100644 index 0000000..d600347 --- /dev/null +++ b/l10n_ch_hr_payroll_report/views/hr_salary_rule.xml @@ -0,0 +1,26 @@ + + + + + + + hr.salary.rule.specific.form + hr.salary.rule + + + + + + + + + + + + + + + + + diff --git a/l10n_ch_hr_payroll_report/views/menu.xml b/l10n_ch_hr_payroll_report/views/menu.xml new file mode 100644 index 0000000..9a4d1f9 --- /dev/null +++ b/l10n_ch_hr_payroll_report/views/menu.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + diff --git a/l10n_ch_invoice_reports/data/reports.xml b/l10n_ch_invoice_reports/data/reports.xml index 42c1f34..fffc7b6 100644 --- a/l10n_ch_invoice_reports/data/reports.xml +++ b/l10n_ch_invoice_reports/data/reports.xml @@ -13,10 +13,12 @@ 'Invoice-ISR-%s' % object.name + + report - Invoice with ISR + Invoice with QR account.move qweb-pdf l10n_ch_invoice_reports.invoice_qr_report_main @@ -24,6 +26,8 @@ 'Invoice-QR-%s' % object.name + + report @@ -39,5 +43,7 @@ 'Invoice-QR-ISR-%s' % object.name + + report diff --git a/l10n_ch_invoice_reports/i18n/l10n_ch_invoice_reports.pot b/l10n_ch_invoice_reports/i18n/l10n_ch_invoice_reports.pot index a3b7ea4..ab098c9 100644 --- a/l10n_ch_invoice_reports/i18n/l10n_ch_invoice_reports.pot +++ b/l10n_ch_invoice_reports/i18n/l10n_ch_invoice_reports.pot @@ -42,12 +42,17 @@ msgstr "" #: model:ir.actions.report,name:l10n_ch_invoice_reports.account_move_isr_report #: model:ir.actions.report,name:l10n_ch_invoice_reports.account_move_qr_report msgid "Invoice with ISR" -msgstr "" +msgstr "Rechnung mit ESR" + +#. module: l10n_ch_invoice_reports +#: model:ir.actions.report,name:l10n_ch_invoice_reports.account_move_qr_report +msgid "Invoice with QR" +msgstr "Rechnung mit QR" #. module: l10n_ch_invoice_reports #: model:ir.actions.report,name:l10n_ch_invoice_reports.account_move_qr_isr_report msgid "Invoice with QR and ISR" -msgstr "" +msgstr "Rechnung mit QR und ESR" #. module: l10n_ch_invoice_reports #: model:ir.model.fields,field_description:l10n_ch_invoice_reports.field_ir_actions_report____last_update diff --git a/l10n_ch_report_optional/__init__.py b/l10n_ch_report_optional/__init__.py new file mode 100644 index 0000000..013872c --- /dev/null +++ b/l10n_ch_report_optional/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details. + +from . import models diff --git a/l10n_ch_report_optional/__manifest__.py b/l10n_ch_report_optional/__manifest__.py new file mode 100644 index 0000000..32ab177 --- /dev/null +++ b/l10n_ch_report_optional/__manifest__.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details. +# Main contributor: Nicolas Bessi. Camptocamp SA +# Financial contributors: Hasa SA, Open Net SA, +# Prisme Solutions Informatique SA, Quod SA +# Translation contributors: brain-tec AG, Agile Business Group +{ + 'name': "Switzerland - Accounting Optional Reports as Attachments", + 'description': """ + Add some parameters to define if ISR or QR Bill should be added automatically + """, + 'version': '1.0.1.0', + 'category': 'Accounting', + 'depends': ['l10n_ch'], + 'data': [ + 'views/res_config_settings_views.xml', + ], + 'license': 'LGPL-3', +} diff --git a/l10n_ch_report_optional/models/__init__.py b/l10n_ch_report_optional/models/__init__.py new file mode 100644 index 0000000..7d99f60 --- /dev/null +++ b/l10n_ch_report_optional/models/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details. + +from . import res_config_settings +from . import mail_template +from . import res_company diff --git a/l10n_ch_report_optional/models/mail_template.py b/l10n_ch_report_optional/models/mail_template.py new file mode 100644 index 0000000..5e471fe --- /dev/null +++ b/l10n_ch_report_optional/models/mail_template.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details. + +import base64 + +from flectra import api, models +from flectra.addons.l10n_ch.models.mail_template import MailTemplate + + +def generate_email(self, res_ids, fields): + """ Method overridden in order to add an attachment containing the ISR + to the draft message when opening the 'send by mail' wizard on an invoice. + This attachment generation will only occur if all the required data are + present on the invoice. Otherwise, no ISR attachment will be created, and + the mail will only contain the invoice (as defined in the mother method). + """ + result = super(MailTemplate, self).generate_email(res_ids, fields) + if self.model != 'account.move': + return result + + multi_mode = True + if isinstance(res_ids, int): + res_ids = [res_ids] + multi_mode = False + + if self.model == 'account.move': + for record in self.env[self.model].browse(res_ids): + if record.move_type != 'out_invoice': + continue + inv_print_name = self._render_field('report_name', record.ids, compute_lang=True)[record.id] + new_attachments = [] + if not self.env.company.l10n_ignore_qr_when_reconciled or record.payment_state != 'paid': + if record.l10n_ch_isr_valid and self.env.company.l10n_add_isr_pdf: + # We add an attachment containing the ISR + isr_report_name = 'ISR-' + inv_print_name + '.pdf' + isr_pdf = self.env.ref('l10n_ch.l10n_ch_isr_report')._render_qweb_pdf(record.ids)[0] + isr_pdf = base64.b64encode(isr_pdf) + new_attachments.append((isr_report_name, isr_pdf)) + + if record.partner_bank_id._eligible_for_qr_code('ch_qr', record.partner_id, record.currency_id) and self.env.company.l10n_add_qr_pdf: + # We add an attachment containing the QR-bill + qr_report_name = 'QR-bill-' + inv_print_name + '.pdf' + qr_pdf = self.env.ref('l10n_ch.l10n_ch_qr_report')._render_qweb_pdf(record.ids)[0] + qr_pdf = base64.b64encode(qr_pdf) + new_attachments.append((qr_report_name, qr_pdf)) + + record_dict = multi_mode and result[record.id] or result + attachments_list = record_dict.get('attachments', False) + if attachments_list: + attachments_list.extend(new_attachments) + else: + record_dict['attachments'] = new_attachments + + return result + + +# Patch / Override existing Method +MailTemplate.generate_email = generate_email diff --git a/l10n_ch_report_optional/models/res_company.py b/l10n_ch_report_optional/models/res_company.py new file mode 100644 index 0000000..f7fe709 --- /dev/null +++ b/l10n_ch_report_optional/models/res_company.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details. + +from flectra import fields, models + + +class Company(models.Model): + _inherit = "res.company" + + l10n_add_isr_pdf = fields.Boolean( + string='ISR-PDF', + ) + l10n_add_qr_pdf = fields.Boolean( + string='QR-PDF', + ) + l10n_ignore_qr_when_reconciled = fields.Boolean( + string='Ignore QR when reconciled', + help='Do not add QR Bill when invoice is reconciled', + ) diff --git a/l10n_ch_report_optional/models/res_config_settings.py b/l10n_ch_report_optional/models/res_config_settings.py new file mode 100644 index 0000000..cd8639d --- /dev/null +++ b/l10n_ch_report_optional/models/res_config_settings.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details. + +from flectra import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + l10n_add_isr_pdf = fields.Boolean( + related='company_id.l10n_add_isr_pdf', + readonly=False, + ) + l10n_add_qr_pdf = fields.Boolean( + related='company_id.l10n_add_qr_pdf', + readonly=False, + ) + l10n_ignore_qr_when_reconciled = fields.Boolean( + related='company_id.l10n_ignore_qr_when_reconciled', + readonly=False, + ) diff --git a/l10n_ch_report_optional/views/res_config_settings_views.xml b/l10n_ch_report_optional/views/res_config_settings_views.xml new file mode 100644 index 0000000..371908f --- /dev/null +++ b/l10n_ch_report_optional/views/res_config_settings_views.xml @@ -0,0 +1,53 @@ + + + + + res.config.settings.view.form.inherit.l10n.ch + res.config.settings + + + +

Send & Print: adds additional single pdf

+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+