Skip to content

Commit

Permalink
[IMP] payroll: pre-commit execution
Browse files Browse the repository at this point in the history
  • Loading branch information
regispirard committed Nov 16, 2024
1 parent 9530514 commit f2d45b4
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 59 deletions.
30 changes: 16 additions & 14 deletions payroll/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ Payroll
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpayroll-lightgray.png?logo=github
:target: https://github.com/OCA/payroll/tree/17.0/payroll
:target: https://github.com/OCA/payroll/tree/18.0/payroll
:alt: OCA/payroll
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/payroll-17-0/payroll-17-0-payroll
:target: https://translation.odoo-community.org/projects/payroll-18-0/payroll-18-0-payroll
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/payroll&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/payroll&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Manage your employee payroll records.

This module is a backport from Odoo SA and as such, it is not included in the OCA CLA. That means we do not have a copy of the copyright on it like all other OCA modules.
This module is a backport from Odoo SA and as such, it is not included
in the OCA CLA. That means we do not have a copy of the copyright on it
like all other OCA modules.

**Table of contents**

Expand All @@ -43,29 +45,29 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/payroll/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/payroll/issues/new?body=module:%20payroll%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/payroll/issues/new?body=module:%20payroll%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~
-------

* Odoo SA

Contributors
~~~~~~~~~~~~
------------

* Odoo SA <[email protected]>
* David James <[email protected]>
* Hilar AK <[email protected]>
* Nimarosa (Nicolas Rodriguez) <[email protected]>
* Henrik Norlin (@appstogrow)
- Odoo SA <[email protected]>
- David James <[email protected]>
- Hilar AK <[email protected]>
- Nimarosa (Nicolas Rodriguez) <[email protected]>
- Henrik Norlin (@appstogrow)

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -88,6 +90,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-appstogrow| |maintainer-nimarosa|

This module is part of the `OCA/payroll <https://github.com/OCA/payroll/tree/17.0/payroll>`_ project on GitHub.
This module is part of the `OCA/payroll <https://github.com/OCA/payroll/tree/18.0/payroll>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions payroll/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Odoo SA \<<[email protected]>\>
- David James \<<[email protected]>\>
- Hilar AK \<<[email protected]>\>
- Nimarosa (Nicolas Rodriguez) \<<[email protected]>\>
- Henrik Norlin (@appstogrow)
5 changes: 0 additions & 5 deletions payroll/readme/CONTRIBUTORS.rst

This file was deleted.

5 changes: 5 additions & 0 deletions payroll/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Manage your employee payroll records.

This module is a backport from Odoo SA and as such, it is not included
in the OCA CLA. That means we do not have a copy of the copyright on it
like all other OCA modules.
3 changes: 0 additions & 3 deletions payroll/readme/DESCRIPTION.rst

This file was deleted.

21 changes: 13 additions & 8 deletions payroll/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -368,9 +369,11 @@ <h1 class="title">Payroll</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:def4f708faf4767d5767c515426c572391d63f2a30ffde152f86d3a019c0b920
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/payroll/tree/17.0/payroll"><img alt="OCA/payroll" src="https://img.shields.io/badge/github-OCA%2Fpayroll-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/payroll-17-0/payroll-17-0-payroll"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/payroll&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/payroll/tree/18.0/payroll"><img alt="OCA/payroll" src="https://img.shields.io/badge/github-OCA%2Fpayroll-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/payroll-18-0/payroll-18-0-payroll"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/payroll&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Manage your employee payroll records.</p>
<p>This module is a backport from Odoo SA and as such, it is not included in the OCA CLA. That means we do not have a copy of the copyright on it like all other OCA modules.</p>
<p>This module is a backport from Odoo SA and as such, it is not included
in the OCA CLA. That means we do not have a copy of the copyright on it
like all other OCA modules.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -388,7 +391,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/payroll/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/payroll/issues/new?body=module:%20payroll%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/payroll/issues/new?body=module:%20payroll%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -412,13 +415,15 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/appstogrow"><img alt="appstogrow" src="https://github.com/appstogrow.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/nimarosa"><img alt="nimarosa" src="https://github.com/nimarosa.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/payroll/tree/17.0/payroll">OCA/payroll</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/payroll/tree/18.0/payroll">OCA/payroll</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion payroll/views/hr_payslip_line_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<field name="model">hr.payslip.line</field>
<field name="arch" type="xml">
<tree editable="bottom" decoration-info="total == 0">

<field name="allow_edit_payslip_lines" column_invisible="1" />
<field name="category_id" />
<field name="employee_id" column_invisible="1" />
Expand Down
38 changes: 19 additions & 19 deletions payroll/views/hr_salary_rule_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
role="alert"
invisible="amount_select != 'code'"
>
<p>
<p>
If you have doubts about coding salary rules, check the "Help" tab in this form.
</p>
</div>
</div>
<sheet>
<label for="name" class="oe_edit_only" />
<h1>
Expand Down Expand Up @@ -211,7 +211,7 @@
<div class="alert alert-info" role="alert">
<p>
Child rule functionality is useful when you need other rules to be computed before the parent one. <br
/>
/>
This means that all salary rules declared as childs (parent of one rule) will be added to the computation
if its parent rule is included in the salary structure. So child rules will only be computed if it's parent is
computed. <br />
Expand Down Expand Up @@ -244,51 +244,51 @@
<ul>
<li>
<code
>payslip:</code> contains current payslip object data (hr.payslip)
>payslip:</code> contains current payslip object data (hr.payslip)
</li>
<li>
<code
>payslips:</code> contains payslips data (Payslips - Browsable Object)
>payslips:</code> contains payslips data (Payslips - Browsable Object)
</li>
<li>
<code
>employee:</code> contains current employee object data (hr.employee)
>employee:</code> contains current employee object data (hr.employee)
</li>
<li>
<code
>contract:</code> contains current contract object data (hr.contract)
>contract:</code> contains current contract object data (hr.contract)
</li>
<li>
<code
>rules:</code> contains the rules code (previusly computed)
>rules:</code> contains the rules code (previusly computed)
</li>
<li>
<code
>categories:</code> contains the sum of amount of all rules belonging to that category
>categories:</code> contains the sum of amount of all rules belonging to that category
</li>
<li>
<code
>worked_days:</code> contains the computed worked days data
>worked_days:</code> contains the computed worked days data
</li>
<li>
<code
>inputs:</code> contains the computed input data
>inputs:</code> contains the computed input data
</li>
<li>
<code
>payroll:</code> contains miscellaneous values related to payroll
>payroll:</code> contains miscellaneous values related to payroll
</li>
<li>
<code
>current_contract:</code> contains values related/calculated for current contract
>current_contract:</code> contains values related/calculated for current contract
</li>
<li>
<code
>result_rules:</code> contains the values of previusly computed lines (qty, rate, amount, total)
>result_rules:</code> contains the values of previusly computed lines (qty, rate, amount, total)
</li>
<li>
<code
>tools:</code> contains tools and libraries which help with mathematical operations
>tools:</code> contains tools and libraries which help with mathematical operations
</li>
</ul>
<p>
Expand All @@ -299,19 +299,19 @@
<ul>
<li>
<code
>result:</code> the returned value should be in this variable. It matches with "amount" column.
>result:</code> the returned value should be in this variable. It matches with "amount" column.
</li>
<li>
<code
>result_rate:</code> the rate that should be applied to "result"
>result_rate:</code> the rate that should be applied to "result"
</li>
<li>
<code
>result_qty:</code> the quantity of units that will be multiplied to "result"
>result_qty:</code> the quantity of units that will be multiplied to "result"
</li>
<li>
<code
>result_name:</code> overrides the current name of the rule and allows to make dynamic names
>result_name:</code> overrides the current name of the rule and allows to make dynamic names
</li>
</ul>
<h3>Examples</h3>
Expand Down
1 change: 0 additions & 1 deletion payroll/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
<field name="require_code_and_category" />
</setting>
</block>

</app>
</xpath>
</field>
Expand Down
10 changes: 5 additions & 5 deletions payroll/wizard/hr_payroll_send_email.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
name="subject"
>Payslip for {{object.payslip_run_id.name}} from {{object.company_id.name}}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear <t t-out="object.employee_id.name" />,
<br /><br />
Please find attached the payslip for <t
t-out="object.payslip_run_id.name"
/>.
t-out="object.payslip_run_id.name"
/>.
<br /><br />
Do not hesitate to contact us if you have any questions.
<br /><br />
<t t-out="user.signature" />
</p>
</div>
</div>
</field>
<field
name="report_template_ids"
Expand Down
6 changes: 3 additions & 3 deletions payroll/wizard/hr_payslip_change_state_view.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--Copyright 2019 - Eficent http://www.eficent.com/-->
<!--Copyright 2019 Serpent Consulting Services Pvt. Ltd.-->
<!--License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).-->
<!--Copyright 2019 - Eficent http://www.eficent.com/-->
<!--Copyright 2019 Serpent Consulting Services Pvt. Ltd.-->
<!--License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).-->
<record id="hr_payslip_change_state_form" model="ir.ui.view">
<field name="name">hr.payslip.change.state.form</field>
<field name="model">hr.payslip.change.state</field>
Expand Down

0 comments on commit f2d45b4

Please sign in to comment.