[REM] remover file task reject
This commit is contained in:
parent
57e38f3461
commit
091c3ea042
|
|
@ -35,7 +35,6 @@
|
||||||
|
|
||||||
'wizards/holidays_public_next_year_wizard.xml',
|
'wizards/holidays_public_next_year_wizard.xml',
|
||||||
'wizards/holiday_public_leave_report_view.xml',
|
'wizards/holiday_public_leave_report_view.xml',
|
||||||
'wizards/hr_reject_wizard_view.xml',
|
|
||||||
|
|
||||||
'report/public_leave_report_template.xml',
|
'report/public_leave_report_template.xml',
|
||||||
'report/public_leave_cost_template.xml',
|
'report/public_leave_cost_template.xml',
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,3 @@ access_hr_holidays_status_duration,access_hr_holidays_duration,model_holiday_sta
|
||||||
access_public_leave_report_user,access_public_leave_report,model_public_leave_report,base.group_user,1,1,1,0
|
access_public_leave_report_user,access_public_leave_report,model_public_leave_report,base.group_user,1,1,1,0
|
||||||
access_public_holidays_next_year_wizard_user,access_public_holidays_next_year_wizard,model_public_holidays_next_year_wizard,base.group_user,1,1,1,0
|
access_public_holidays_next_year_wizard_user,access_public_holidays_next_year_wizard,model_public_holidays_next_year_wizard,base.group_user,1,1,1,0
|
||||||
access_zfp_hr_custom_buy_vacation,zfp_hr_custom.buy_vacation,model_buy_vacation,base.group_user,1,1,1,1
|
access_zfp_hr_custom_buy_vacation,zfp_hr_custom.buy_vacation,model_buy_vacation,base.group_user,1,1,1,1
|
||||||
access_hr_reject_wizard,access_hr_reject_wizard,model_hr_reject_wizard,base.group_user,1,1,1,1
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from . import holidays_public_next_year_wizard
|
from . import holidays_public_next_year_wizard
|
||||||
from . import holiday_public_leave_report_wiz
|
from . import holiday_public_leave_report_wiz
|
||||||
from . import hr_reject_wizard
|
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Expert Co. Ltd.
|
|
||||||
# Copyright (C) 2018 (<http://www.exp-sa.com/>).
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
from odoo import api, fields, models, _
|
|
||||||
from odoo.exceptions import Warning, ValidationError
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RejectWizard(models.TransientModel):
|
|
||||||
_name = 'hr.reject.wizard'
|
|
||||||
_description = 'HR Reject Wizard'
|
|
||||||
origin = fields.Integer('')
|
|
||||||
reject_reason = fields.Text(string='Reject Reason')
|
|
||||||
origin_name = fields.Char('')
|
|
||||||
|
|
||||||
def action_reject(self):
|
|
||||||
origin_rec = self.env[self.origin_name].sudo().browse(self.origin)
|
|
||||||
if dict(self._fields).get('reject_reason') is None:
|
|
||||||
raise ValidationError(_('Sorry This object have no field named Selection Reason'))
|
|
||||||
else:
|
|
||||||
return origin_rec.action_refuse(self.reject_reason)
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<odoo>
|
|
||||||
<data>
|
|
||||||
<record id="reject_wizard" model="ir.ui.view">
|
|
||||||
<field name="name">Reject Reason</field>
|
|
||||||
<field name="model">hr.reject.wizard</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<field name="origin" invisible="1"/>
|
|
||||||
<field name="reject_reason" required="1"/>
|
|
||||||
<footer>
|
|
||||||
<div>
|
|
||||||
<button name="action_reject" string="Reject" type="object" default_focus="1" class="btn-primary"/>
|
|
||||||
or
|
|
||||||
<button string="Close" special="cancel" class="btn-secondary"/>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
</data>
|
|
||||||
</odoo>
|
|
||||||
Loading…
Reference in New Issue