Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] hr_expense_payment: Migration to 18.0 #280

Merged
merged 26 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
958f048
[14.0][ADD] hr_expense_payment
Saran440 Jul 27, 2021
1fb90c1
[ENH] hr_expense_cancel depend on hr_expense_payment
Saran440 Jul 27, 2021
3117aaf
[UPD] Update hr_expense_payment.pot
oca-travis Mar 5, 2022
8af8d1d
[UPD] README.rst
OCA-git-bot Mar 5, 2022
58e36ee
[IMP] update dotfiles [ci skip]
OCA-git-bot Mar 30, 2022
288a719
[MIG]hr_expense_payment: Migration to 15.0
manuelregidor Apr 25, 2022
e209ca1
[UPD] Update hr_expense_payment.pot
Apr 26, 2022
cb26762
[UPD] README.rst
OCA-git-bot Apr 26, 2022
caf1f0b
[MIG] hr_expense_payment: Migration to 16.0
AungKoKoLin1997 Nov 24, 2022
956f61c
[UPD] Update hr_expense_payment.pot
Jun 19, 2023
dac1f33
[UPD] README.rst
OCA-git-bot Jun 19, 2023
e242daf
Added translation using Weblate (Italian)
mymage Jun 28, 2023
4aee4df
Translated using Weblate (Italian)
mymage Jun 28, 2023
7069276
[UPD] README.rst
OCA-git-bot Sep 3, 2023
c797712
[FIX] no create payments with paid by company
Saran440 May 19, 2022
cd2e59b
[UPD] Update hr_expense_payment.pot
Nov 30, 2023
0cf4e03
[BOT] post-merge updates
OCA-git-bot Nov 30, 2023
57cb790
Update translation files
weblate Nov 30, 2023
c71a6fa
[IMP] hr_expense_payment: pre-commit auto fixes
peluko00 Apr 4, 2024
69560c7
[MIG] hr_expense_payment: Migration to 17.0
peluko00 Apr 4, 2024
02e018f
[UPD] Update hr_expense_payment.pot
May 24, 2024
c9932e4
[BOT] post-merge updates
OCA-git-bot May 24, 2024
8692a69
[FIX] hr_expense_payment: Fix + improve tests
victoralmau Nov 27, 2024
72ceb08
[BOT] post-merge updates
OCA-git-bot Nov 27, 2024
6660847
[MIG] hr_expense_payment: Migration to 18.0
lef-adhoc Dec 4, 2024
a82dace
[IMP] hr_expense_payment: Optimize _create_payment_vals_from_batch me…
lef-adhoc Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[IMP] hr_expense_payment: pre-commit auto fixes
  • Loading branch information
peluko00 authored and lef-adhoc committed Dec 4, 2024
commit c71a6fa05627db278c4ba0f6e0e28ae078bce19f
24 changes: 12 additions & 12 deletions hr_expense_payment/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ HR Expense Payment
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github
:target: https://github.com/OCA/hr-expense/tree/16.0/hr_expense_payment
:target: https://github.com/OCA/hr-expense/tree/17.0/hr_expense_payment
:alt: OCA/hr-expense
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-expense-16-0/hr-expense-16-0-hr_expense_payment
:target: https://translation.odoo-community.org/projects/hr-expense-17-0/hr-expense-17-0-hr_expense_payment
: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/hr-expense&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr-expense&target_branch=17.0
:alt: Try me on Runboat

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

This module allow payment link to expense.
After you register payment on expense sheet, it will link between expense sheet and payment.
This module allow payment link to expense. After you register payment on
expense sheet, it will link between expense sheet and payment.

**Table of contents**

Expand All @@ -42,27 +42,27 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-expense/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/hr-expense/issues/new?body=module:%20hr_expense_payment%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_payment%0Aversion:%2017.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
~~~~~~~
-------

* Tecnativa
* Ecosoft

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

* Saran Lim. <[email protected]>
* Manuel Regidor <[email protected]>
- Saran Lim. <[email protected]>
- Manuel Regidor <[email protected]>

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

This module is maintained by the OCA.

Expand All @@ -74,6 +74,6 @@ 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.

This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/16.0/hr_expense_payment>`_ project on GitHub.
This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/17.0/hr_expense_payment>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion hr_expense_payment/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def post_init_hook(cr, registry):
amls = sheet.account_move_id.mapped("line_ids")
reconcile = amls.mapped("full_reconcile_id")
aml_payment = reconcile.mapped("reconciled_line_ids").filtered(
lambda r: r not in amls
lambda r, amls=amls: r not in amls
)
payment = aml_payment.mapped("payment_id")
payment.write({"expense_sheet_ids": sheet.ids})
3 changes: 3 additions & 0 deletions hr_expense_payment/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions hr_expense_payment/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Saran Lim. \<<[email protected]>\>
- Manuel Regidor \<<[email protected]>\>
2 changes: 0 additions & 2 deletions hr_expense_payment/readme/CONTRIBUTORS.rst

This file was deleted.

2 changes: 2 additions & 0 deletions hr_expense_payment/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module allow payment link to expense. After you register payment on
expense sheet, it will link between expense sheet and payment.
2 changes: 0 additions & 2 deletions hr_expense_payment/readme/DESCRIPTION.rst

This file was deleted.

10 changes: 5 additions & 5 deletions hr_expense_payment/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,9 @@ <h1 class="title">HR Expense Payment</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9db39c5993fb1cd1ebd051a9a23ecb248b1daabe3687cad390dee28b9d7193f7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/hr-expense/tree/16.0/hr_expense_payment"><img alt="OCA/hr-expense" src="https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/hr-expense-16-0/hr-expense-16-0-hr_expense_payment"><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/hr-expense&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allow payment link to expense.
After you register payment on expense sheet, it will link between expense sheet and payment.</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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/hr-expense/tree/17.0/hr_expense_payment"><img alt="OCA/hr-expense" src="https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/hr-expense-17-0/hr-expense-17-0-hr_expense_payment"><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/hr-expense&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>This module allow payment link to expense. After you register payment on
expense sheet, it will link between expense sheet and payment.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -389,7 +389,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/hr-expense/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/hr-expense/issues/new?body=module:%20hr_expense_payment%0Aversion:%2016.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/hr-expense/issues/new?body=module:%20hr_expense_payment%0Aversion:%2017.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 @@ -415,7 +415,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<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>This module is part of the <a class="reference external" href="https://github.com/OCA/hr-expense/tree/16.0/hr_expense_payment">OCA/hr-expense</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/hr-expense/tree/17.0/hr_expense_payment">OCA/hr-expense</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
2 changes: 1 addition & 1 deletion hr_expense_payment/wizard/account_payment_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _create_payment_vals_from_batch(self, batch_result):
)
sheet_ids = self.env["hr.expense.sheet"].browse(expense_sheet_ids)
sheet_id = sheet_ids.filtered(
lambda l: l.account_move_id.id == move_line_ids.move_id.id
lambda x: x.account_move_id.id == move_line_ids.move_id.id
)
payment_vals.update(expense_sheet_ids=sheet_id.ids)
return payment_vals