make course name store

This commit is contained in:
blackbelts 2025-06-26 10:55:08 +03:00
parent 91775aa554
commit e1594197f6
2 changed files with 22 additions and 22 deletions

View File

@ -76,7 +76,7 @@
decoration-muted="state == 'cancel'" string="Payslips">
<field name="number"/>
<field name="employee_id"/>
<field name="name"/>
<!-- <field name="name"/>-->
<field name="date_from"/>
<field name="date_to"/>
<field name="state"/>
@ -201,25 +201,25 @@
</group>
</form>
</field>
<separator string="Other Inputs"/>
<field name="input_line_ids" colspan="4" nolabel="1">
<tree string="Input Data" editable="bottom">
<field name="name"/>
<field name="code"/>
<field name="amount"/>
<field name="contract_id"/>
<field name="sequence" invisible="True"/>
</tree>
<form string="Payslip Line">
<group col="4">
<field name="name"/>
<field name="code"/>
<field name="sequence"/>
<field name="amount"/>
<field name="contract_id"/>
</group>
</form>
</field>
<!-- <separator string="Other Inputs"/>-->
<!-- <field name="input_line_ids" colspan="4" nolabel="1">-->
<!-- <tree string="Input Data" editable="bottom">-->
<!-- <field name="name"/>-->
<!-- <field name="code"/>-->
<!-- <field name="amount"/>-->
<!-- <field name="contract_id"/>-->
<!-- <field name="sequence" invisible="True"/>-->
<!-- </tree>-->
<!-- <form string="Payslip Line">-->
<!-- <group col="4">-->
<!-- <field name="name"/>-->
<!-- <field name="code"/>-->
<!-- <field name="sequence"/>-->
<!-- <field name="amount"/>-->
<!-- <field name="contract_id"/>-->
<!-- </group>-->
<!-- </form>-->
<!-- </field>-->
</page>
<page string="Salary Computation">
<field name="line_ids" colspan="4" nolabel="1">

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from dask.array import store
from odoo import api, fields, models, _, exceptions
@ -7,7 +7,7 @@ class EmployeeAppraisal(models.Model):
_inherit= 'hr.employee.appraisal'
mission_id = fields.Many2one('hr.official.mission', string="Training Course",domain=[("mission_type.work_state", "=", "training")])
course_name = fields.Many2one(related='mission_id.course_name',string="Course Name")
course_name = fields.Many2one(related='mission_id.course_name',string="Course Name",store=True)
@api.onchange('department_id', 'mission_id', 'appraisal_type')
def employee_ids_domain(self):