commit
36e216ddda
|
|
@ -1 +0,0 @@
|
|||
,odoo,bakry,15.07.2024 13:37,file:///home/odoo/.config/libreoffice/4;
|
||||
|
|
@ -37,10 +37,9 @@
|
|||
states="direct_manager" groups="hr.group_hr_user"/>
|
||||
<button name="refused" string="Refuse" class="oe_highlight" type="object"
|
||||
states="direct_manager" groups="hr.group_hr_user"/>
|
||||
|
||||
<button name="draft_state" string="RE-Draft" class="oe_highlight" type="object"
|
||||
states="approve" groups="hr.group_hr_user"/>
|
||||
<button name="draft_state" string="RE-Draft" class="oe_highlight" type="object"
|
||||
states="refused" groups="hr.group_hr_user" confirm="Are you sure to Reset To Draft This Record?"/>
|
||||
states="refused,approve" groups="hr.group_hr_user" confirm="Are you sure to Reset To Draft This Record?"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ class HrPayslip(models.Model):
|
|||
_name = 'hr.payslip'
|
||||
_description = 'Pay Slip'
|
||||
_order = 'id desc'
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
|
||||
struct_id = fields.Many2one('hr.payroll.structure', string='Structure',
|
||||
readonly=True, states={'draft': [('readonly', False)]},
|
||||
|
|
@ -565,6 +566,7 @@ class HrPayslipInput(models.Model):
|
|||
class HrPayslipRun(models.Model):
|
||||
_name = 'hr.payslip.run'
|
||||
_description = 'Payslip Batches'
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(required=True, readonly=True, states={'draft': [('readonly', False)]})
|
||||
slip_ids = fields.One2many('hr.payslip', 'payslip_run_id', string='Payslips', readonly=True,
|
||||
|
|
|
|||
|
|
@ -276,6 +276,11 @@
|
|||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -421,6 +426,11 @@
|
|||
<separator string="Payslips"/>
|
||||
<field name="slip_ids"/>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -281,13 +281,21 @@ class HrEmployee(models.Model):
|
|||
def _check_parent_id(self):
|
||||
for employee in self:
|
||||
if not employee._check_recursion():
|
||||
employee.parent_id = False
|
||||
parent_id = employee.sudo().department_id.parent_id.manager_id
|
||||
if parent_id:
|
||||
employee.parent_id = parent_id
|
||||
else:
|
||||
employee.parent_id = False
|
||||
|
||||
@api.constrains('coach_id')
|
||||
def _check_coach_id(self):
|
||||
for employee in self:
|
||||
if not employee._check_recursion():
|
||||
employee.coach_id = False
|
||||
parent_id = employee.sudo().department_id.parent_id.manager_id
|
||||
if parent_id:
|
||||
employee.parent_id = parent_id
|
||||
else:
|
||||
employee.coach_id = False
|
||||
|
||||
@api.onchange('department_id')
|
||||
def _onchange_department(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue