添加功能

This commit is contained in:
zhou
2025-07-31 15:13:27 +08:00
parent d9f1779bda
commit 2bd37e7220
8 changed files with 37 additions and 16 deletions
@@ -126,7 +126,6 @@ class YuthonMessageLogin(models.Model):
part_time_ids = fields.One2many('education.details.line1', 'diploma_id', string="学历证(非全日制)")
degree_id_ids = fields.One2many('education.details.line2', 'degree_id', string="学位证")
certificate_ids = fields.One2many('certificates.detail.line', 'certificate_id', string="专业证书")
self_users_ids = fields.Many2many('res.users', string="当前经办人")
@api.onchange('is_issues')
def _onchange_is_issues(self):
@@ -164,7 +163,7 @@ class EducationalDetailsLine(models.Model):
diploma_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
graduation_id = fields.Many2one('ir.attachment', string="毕业证书")
validation_reports = fields.Char(string="验证报告")
validation_reports = fields.Many2one('ir.attachment', string="验证报告")
class EducationalDetailsLine1(models.Model):
@@ -173,7 +172,7 @@ class EducationalDetailsLine1(models.Model):
diploma_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
graduation_id = fields.Many2one('ir.attachment', string="毕业证书")
validation_reports = fields.Char(string="验证报告")
validation_reports = fields.Many2one('ir.attachment', string="验证报告")
class EducationalDetailsLine2(models.Model):
@@ -237,14 +237,14 @@
<tree editable="bottom">
<field name="diploma_id" column_invisible="1"/>
<field name="graduation_id" widget="preview_many2one"/>
<field name="validation_reports"/>
<field name="validation_reports" widget="preview_many2one"/>
</tree>
</field>
<field name="part_time_ids">
<tree editable="bottom">
<field name="diploma_id" column_invisible="1"/>
<field name="graduation_id" widget="preview_many2one"/>
<field name="validation_reports"/>
<field name="validation_reports" widget="preview_many2one"/>
</tree>
</field>
<field name="degree_id_ids">
@@ -6,6 +6,7 @@
<field name="arch" type="xml">
<tree>
<field name="code"/>
<field name="name"/>
<field name="onboard_time"/>
</tree>
</field>
@@ -1344,6 +1344,8 @@ class PropertyLeaseContract(models.Model):
})
def choose_property_button(self):
address_ids = self.lease_ids.mapped('address_id').filtered(lambda r: r)
property_ids2 = address_ids.ids
return {
"type": "ir.actions.act_window",
"name": "批量选择物业信息",
@@ -1352,6 +1354,7 @@ class PropertyLeaseContract(models.Model):
"target": "new",
"context": {
'default_lease_contract_id': self.id,
'default_property_ids': property_ids2,
}
}
@@ -39,7 +39,7 @@
invisible="condition != 'cancel'"/>
<group col="2">
<group>
<field name="code" readonly="1" string="流水号:"/>
<field name="code" string="流水号:"/>
</group>
<group>
<field name="is_split" invisible="1"/>
@@ -49,7 +49,7 @@
</group>
<div class="col-12 text-center">
<h1>
<field name="name_title" readonly="1"/>
<field name="name_title" readonly="0"/>
</h1>
</div>
<group col="4" string="基本信息">
@@ -69,14 +69,14 @@
<group>
<group>
<field name="work_end" invisible="1"/>
<field name="rent_company" string="出租方"/>
<field name="rent_company" string="出租方" readonly="0"/>
<field name="lessor_id" invisible="1"/>
<field name="lessee_id"/>
<field name="lessee_id" readonly="0"/>
<field name="users_id" readonly="1" invisible="1"/>
<field name="department_id" invisible="1"/>
<field name="name"/>
<field name="use_address"/>
<field name="address_for_delivery"/>
<field name="name" readonly="0"/>
<field name="use_address" readonly="0"/>
<field name="address_for_delivery" readonly="0"/>
<field name="title_address"/>
<field name="handling_opinions"/>
<field name="tenure_type" invisible="1"/>
@@ -759,6 +759,9 @@
<field name="model">property.lease.contract</field>
<field name="arch" type="xml">
<search>
<field name="name"
string="综合搜索"
filter_domain="['|', '|', ('name', 'ilike', self), ('contract_code', 'ilike', self), ('lessee_id.name', 'ilike', self)]"/>
<field name="lessee_id"/>
<field name="contract_code"/>
<field name="name"/>
@@ -9,7 +9,8 @@
<group>
<group>
<field name="lease_contract_id" invisible="1"/>
<field name="property_ids" widget="many2many_tags" context="{'search_view_ref': 'yuthon_property.yuthon_property_search'}" options="{'no_create': True}"/>
<field name="property_ids" widget="many2many_tags" context="{'search_view_ref': 'yuthon_property.yuthon_property_search'}" options="{'no_create': True}" domain="[('id', 'not in', property_ids2)]"/>
<field name="property_ids2" widget="many2many_tags" invisible="1"/>
</group>
<group/>
</group>
@@ -5,7 +5,18 @@ class ChoosePropertyWizard(models.Model):
_name = 'choose.property.wizard'
lease_contract_id = fields.Many2one('property.lease.contract', string="合同")
property_ids = fields.Many2many('yuthon.property', string="物业信息")
property_ids2 = fields.Many2many(
'yuthon.property',
'choose_property_wizard_property_ids2_rel',
'wizard_id', 'property_id',
string="已选物业",
readonly=True
)
property_ids = fields.Many2many(
'yuthon.property',
string="物业信息",
)
def confirm(self):
rec = self.lease_contract_id
+5 -2
View File
@@ -67,7 +67,7 @@ class InheritHrPayslip(models.Model):
year_gong = fields.Float(string='年功奖', store=True)
study_on = fields.Float(string='学习进步奖')
jing_te = fields.Float(string='经营特别奖')
temporary_performance_bonus = fields.Float(string='临时绩效奖金')
temporary_performance_bonus = fields.Float(string='临时绩效奖')
last_year_safety = fields.Float(string='上年安全生产工作奖')
last_year_jie = fields.Float(string='上年年度结余')
last_year_performance_evaluation = fields.Float(string='上年绩效评优')
@@ -199,7 +199,10 @@ class InheritHrPayslip(models.Model):
'total_unit_part',
'total_personal_part',
'total_payable',
'one_medical_insurance_payable'
'one_medical_insurance_payable',
'performance_deduction',
'commuting_deduction',
'base_salary_deduction'
]
for field in fields_to_process:
if field in values: