Skip to content

Commit 9173863

Browse files
committed
Merge branch '15.0' of https://github.com/OCA/hr-expense into 15.0-mig-hr_expense_substate
2 parents d89cd85 + f9a0a99 commit 9173863

File tree

19 files changed

+675
-1
lines changed

19 files changed

+675
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ addon | version | maintainers | summary
3434
[hr_expense_sequence](hr_expense_sequence/) | 15.0.1.0.0 | | HR expense sequence
3535
[hr_expense_tax_adjust](hr_expense_tax_adjust/) | 15.0.1.1.0 | [![ps-tubtim](https://github.com/ps-tubtim.png?size=30px)](https://github.com/ps-tubtim) | Allow to edit tax amount on expenses
3636
[hr_expense_tier_validation](hr_expense_tier_validation/) | 15.0.1.0.0 | [![ps-tubtim](https://github.com/ps-tubtim.png?size=30px)](https://github.com/ps-tubtim) | Expense Tier Validation
37+
[hr_expense_widget_o2m](hr_expense_widget_o2m/) | 15.0.1.0.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | HR Expense one2many widget
3738
[sale_expense_cost_reinvoice](sale_expense_cost_reinvoice/) | 15.0.1.0.0 | [![yankinmax](https://github.com/yankinmax.png?size=30px)](https://github.com/yankinmax) | Provide cost on order line when Auto Re-invoice at cost
3839
[sale_expense_manual_reinvoice](sale_expense_manual_reinvoice/) | 15.0.1.0.1 | [![ivantodorovich](https://github.com/ivantodorovich.png?size=30px)](https://github.com/ivantodorovich) | Allow to manually re-invoice expenses
3940

hr_expense_widget_o2m/README.rst

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
==========================
2+
HR Expense one2many widget
3+
==========================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:6c546677a081405c726e44c4266ac4b8a6e6da07493d3dbbeed9a3a6d156b8a6
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github
20+
:target: https://github.com/OCA/hr-expense/tree/15.0/hr_expense_widget_o2m
21+
:alt: OCA/hr-expense
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_widget_o2m
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr-expense&target_branch=15.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Currently, if user create new expense sheet first, and then click to add expense lines,
32+
System will popup a selection window (many2many widget) allowing user to select the existing expenses first, and also to create new expense.
33+
34+
This can be confusing for some user, and might not be suitable for some use case.
35+
36+
With this module, user have option to directly add new lines on expense report (one2many widget).
37+
38+
**Table of contents**
39+
40+
.. contents::
41+
:local:
42+
43+
Configuration
44+
=============
45+
46+
Go to Human Reqsource > Expenses settings, and enable option "Use form view when add line for expense report"
47+
48+
Bug Tracker
49+
===========
50+
51+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-expense/issues>`_.
52+
In case of trouble, please check there if your issue has already been reported.
53+
If you spotted it first, help us to smash it by providing a detailed and welcomed
54+
`feedback <https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_widget_o2m%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
55+
56+
Do not contact contributors directly about support or help with technical issues.
57+
58+
Credits
59+
=======
60+
61+
Authors
62+
~~~~~~~
63+
64+
* Ecosoft
65+
66+
Contributors
67+
~~~~~~~~~~~~
68+
69+
* Kitti U. <[email protected]>
70+
71+
Maintainers
72+
~~~~~~~~~~~
73+
74+
This module is maintained by the OCA.
75+
76+
.. image:: https://odoo-community.org/logo.png
77+
:alt: Odoo Community Association
78+
:target: https://odoo-community.org
79+
80+
OCA, or the Odoo Community Association, is a nonprofit organization whose
81+
mission is to support the collaborative development of Odoo features and
82+
promote its widespread use.
83+
84+
.. |maintainer-kittiu| image:: https://github.com/kittiu.png?size=40px
85+
:target: https://github.com/kittiu
86+
:alt: kittiu
87+
88+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
89+
90+
|maintainer-kittiu|
91+
92+
This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/15.0/hr_expense_widget_o2m>`_ project on GitHub.
93+
94+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

hr_expense_widget_o2m/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
2+
3+
from . import models

hr_expense_widget_o2m/__manifest__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
3+
4+
{
5+
"name": "HR Expense one2many widget",
6+
"version": "15.0.1.0.0",
7+
"author": "Ecosoft, Odoo Community Association (OCA)",
8+
"website": "https://github.com/OCA/hr-expense",
9+
"license": "AGPL-3",
10+
"category": "Human Resources",
11+
"depends": ["hr_expense"],
12+
"data": [
13+
"security/hr_expense_security.xml",
14+
"views/res_config_settings_views.xml",
15+
"views/hr_expense_views.xml",
16+
],
17+
"installable": True,
18+
"maintainers": ["kittiu"],
19+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * hr_expense_widget_o2m
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: hr_expense_widget_o2m
17+
#: model:ir.model,name:hr_expense_widget_o2m.model_res_config_settings
18+
msgid "Config Settings"
19+
msgstr ""
20+
21+
#. module: hr_expense_widget_o2m
22+
#: model:ir.model.fields,field_description:hr_expense_widget_o2m.field_res_config_settings__group_hr_expense_widget_o2m
23+
#: model:res.groups,name:hr_expense_widget_o2m.group_hr_expense_widget_o2m
24+
msgid "Use form view when add line for expense report"
25+
msgstr ""
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
2+
3+
from . import res_config_settings
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
3+
4+
from odoo import fields, models
5+
6+
7+
class ResConfigSettings(models.TransientModel):
8+
_inherit = "res.config.settings"
9+
10+
group_hr_expense_widget_o2m = fields.Boolean(
11+
string="Use form view when add line for expense report",
12+
implied_group="hr_expense_widget_o2m.group_hr_expense_widget_o2m",
13+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Go to Human Reqsource > Expenses settings, and enable option "Use form view when add line for expense report"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Kitti U. <[email protected]>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Currently, if user create new expense sheet first, and then click to add expense lines,
2+
System will popup a selection window (many2many widget) allowing user to select the existing expenses first, and also to create new expense.
3+
4+
This can be confusing for some user, and might not be suitable for some use case.
5+
6+
With this module, user have option to directly add new lines on expense report (one2many widget).

0 commit comments

Comments
 (0)