diff --git a/hr_payroll_community/__manifest__.py b/hr_payroll_community/__manifest__.py index bb0b67b41..85ed2dd92 100644 --- a/hr_payroll_community/__manifest__.py +++ b/hr_payroll_community/__manifest__.py @@ -11,7 +11,7 @@ 'summary': 'Manage your employee payroll records', 'images': ['static/description/banner.png'], 'description': "Odoo 16 Payroll, Payroll, Odoo 15,Odoo Payroll, Odoo Community Payroll", - 'depends': [ + 'depends': ['base', 'hr_contract', 'hr_holidays', 'hr_contract_types', @@ -32,6 +32,7 @@ 'views/res_config_settings_views.xml', 'views/report_contributionregister_templates.xml', 'views/report_payslip_templates.xml', + 'views/email_template.xml', 'views/report_payslipdetails_templates.xml', ], 'demo': ['data/hr_payroll_demo.xml'], diff --git a/hr_payroll_community/models/hr_payslip.py b/hr_payroll_community/models/hr_payslip.py index 4f95a6a83..97bb49ae5 100644 --- a/hr_payroll_community/models/hr_payslip.py +++ b/hr_payroll_community/models/hr_payslip.py @@ -77,6 +77,21 @@ class HrPayslip(models.Model): copy=False, states={'draft': [('readonly', False)]}) payslip_count = fields.Integer(compute='_compute_payslip_count', string="Payslip Computation Details") + + def action_send_email(self): + res=self.env.user.has_group( + 'hr_payroll_community.group_hr_payroll_community_manager') + if res : + email_values = { + 'email_from':self.env.user.work_email, + 'email_to': self.employee_id.work_email, + 'subject': self.name + } + mail_template = self.env.ref( + 'hr_payroll_community.payslip_email_template').sudo() + + mail_template.send_mail(self.id, force_send=True,email_values=email_values) + def _compute_details_by_salary_rule_category(self): for payslip in self: payslip.details_by_salary_rule_category = payslip.mapped('line_ids').filtered(lambda line: line.category_id) @@ -101,9 +116,6 @@ class HrPayslip(models.Model): return self.write({'state': 'done'}) def action_payslip_cancel(self): - - if self.filtered(lambda slip: slip.state == 'done'): - raise UserError(_("Cannot cancel a payslip that is done.")) return self.write({'state': 'cancel'}) def refund_sheet(self): @@ -300,6 +312,8 @@ class HrPayslip(models.Model): res = self._sum(code, from_date, to_date) return res and res[1] or 0.0 + + class Payslips(BrowsableObject): """a class that will be used into the python code, mainly for usability purposes""" @@ -521,6 +535,8 @@ class HrPayslip(models.Model): return 0.0 + + class HrPayslipLine(models.Model): _name = 'hr.payslip.line' _inherit = 'hr.salary.rule' diff --git a/hr_payroll_community/static/description/assets/screenshots/5.png b/hr_payroll_community/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..b4fbeec9f Binary files /dev/null and b/hr_payroll_community/static/description/assets/screenshots/5.png differ diff --git a/hr_payroll_community/static/description/assets/screenshots/6.png b/hr_payroll_community/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..65d3b1c87 Binary files /dev/null and b/hr_payroll_community/static/description/assets/screenshots/6.png differ diff --git a/hr_payroll_community/static/description/assets/screenshots/7.png b/hr_payroll_community/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..d2788ac97 Binary files /dev/null and b/hr_payroll_community/static/description/assets/screenshots/7.png differ diff --git a/hr_payroll_community/static/description/index.html b/hr_payroll_community/static/description/index.html index 350a99195..62ef7b58e 100644 --- a/hr_payroll_community/static/description/index.html +++ b/hr_payroll_community/static/description/index.html @@ -1,19 +1,20 @@
- + style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> +
+ class="mr-2"> Community
+ class="mr-2"> Enterprise
+ class="mr-2"> Odoo.sh
@@ -21,66 +22,71 @@ -

Odoo 15 Payroll

-

Managing employee salary in your organization

+

+ Odoo 15 Payroll

+

+ Managing employee salary in your organization

+ style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/>
-
+
- + style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> +
-

Explore This +

+ Explore This Module

@@ -88,42 +94,58 @@ -
+
- + style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> +
-

Overview +

+ Overview

-
+
- Payroll management revolves in and around the management of employee salary in an organization. The management includes timely issuance of salary, employee benefits/ allowances, deducting employee loan amount and so on. + Payroll management revolves in and around the management of employee + salary in an organization. The management includes timely issuance of + salary, employee benefits/ allowances, deducting employee loan amount + and so on.
-
+
- + style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> +
-

Features +

+ Features

-
+
-
- +
+ Salary Rules
-
- +
+ Salary Structure
-
- +
+ Employee Pay Slips
@@ -132,47 +154,73 @@ Employee Pay Slips -
+
- + style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> +
-

Screenshots +

+ Screenshots

-

Salary Rule Categories

+

+ Salary Rule Categories

-

Salary Rules

+

+ Salary Rules

-

Salary Structures

+

+ Salary Structures

-
-

Employee Payslips

+
+

+ Employee Payslips

+
+

+ Send Payslip through Email

+ +
+
+

+ Refund after confirmation

+ +
+
+

+ Generate Payslip

+ +
-
+
- + style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> +
-

Related +

+ Related Products

@@ -182,65 +230,89 @@ Employee Pay Slips