Skip to content

Commit

Permalink
[MIG] hr_employee_document: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BT-anieto committed Aug 23, 2023
1 parent 9c299ec commit ba9c3cc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hr_employee_document/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
"name": "HR Employee Document",
"version": "15.0.2.0.0",
"version": "16.0.1.0.0",
"category": "Human Resources",
"website": "https://github.com/OCA/hr",
"author": "CorporateHub, Odoo Community Association (OCA)",
Expand Down
2 changes: 2 additions & 0 deletions hr_employee_document/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
* `Tecnativa <https://www.tecnativa.com>`_:

* Víctor Martínez

* Alberto Nieto de Pablos <[email protected]> (https://braintec.com)
10 changes: 10 additions & 0 deletions hr_employee_document/tests/test_hr_employee_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,13 @@ def test_attachments_access_user_manager(self):
records = self.env["ir.attachment"].search([])
self.assertIn(attachment_1, records)
self.assertIn(attachment_2, records)

@users("test-user-1")
def test_is_logged(self):
employee = self.env.user.employee_id
employee_public = self.env["hr.employee.public"].browse(employee.id)
self.assertTrue(employee_public.is_logged)

employee = self.employee_2
employee_public = self.env["hr.employee.public"].browse(employee.id)
self.assertFalse(employee_public.is_logged)
2 changes: 1 addition & 1 deletion hr_employee_document/views/hr_employee.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<field name="name">hr.employee.view.form.inherit.document</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form" />
<field name="groups_id" eval="[(6, 0, [ref('hr.group_hr_user') ])]" />
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button
class="oe_stat_button"
icon="fa-book"
name="action_get_attachment_tree_view"
type="object"
groups="hr.group_hr_user"
>
<field name="document_count" widget="statinfo" string="Documents" />
</button>
Expand Down

0 comments on commit ba9c3cc

Please sign in to comment.