Skip to content

Commit b8a1418

Browse files
Merge PR #453 into 16.0
Signed-off-by quentinDupont
2 parents d703c47 + 83626a1 commit b8a1418

4 files changed

Lines changed: 69 additions & 0 deletions

File tree

fermente_hr_expense/__manifest__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@
1212
"depends": ["fermente_hr", "hr_expense"],
1313
"data": [
1414
"views/menu.xml",
15+
"views/view_hr_expense.xml",
16+
"views/view_hr_expense_sheet.xml",
1517
],
1618
}

fermente_hr_expense/readme/DESCRIPTION.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ Customize Odoo / odoo / ``hr_expense`` module.
33
**Temporary**
44

55
* Hide HR Expense menu for all people, for the time being.
6+
7+
**HR Expense Form view**
8+
9+
* Allow all users to enter supplier reference.
10+
11+
12+
**HR Expense Sheet Form view**
13+
14+
* Hide journal field for non accoutants.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (C) 2025 - Today: GRAP (http://www.grap.coop)
4+
@author: Sylvain LE GAL
5+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
6+
-->
7+
<odoo>
8+
9+
<record id="view_hr_expense_form" model="ir.ui.view">
10+
<field name="model">hr.expense</field>
11+
<field name="inherit_id" ref="hr_expense.hr_expense_view_form"/>
12+
<field name="arch" type="xml">
13+
14+
<field name="reference" position="attributes">
15+
<attribute name="groups" />
16+
</field>
17+
</field>
18+
</record>
19+
20+
</odoo>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (C) 2025 - Today: GRAP (http://www.grap.coop)
4+
@author: Sylvain LE GAL
5+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
6+
-->
7+
<odoo>
8+
9+
<record id="view_hr_expense_sheet_form" model="ir.ui.view">
10+
<field name="model">hr.expense.sheet</field>
11+
<field name="inherit_id" ref="hr_expense.view_hr_expense_sheet_form"/>
12+
<field name="arch" type="xml">
13+
14+
<field name="journal_id" position="attributes">
15+
<attribute name="groups" ref="account.group_account_manager"/>
16+
</field>
17+
18+
<field name="user_id" position="attributes">
19+
<attribute name="invisible">1</attribute>
20+
</field>
21+
22+
<field name="total_amount_company" position="attributes">
23+
<attribute name="optional">hide</attribute>
24+
</field>
25+
26+
<field name="quantity" position="attributes">
27+
<attribute name="optional">show</attribute>
28+
<attribute name="attrs">{'invisible': [('product_has_cost', '=', False)]}</attribute>
29+
</field>
30+
31+
<field name="unit_amount" position="attributes">
32+
<attribute name="optional">show</attribute>
33+
<attribute name="attrs">{'invisible': [('product_has_cost', '=', False)]}</attribute>
34+
</field>
35+
</field>
36+
</record>
37+
38+
</odoo>

0 commit comments

Comments
 (0)