odoo-addon-hr-payroll-document 16.0.1.0.0.4__py3-none-any.whl → 17.0.1.0.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of odoo-addon-hr-payroll-document might be problematic. Click here for more details.

Files changed (24) hide show
  1. odoo/addons/hr_payroll_document/README.rst +20 -13
  2. odoo/addons/hr_payroll_document/__manifest__.py +2 -1
  3. odoo/addons/hr_payroll_document/i18n/es.po +46 -69
  4. odoo/addons/hr_payroll_document/i18n/hr_payroll_document.pot +37 -11
  5. odoo/addons/hr_payroll_document/models/__init__.py +1 -0
  6. odoo/addons/hr_payroll_document/models/hr_employee.py +31 -1
  7. odoo/addons/hr_payroll_document/models/ir_attachment.py +1 -1
  8. odoo/addons/hr_payroll_document/models/ir_attachment_payroll_custom.py +6 -1
  9. odoo/addons/hr_payroll_document/models/res_users.py +20 -0
  10. odoo/addons/hr_payroll_document/readme/CONTRIBUTORS.md +3 -0
  11. odoo/addons/hr_payroll_document/static/description/index.html +32 -20
  12. odoo/addons/hr_payroll_document/tests/test_hr_payroll_document.py +55 -53
  13. odoo/addons/hr_payroll_document/views/hr_employee_views.xml +107 -0
  14. odoo/addons/hr_payroll_document/wizard/payroll_management_wizard.py +14 -27
  15. odoo/addons/hr_payroll_document/wizard/payroll_management_wizard.xml +2 -1
  16. {odoo_addon_hr_payroll_document-16.0.1.0.0.4.dist-info → odoo_addon_hr_payroll_document-17.0.1.0.0.2.dist-info}/METADATA +28 -23
  17. odoo_addon_hr_payroll_document-17.0.1.0.0.2.dist-info/RECORD +30 -0
  18. {odoo_addon_hr_payroll_document-16.0.1.0.0.4.dist-info → odoo_addon_hr_payroll_document-17.0.1.0.0.2.dist-info}/WHEEL +1 -1
  19. odoo_addon_hr_payroll_document-17.0.1.0.0.2.dist-info/top_level.txt +1 -0
  20. odoo/addons/hr_payroll_document/readme/CONTRIBUTORS.rst +0 -2
  21. odoo/addons/hr_payroll_document/tests/common.py +0 -51
  22. odoo_addon_hr_payroll_document-16.0.1.0.0.4.dist-info/RECORD +0 -29
  23. odoo_addon_hr_payroll_document-16.0.1.0.0.4.dist-info/top_level.txt +0 -1
  24. /odoo/addons/hr_payroll_document/readme/{DESCRIPTION.rst → DESCRIPTION.md} +0 -0
@@ -1,18 +1,18 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
3
  <head>
5
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
5
  <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
7
- <title>HR - Payroll Document</title>
6
+ <title>README.rst</title>
8
7
  <style type="text/css">
9
8
 
10
9
  /*
11
10
  :Author: David Goodger (goodger@python.org)
12
- :Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
13
12
  :Copyright: This stylesheet has been placed in the public domain.
14
13
 
15
14
  Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
16
16
 
17
17
  See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
18
18
  customize this style sheet.
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
275
275
  margin-left: 2em ;
276
276
  margin-right: 2em }
277
277
 
278
- pre.code .ln { color: grey; } /* line numbers */
278
+ pre.code .ln { color: gray; } /* line numbers */
279
279
  pre.code, code { background-color: #eeeeee }
280
280
  pre.code .comment, code .comment { color: #5C6576 }
281
281
  pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@ span.option {
301
301
  span.pre {
302
302
  white-space: pre }
303
303
 
304
- span.problematic {
304
+ span.problematic, pre.problematic {
305
305
  color: red }
306
306
 
307
307
  span.section-subtitle {
@@ -360,17 +360,23 @@ ul.auto-toc {
360
360
  </style>
361
361
  </head>
362
362
  <body>
363
- <div class="document" id="hr-payroll-document">
364
- <h1 class="title">HR - Payroll Document</h1>
363
+ <div class="document">
365
364
 
365
+
366
+ <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
+ <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
+ </a>
369
+ <div class="section" id="hr-payroll-document">
370
+ <h1>HR - Payroll Document</h1>
366
371
  <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367
372
  !! This file is generated by oca-gen-addon-readme !!
368
373
  !! changes will be overwritten. !!
369
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
- !! source digest: sha256:3698f5f5e529d5d32ae80cdc1ab30660ad4e5d39b6d98f8dace97a0b233743c5
375
+ !! source digest: sha256:8541f32cab0e71108ff8c422d602825bb599e0141fe69b9342c16742bee0b915
371
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
- <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/payroll/tree/16.0/hr_payroll_document"><img alt="OCA/payroll" src="https://img.shields.io/badge/github-OCA%2Fpayroll-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-hr_payroll_document"><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/payroll&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
- <p>This module have a wizard view to manage the different payrolls of employees which is identified by the identification_id attribute.</p>
377
+ <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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/payroll/tree/17.0/hr_payroll_document"><img alt="OCA/payroll" src="https://img.shields.io/badge/github-OCA%2Fpayroll-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/payroll-17-0/payroll-17-0-hr_payroll_document"><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/payroll&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
+ <p>This module have a wizard view to manage the different payrolls of
379
+ employees which is identified by the identification_id attribute.</p>
374
380
  <p><strong>Table of contents</strong></p>
375
381
  <div class="contents local topic" id="contents">
376
382
  <ul class="simple">
@@ -384,41 +390,47 @@ ul.auto-toc {
384
390
  </ul>
385
391
  </div>
386
392
  <div class="section" id="bug-tracker">
387
- <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
393
+ <h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
388
394
  <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/payroll/issues">GitHub Issues</a>.
389
395
  In case of trouble, please check there if your issue has already been reported.
390
396
  If you spotted it first, help us to smash it by providing a detailed and welcomed
391
- <a class="reference external" href="https://github.com/OCA/payroll/issues/new?body=module:%20hr_payroll_document%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
397
+ <a class="reference external" href="https://github.com/OCA/payroll/issues/new?body=module:%20hr_payroll_document%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
392
398
  <p>Do not contact contributors directly about support or help with technical issues.</p>
393
399
  </div>
394
400
  <div class="section" id="credits">
395
- <h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
401
+ <h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
396
402
  <div class="section" id="authors">
397
- <h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
403
+ <h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
398
404
  <ul class="simple">
399
405
  <li>APSL</li>
400
406
  </ul>
401
407
  </div>
402
408
  <div class="section" id="contributors">
403
- <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
409
+ <h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
404
410
  <ul class="simple">
405
- <li>Antoni Marroig Campomar &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
406
- <li>Miquel Alzanillas Monserrat &lt;<a class="reference external" href="mailto:malzanillas&#64;apsl.net">malzanillas&#64;apsl.net</a>&gt;</li>
411
+ <li><a class="reference external" href="https://www.apsl.tech">APSL-Nagarro</a>:<ul>
412
+ <li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
413
+ <li>Miquel Alzanillas &lt;<a class="reference external" href="mailto:malzanillas&#64;apsl.net">malzanillas&#64;apsl.net</a>&gt;</li>
414
+ </ul>
415
+ </li>
407
416
  </ul>
408
417
  </div>
409
418
  <div class="section" id="maintainers">
410
- <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
419
+ <h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
411
420
  <p>This module is maintained by the OCA.</p>
412
- <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
421
+ <a class="reference external image-reference" href="https://odoo-community.org">
422
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
423
+ </a>
413
424
  <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
414
425
  mission is to support the collaborative development of Odoo features and
415
426
  promote its widespread use.</p>
416
427
  <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
417
428
  <p><a class="reference external image-reference" href="https://github.com/peluko00"><img alt="peluko00" src="https://github.com/peluko00.png?size=40px" /></a></p>
418
- <p>This module is part of the <a class="reference external" href="https://github.com/OCA/payroll/tree/16.0/hr_payroll_document">OCA/payroll</a> project on GitHub.</p>
429
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/payroll/tree/17.0/hr_payroll_document">OCA/payroll</a> project on GitHub.</p>
419
430
  <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>
420
431
  </div>
421
432
  </div>
422
433
  </div>
434
+ </div>
423
435
  </body>
424
436
  </html>
@@ -2,14 +2,53 @@ import base64
2
2
 
3
3
  from odoo import _
4
4
  from odoo.exceptions import UserError, ValidationError
5
- from odoo.modules.module import get_module_resource
5
+ from odoo.tests import common
6
+ from odoo.tools.misc import file_path
6
7
 
7
- from odoo.addons.hr_payroll_document.tests.common import TestHrPayrollDocument
8
+ from odoo.addons.mail.tests.common import mail_new_test_user
8
9
 
9
10
 
10
- class TestHRPayrollDocument(TestHrPayrollDocument):
11
- def setUp(self, *args, **kwargs):
12
- super().setUp(*args, **kwargs)
11
+ class TestHRPayrollDocument(common.TransactionCase):
12
+ @classmethod
13
+ def setUpClass(cls):
14
+ super().setUpClass()
15
+ cls.env.user.tz = "Europe/Brussels"
16
+ cls.user_admin = cls.env.ref("base.user_admin")
17
+
18
+ # Fix Company without country
19
+ cls.env.company.country_id = False
20
+
21
+ # Test users to use through the various tests
22
+ cls.user_employee = mail_new_test_user(
23
+ cls.env, login="david", groups="base.group_user"
24
+ )
25
+ cls.user_employee_id = cls.user_employee.id
26
+
27
+ # Hr Data
28
+ cls.employee_emp = cls.env["hr.employee"].create(
29
+ {
30
+ "name": "David Employee",
31
+ "user_id": cls.user_employee_id,
32
+ "company_id": 1,
33
+ "identification_id": "30831011V",
34
+ }
35
+ )
36
+
37
+ with open(file_path("hr_payroll_document/tests/test.pdf"), "rb") as pdf_file:
38
+ encoded_string = base64.b64encode(pdf_file.read())
39
+ ir_values = {
40
+ "name": "test",
41
+ "type": "binary",
42
+ "datas": encoded_string,
43
+ "store_fname": encoded_string,
44
+ "res_model": "payroll.management.wizard",
45
+ "res_id": 1,
46
+ }
47
+ cls.attachment = cls.env["ir.attachment"].create(ir_values)
48
+ cls.subject = "January"
49
+ cls.wizard = cls.env["payroll.management.wizard"].create(
50
+ {"payrolls": [cls.attachment.id], "subject": cls.subject}
51
+ )
13
52
 
14
53
  def fill_company_id(self):
15
54
  self.env.company.country_id = self.env["res.country"].search(
@@ -17,9 +56,7 @@ class TestHRPayrollDocument(TestHrPayrollDocument):
17
56
  )
18
57
 
19
58
  def test_extension_error(self):
20
- with open(
21
- get_module_resource("hr_payroll_document", "tests", "test.docx"), "rb"
22
- ) as pdf_file:
59
+ with open(file_path("hr_payroll_document/tests/test.docx"), "rb") as pdf_file:
23
60
  encoded_string = base64.b64encode(pdf_file.read())
24
61
  ir_values = {
25
62
  "name": "test",
@@ -53,55 +90,20 @@ class TestHRPayrollDocument(TestHrPayrollDocument):
53
90
  self.fill_company_id()
54
91
  self.env["hr.employee"].search([("id", "=", 1)]).identification_id = "37936636E"
55
92
  self.assertEqual(
56
- self.wizard.send_payrolls(),
57
- {
58
- "type": "ir.actions.client",
59
- "tag": "display_notification",
60
- "params": {
61
- "title": _("Employees not found"),
62
- "message": _("IDs whose employee has not been found: ")
63
- + "51000278D",
64
- "sticky": True,
65
- "type": "warning",
66
- "next": {
67
- "name": _("Payrolls sent"),
68
- "type": "ir.actions.act_window",
69
- "res_model": "hr.employee",
70
- "views": [
71
- (
72
- self.env.ref("hr.hr_employee_public_view_kanban").id,
73
- "list",
74
- )
75
- ],
76
- },
77
- },
78
- },
93
+ self.wizard.send_payrolls()["params"]["title"], _("Employees not found")
94
+ )
95
+ self.assertEqual(
96
+ self.wizard.send_payrolls()["params"]["message"],
97
+ _("IDs whose employee has not been found: ") + "51000278D",
79
98
  )
80
99
 
81
100
  def test_send_payrolls_correctly(self):
82
101
  self.fill_company_id()
83
102
  self.env["hr.employee"].search([("id", "=", 1)]).identification_id = "51000278D"
84
103
  self.assertEqual(
85
- self.wizard.send_payrolls(),
86
- {
87
- "type": "ir.actions.client",
88
- "tag": "display_notification",
89
- "params": {
90
- "title": _("Payrolls sent"),
91
- "message": _("Payrolls sent to employees correctly"),
92
- "sticky": False,
93
- "type": "success",
94
- "next": {
95
- "name": _("Payrolls sent"),
96
- "type": "ir.actions.act_window",
97
- "res_model": "hr.employee",
98
- "views": [
99
- (
100
- self.env.ref("hr.hr_employee_public_view_kanban").id,
101
- "list",
102
- )
103
- ],
104
- },
105
- },
106
- },
104
+ self.wizard.send_payrolls()["params"]["title"], _("Payrolls sent")
105
+ )
106
+ self.assertEqual(
107
+ self.wizard.send_payrolls()["params"]["message"],
108
+ _("Payrolls sent to employees correctly"),
107
109
  )
@@ -0,0 +1,107 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <odoo>
3
+ <record id="view_payroll_tree" model="ir.ui.view">
4
+ <field name="name">payroll.view.tree</field>
5
+ <field name="model">ir.attachment.payroll.custom</field>
6
+ <field name="arch" type="xml">
7
+ <tree name="Payrolls" create="false" delete="true" edit="false">
8
+ <field name="employee" />
9
+ <field name="identification_id" />
10
+ <field name="create_date" />
11
+ <field name="subject" />
12
+ <field name="attachment_id" widget="binary" column_invisible="1" />
13
+ <button name="download" string="Download" type="object" />
14
+ </tree>
15
+ </field>
16
+ </record>
17
+
18
+ <record id="view_payroll_filter" model="ir.ui.view">
19
+ <field name="name">payroll.view.search</field>
20
+ <field name="model">ir.attachment.payroll.custom</field>
21
+ <field name="arch" type="xml">
22
+ <search string="Payrolls">
23
+ <field name="subject" />
24
+ <field name="identification_id" />
25
+ <field name="employee" />
26
+ <separator />
27
+ <group expand="0" string="Group By">
28
+ <filter
29
+ name="group_employee"
30
+ string="Employee"
31
+ domain="[]"
32
+ context="{'group_by': 'employee'}"
33
+ />
34
+ <filter
35
+ name="group_subject"
36
+ string="Subject"
37
+ domain="[]"
38
+ context="{'group_by': 'subject'}"
39
+ />
40
+ <filter
41
+ name="group_identification_id"
42
+ string="Identification ID"
43
+ domain="[]"
44
+ context="{'group_by': 'identification_id'}"
45
+ />
46
+ </group>
47
+ </search>
48
+ </field>
49
+ </record>
50
+
51
+ <record id="payrolls_view_action" model="ir.actions.act_window">
52
+ <field name="name">Payrolls</field>
53
+ <field name="res_model">ir.attachment.payroll.custom</field>
54
+ <field name="view_mode">tree</field>
55
+ <field name="view_id" ref="view_payroll_tree" />
56
+ <field name="search_view_id" ref="view_payroll_filter" />
57
+ </record>
58
+
59
+ <menuitem
60
+ id="payrolls_menu_action"
61
+ action="payrolls_view_action"
62
+ parent="hr.menu_hr_root"
63
+ />
64
+
65
+
66
+ <record id="hr_employee_view_tree_payroll" model="ir.ui.view">
67
+ <field name="name">inherit_view.hr_employee</field>
68
+ <field name="model">hr.employee</field>
69
+ <field name="inherit_id" ref="hr.view_employee_form" />
70
+ <field name="arch" type="xml">
71
+ <xpath expr="//div[@name='button_box']" position="inside">
72
+ <button
73
+ class="oe_stat_button"
74
+ icon="fa-money"
75
+ name="action_get_payroll_tree_view"
76
+ type="object"
77
+ groups="hr.group_hr_user"
78
+ >
79
+ <field
80
+ name="payroll_count"
81
+ widget="statinfo"
82
+ string="Payrolls"
83
+ />
84
+ </button>
85
+ </xpath>
86
+ </field>
87
+ </record>
88
+
89
+ <record id="res_users_view_form_profile_inherit" model="ir.ui.view">
90
+ <field name="name">hr.res_user.view.form.inherit.document</field>
91
+ <field name="model">res.users</field>
92
+ <field name="inherit_id" ref="hr.res_users_view_form_profile" />
93
+ <field name="arch" type="xml">
94
+ <div name="button_box" position="inside">
95
+ <button
96
+ class="oe_stat_button"
97
+ icon="fa-money"
98
+ name="action_get_attachment_tree_view"
99
+ type="object"
100
+ groups="hr.group_hr_user"
101
+ >
102
+ Payrolls
103
+ </button>
104
+ </div>
105
+ </field>
106
+ </record>
107
+ </odoo>
@@ -12,14 +12,11 @@ class PayrollManagamentWizard(models.TransientModel):
12
12
  _description = "Payroll Management"
13
13
 
14
14
  subject = fields.Char(
15
- help="Enter the title of the payroll whether it is the month, week, day, etc."
15
+ help="Enter the title of the payroll whether it is the month, week, day, etc.",
16
+ required=True,
16
17
  )
17
18
  payrolls = fields.Many2many(
18
- "ir.attachment",
19
- "payrol_rel",
20
- "doc_id",
21
- "attach_id3",
22
- copy=False,
19
+ "ir.attachment", "payrol_rel", "doc_id", "attach_id3", copy=False, required=True
23
20
  )
24
21
 
25
22
  def send_payrolls(self):
@@ -43,7 +40,6 @@ class PayrollManagamentWizard(models.TransientModel):
43
40
  employees.add(employee)
44
41
  else:
45
42
  not_found.add(value)
46
- break
47
43
 
48
44
  for employee in list(employees):
49
45
  pdfWriter = PdfWriter()
@@ -54,7 +50,8 @@ class PayrollManagamentWizard(models.TransientModel):
54
50
 
55
51
  path = "/tmp/" + _("Payroll ") + employee.name + ".pdf"
56
52
 
57
- # Encrypt the payroll file with the identification identifier of the employee
53
+ # Encrypt the payroll file with the identification identifier
54
+ # of the employee
58
55
  pdfWriter.encrypt(employee.identification_id, algorithm="AES-256")
59
56
 
60
57
  f = open(path, "wb")
@@ -64,6 +61,12 @@ class PayrollManagamentWizard(models.TransientModel):
64
61
  # Send payroll to the employee
65
62
  self.send_mail(employee, path)
66
63
 
64
+ action = self.env["ir.actions.actions"]._for_xml_id(
65
+ "hr_payroll_document.payrolls_view_action"
66
+ )
67
+ action["views"] = [
68
+ [self.env.ref("hr_payroll_document.view_payroll_tree").id, "list"]
69
+ ]
67
70
  if not_found:
68
71
  return {
69
72
  "type": "ir.actions.client",
@@ -74,17 +77,7 @@ class PayrollManagamentWizard(models.TransientModel):
74
77
  + ", ".join(list(not_found)),
75
78
  "sticky": True,
76
79
  "type": "warning",
77
- "next": {
78
- "name": _("Payrolls sent"),
79
- "type": "ir.actions.act_window",
80
- "res_model": "hr.employee",
81
- "views": [
82
- (
83
- self.env.ref("hr.hr_employee_public_view_kanban").id,
84
- "list",
85
- )
86
- ],
87
- },
80
+ "next": action,
88
81
  },
89
82
  }
90
83
 
@@ -96,14 +89,7 @@ class PayrollManagamentWizard(models.TransientModel):
96
89
  "message": _("Payrolls sent to employees correctly"),
97
90
  "sticky": False,
98
91
  "type": "success",
99
- "next": {
100
- "name": _("Payrolls sent"),
101
- "type": "ir.actions.act_window",
102
- "res_model": "hr.employee",
103
- "views": [
104
- (self.env.ref("hr.hr_employee_public_view_kanban").id, "list")
105
- ],
106
- },
92
+ "next": action,
107
93
  },
108
94
  }
109
95
 
@@ -141,6 +127,7 @@ class PayrollManagamentWizard(models.TransientModel):
141
127
  "store_fname": encoded_string,
142
128
  "res_model": "hr.employee",
143
129
  "res_id": employee.id,
130
+ "document_type": "payroll",
144
131
  }
145
132
 
146
133
  # Save payroll attachment to all employee payrolls attachments
@@ -7,7 +7,7 @@
7
7
  <form>
8
8
  <sheet>
9
9
  <group>
10
- <field name="subject" required="1" />
10
+ <field name="subject" />
11
11
  </group>
12
12
  <field name="payrolls" widget="many2many_binary" />
13
13
  <footer>
@@ -30,6 +30,7 @@
30
30
  <record id="payrolls_management_wizard_action" model="ir.actions.act_window">
31
31
  <field name="name">Payrolls Management</field>
32
32
  <field name="res_model">payroll.management.wizard</field>
33
+ <field name="view_id" ref="payrolls_management_wizard_form" />
33
34
  <field name="view_mode">form</field>
34
35
  <field name="target">new</field>
35
36
  </record>
@@ -1,19 +1,23 @@
1
1
  Metadata-Version: 2.1
2
- Name: odoo-addon-hr-payroll-document
3
- Version: 16.0.1.0.0.4
2
+ Name: odoo-addon-hr_payroll_document
3
+ Version: 17.0.1.0.0.2
4
+ Requires-Python: >=3.10
5
+ Requires-Dist: odoo>=17.0a,<17.1dev
6
+ Requires-Dist: pypdf
4
7
  Summary: Manage payroll for each employee
5
8
  Home-page: https://github.com/OCA/payroll
9
+ License: AGPL-3
6
10
  Author: APSL, Odoo Community Association (OCA)
7
11
  Author-email: support@odoo-community.org
8
- License: AGPL-3
9
- Platform: UNKNOWN
10
12
  Classifier: Programming Language :: Python
11
13
  Classifier: Framework :: Odoo
12
- Classifier: Framework :: Odoo :: 16.0
14
+ Classifier: Framework :: Odoo :: 17.0
13
15
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3
14
- Requires-Python: >=3.10
15
- Requires-Dist: odoo <16.1dev,>=16.0a
16
- Requires-Dist: pypdf
16
+ Description-Content-Type: text/x-rst
17
+
18
+ .. image:: https://odoo-community.org/readme-banner-image
19
+ :target: https://odoo-community.org/get-involved?utm_source=readme
20
+ :alt: Odoo Community Association
17
21
 
18
22
  =====================
19
23
  HR - Payroll Document
@@ -24,28 +28,29 @@ HR - Payroll Document
24
28
  !! This file is generated by oca-gen-addon-readme !!
25
29
  !! changes will be overwritten. !!
26
30
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
- !! source digest: sha256:3698f5f5e529d5d32ae80cdc1ab30660ad4e5d39b6d98f8dace97a0b233743c5
31
+ !! source digest: sha256:8541f32cab0e71108ff8c422d602825bb599e0141fe69b9342c16742bee0b915
28
32
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
33
 
30
34
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
31
35
  :target: https://odoo-community.org/page/development-status
32
36
  :alt: Beta
33
- .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
37
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
34
38
  :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
35
39
  :alt: License: AGPL-3
36
40
  .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpayroll-lightgray.png?logo=github
37
- :target: https://github.com/OCA/payroll/tree/16.0/hr_payroll_document
41
+ :target: https://github.com/OCA/payroll/tree/17.0/hr_payroll_document
38
42
  :alt: OCA/payroll
39
43
  .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
40
- :target: https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-hr_payroll_document
44
+ :target: https://translation.odoo-community.org/projects/payroll-17-0/payroll-17-0-hr_payroll_document
41
45
  :alt: Translate me on Weblate
42
46
  .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
43
- :target: https://runboat.odoo-community.org/builds?repo=OCA/payroll&target_branch=16.0
47
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/payroll&target_branch=17.0
44
48
  :alt: Try me on Runboat
45
49
 
46
50
  |badge1| |badge2| |badge3| |badge4| |badge5|
47
51
 
48
- This module have a wizard view to manage the different payrolls of employees which is identified by the identification_id attribute.
52
+ This module have a wizard view to manage the different payrolls of
53
+ employees which is identified by the identification_id attribute.
49
54
 
50
55
  **Table of contents**
51
56
 
@@ -58,7 +63,7 @@ Bug Tracker
58
63
  Bugs are tracked on `GitHub Issues <https://github.com/OCA/payroll/issues>`_.
59
64
  In case of trouble, please check there if your issue has already been reported.
60
65
  If you spotted it first, help us to smash it by providing a detailed and welcomed
61
- `feedback <https://github.com/OCA/payroll/issues/new?body=module:%20hr_payroll_document%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
66
+ `feedback <https://github.com/OCA/payroll/issues/new?body=module:%20hr_payroll_document%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
62
67
 
63
68
  Do not contact contributors directly about support or help with technical issues.
64
69
 
@@ -66,18 +71,20 @@ Credits
66
71
  =======
67
72
 
68
73
  Authors
69
- ~~~~~~~
74
+ -------
70
75
 
71
76
  * APSL
72
77
 
73
78
  Contributors
74
- ~~~~~~~~~~~~
79
+ ------------
80
+
81
+ - `APSL-Nagarro <https://www.apsl.tech>`__:
75
82
 
76
- * Antoni Marroig Campomar <amarroig@apsl.net>
77
- * Miquel Alzanillas Monserrat <malzanillas@apsl.net>
83
+ - Antoni Marroig <amarroig@apsl.net>
84
+ - Miquel Alzanillas <malzanillas@apsl.net>
78
85
 
79
86
  Maintainers
80
- ~~~~~~~~~~~
87
+ -----------
81
88
 
82
89
  This module is maintained by the OCA.
83
90
 
@@ -97,8 +104,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
97
104
 
98
105
  |maintainer-peluko00|
99
106
 
100
- This module is part of the `OCA/payroll <https://github.com/OCA/payroll/tree/16.0/hr_payroll_document>`_ project on GitHub.
107
+ This module is part of the `OCA/payroll <https://github.com/OCA/payroll/tree/17.0/hr_payroll_document>`_ project on GitHub.
101
108
 
102
109
  You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
103
-
104
-
@@ -0,0 +1,30 @@
1
+ odoo/addons/hr_payroll_document/README.rst,sha256=yFvI-GhUleVgTD5HN1WMVn-eLjucvnC523sRDw_duO8,3352
2
+ odoo/addons/hr_payroll_document/__init__.py,sha256=4xA2wEP-VC0HAopaFS8ihQ1VjQDTg34AvIvOmq-alrM,42
3
+ odoo/addons/hr_payroll_document/__manifest__.py,sha256=P3uyGfrT60ptA4C-h1G8VZ8m0tS-mb68Q5rl7KcnaIo,590
4
+ odoo/addons/hr_payroll_document/data/email_payroll_employee.xml,sha256=bcbPEqEcHJAQ5gQxWyW_RGkx6XCC8ZHL3lKvSrxHRt8,2584
5
+ odoo/addons/hr_payroll_document/i18n/ca_ES.po,sha256=olTbecysICtoVZ769Z4TALONTid55d0x5oU7Z9L5xA4,12150
6
+ odoo/addons/hr_payroll_document/i18n/es.po,sha256=w8Mi-EPb487fsUYumXXjzoybiN7OKKK45JdCUmp7Cmk,13463
7
+ odoo/addons/hr_payroll_document/i18n/hr_payroll_document.pot,sha256=L2m1utr2iLDJTBbq86AGTp8d_VFjzAhKefROBtlklJ4,10482
8
+ odoo/addons/hr_payroll_document/i18n/it.po,sha256=Lg_G6jVmgJyLThDSAPPTJSpRrExBMl9yjGbOwBOwNH0,12480
9
+ odoo/addons/hr_payroll_document/models/__init__.py,sha256=3ScZSP21GsBH37D9M28TsVaCfGoAJbzR527Q_XT1Tmk,121
10
+ odoo/addons/hr_payroll_document/models/hr_employee.py,sha256=gza2LrCAXhnfkJXOKC_kxuN0PHBoejleyZyst7sAmas,1374
11
+ odoo/addons/hr_payroll_document/models/ir_attachment.py,sha256=SVNNiCh7P0q45y0rJBNxQZUjXBXAasBViFCEqvvDjZM,337
12
+ odoo/addons/hr_payroll_document/models/ir_attachment_payroll_custom.py,sha256=CqubiioXtFKTV3P1pDj2J4H_C45d-2wdAu2C5aKbazA,689
13
+ odoo/addons/hr_payroll_document/models/res_users.py,sha256=twF2etdfedltlp7iDkHN5lXtkpJuj_CRit_puVFEoDI,600
14
+ odoo/addons/hr_payroll_document/readme/CONTRIBUTORS.md,sha256=GiKjuk7sN4nS6azMknR82HwvgreeRBB9yAp4oAwnwL4,133
15
+ odoo/addons/hr_payroll_document/readme/DESCRIPTION.md,sha256=XGTSCLXP2pGtWapFblcoT8HuggxZF-ya3RryFiMTRkA,133
16
+ odoo/addons/hr_payroll_document/security/ir.model.access.csv,sha256=W64tysGGKd4g_riQcuKJK0j5um9vgyd-xD9WzX5J4WE,310
17
+ odoo/addons/hr_payroll_document/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
18
+ odoo/addons/hr_payroll_document/static/description/index.html,sha256=J4ir80RQ7smZ4DdwgA5Ry2AVauvJ69-kA3N358WIfq4,12890
19
+ odoo/addons/hr_payroll_document/tests/__init__.py,sha256=qllw2tYyKSOtLtmPAudIhnJTNvqIVcW0P4y39LtWMxE,39
20
+ odoo/addons/hr_payroll_document/tests/test.docx,sha256=Ba_5DoZ5yWG_WvxZlW9kvRU_XgyzK3pbs_OEYyE7P4Q,18655
21
+ odoo/addons/hr_payroll_document/tests/test.pdf,sha256=5I3tdxTT9SpLeyREtjxJErUhrU7VGBhKDN78T-j0r7A,33335
22
+ odoo/addons/hr_payroll_document/tests/test_hr_payroll_document.py,sha256=XQ2Ua6cbwpcBfwCO1Sev30gb4Y9lTt61fzW8iAp7JEo,3958
23
+ odoo/addons/hr_payroll_document/views/hr_employee_views.xml,sha256=8Cu3QskLYwpWNzrTv5lpjPRo6Qx4z3IYgTAXSNPdbSo,4345
24
+ odoo/addons/hr_payroll_document/wizard/__init__.py,sha256=IkYY2iCn8l-ZaOF5QeQ9HDJl5bzzxCpsfeFvSCcl8x4,40
25
+ odoo/addons/hr_payroll_document/wizard/payroll_management_wizard.py,sha256=zt3FUoYDWmcz-E-13XkiZDMi1eCq54Lf1qeWGq1xk5c,5314
26
+ odoo/addons/hr_payroll_document/wizard/payroll_management_wizard.xml,sha256=waxOjJfjy6umNH2xyNw1ElQvpB-kqe9s2JD8T_NM7kM,1709
27
+ odoo_addon_hr_payroll_document-17.0.1.0.0.2.dist-info/METADATA,sha256=2CIymQjJW5W4-na08TI4JGHYEgEB0gBkQIihSZM11Nc,3927
28
+ odoo_addon_hr_payroll_document-17.0.1.0.0.2.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
29
+ odoo_addon_hr_payroll_document-17.0.1.0.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
30
+ odoo_addon_hr_payroll_document-17.0.1.0.0.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: Whool 1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,2 +0,0 @@
1
- * Antoni Marroig Campomar <amarroig@apsl.net>
2
- * Miquel Alzanillas Monserrat <malzanillas@apsl.net>