From e985e78094653b0d4bd6668149b25d570e14c6d0 Mon Sep 17 00:00:00 2001 From: Saran440 Date: Tue, 25 Jun 2024 09:37:12 +0700 Subject: [PATCH] [MIG] hr_expense_journal: Migration to 16.0 --- hr_expense_journal/README.rst | 10 +++++----- hr_expense_journal/__manifest__.py | 2 +- hr_expense_journal/models/hr_expense.py | 11 +++++++---- hr_expense_journal/static/description/index.html | 7 +++---- hr_expense_journal/views/hr_expense_views.xml | 4 +++- 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/hr_expense_journal/README.rst b/hr_expense_journal/README.rst index a2a2adc38..32ec28179 100644 --- a/hr_expense_journal/README.rst +++ b/hr_expense_journal/README.rst @@ -17,13 +17,13 @@ Select Expense Journal :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/15.0/hr_expense_journal + :target: https://github.com/OCA/hr-expense/tree/16.0/hr_expense_journal :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-15-0/hr-expense-15-0-hr_expense_journal + :target: https://translation.odoo-community.org/projects/hr-expense-16-0/hr-expense-16-0-hr_expense_journal :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=15.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/hr-expense&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -56,7 +56,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -99,6 +99,6 @@ Current `maintainer `__: |maintainer-dreispt| -This module is part of the `OCA/hr-expense `_ project on GitHub. +This module is part of the `OCA/hr-expense `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_expense_journal/__manifest__.py b/hr_expense_journal/__manifest__.py index 164b059e4..63b9c0715 100644 --- a/hr_expense_journal/__manifest__.py +++ b/hr_expense_journal/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Select Expense Journal", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "author": "Open Source Integrators, Odoo Community Association (OCA)", "summary": "Set the Journal for the payment type used to pay the expense", "website": "https://github.com/OCA/hr-expense", diff --git a/hr_expense_journal/models/hr_expense.py b/hr_expense_journal/models/hr_expense.py index 50df22082..2b4ca0bb9 100644 --- a/hr_expense_journal/models/hr_expense.py +++ b/hr_expense_journal/models/hr_expense.py @@ -7,10 +7,13 @@ class HrExpense(models.Model): _inherit = "hr.expense" - payment_type_id = fields.Many2one("account.journal", string="Payment Journal") + payment_type_id = fields.Many2one( + comodel_name="account.journal", string="Payment Journal" + ) def _get_default_expense_sheet_values(self): - context = super()._get_default_expense_sheet_values() + values = super()._get_default_expense_sheet_values() if self.payment_type_id: - context["default_bank_journal_id"] = self.payment_type_id.id - return context + for val in values: + val["bank_journal_id"] = self.payment_type_id.id + return values diff --git a/hr_expense_journal/static/description/index.html b/hr_expense_journal/static/description/index.html index 96425131a..5dcb92d1c 100644 --- a/hr_expense_journal/static/description/index.html +++ b/hr_expense_journal/static/description/index.html @@ -1,4 +1,3 @@ - @@ -369,7 +368,7 @@

Select Expense Journal

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:9be5ee9c1766cd620d2beeb42878dbf715a46f41012c84faebf31f03a4f23e3b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

Employees can pay for expenses using company Credit Cards.

In this case, there is the need for the Expense to identify what Credit Card was used for that payment.

@@ -403,7 +402,7 @@

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

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

@@ -434,7 +433,7 @@

Maintainers

promote its widespread use.

Current maintainer:

dreispt

-

This module is part of the OCA/hr-expense project on GitHub.

+

This module is part of the OCA/hr-expense project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/hr_expense_journal/views/hr_expense_views.xml b/hr_expense_journal/views/hr_expense_views.xml index ca1e6e244..6092797b5 100644 --- a/hr_expense_journal/views/hr_expense_views.xml +++ b/hr_expense_journal/views/hr_expense_views.xml @@ -16,7 +16,9 @@ hr.expense.sheet - + + +