添加功能
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<menuitem id="capital_operation_root_board"
|
||||
name="资本运营"
|
||||
web_icon="yuthon_capital_operation,static/description/icon.png"
|
||||
active="False"
|
||||
sequence="90"/>
|
||||
<menuitem id="capital_operation_menu"
|
||||
name="资本运营"
|
||||
|
||||
@@ -306,8 +306,8 @@ class HolidaysRequestBatch(models.Model):
|
||||
company_id = vals.get('company_id')
|
||||
if company_id:
|
||||
company = self.env['res.company'].browse(company_id)
|
||||
has_tianhe_property = any(child.name == '天河物管' for child in company.child_ids)
|
||||
if has_tianhe_property:
|
||||
company.name = '天河物管'
|
||||
if company.name == '天河物管':
|
||||
if 'hour_leave_ids' in vals:
|
||||
for leave_info in vals.get('hour_leave_ids', []):
|
||||
hours_text = leave_info[2]['number_of_hours_text']
|
||||
|
||||
@@ -57,8 +57,7 @@ class OvertimeApprovals(models.Model):
|
||||
company_id = vals.get('company_id')
|
||||
if company_id:
|
||||
company = self.env['res.company'].browse(company_id)
|
||||
has_tianhe_property = any(child.name == '天河物管' for child in company.child_ids)
|
||||
if has_tianhe_property:
|
||||
if company.name == '天河物管' :
|
||||
if vals.get('duration'):
|
||||
if (vals['duration']) % 1 != 0.5:
|
||||
raise ValidationError("时长不对!请重新编辑")
|
||||
|
||||
@@ -92,8 +92,6 @@
|
||||
parent="yuthon_property_estate_works_menu"
|
||||
action="view_property_accounting_unit_action"/>
|
||||
|
||||
|
||||
|
||||
<menuitem id="yuthon_property_meter_menu"
|
||||
sequence="14"
|
||||
name="仪表"
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'yuthon_salary/static/scss/approval.scss',
|
||||
'yuthon_salary/static/src/js/salary_create_button.js',
|
||||
'yuthon_salary/static/src/js/salary_payslip_button.js',
|
||||
'yuthon_salary/static/src/js/salary_labor_button.js',
|
||||
|
||||
@@ -23,6 +23,16 @@ class YuthonPayrollCommon(models.Model):
|
||||
is_enable = fields.Boolean(string="启用", default=True)
|
||||
attributes = fields.Selection([('increment', '增'), ('deduction', '减')], string="工资项属性", default='increment')
|
||||
|
||||
def create_salary_four(self):
|
||||
all_records = self.env['yuthon.payroll.common'].sudo().search([])
|
||||
company_id = self.env['res.company'].search([
|
||||
('name', '=', '天河投资集团')
|
||||
])
|
||||
for record in all_records:
|
||||
record.write({
|
||||
'company_id': company_id,
|
||||
})
|
||||
|
||||
@api.onchange('payroll_type_ids')
|
||||
def _onchange_payroll_type_ids(self):
|
||||
if self.payroll_type_ids:
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
.list_width{
|
||||
width: 400px !important;
|
||||
max-width: 400px !important;
|
||||
}
|
||||
@@ -163,7 +163,7 @@
|
||||
<tree string="薪资计算" default_order="employee_id" js_class="custom_salary_button" editable="bottom">
|
||||
<field name="employee_id" string="姓名"/>
|
||||
<field name="total_before_tax" decoration-danger="1"/>
|
||||
<field name="company_id" column_invisible="1"/>
|
||||
<field name="company_id" optional="hide"/>
|
||||
<field name="base_salary"/>
|
||||
<field name="rank_salary"/>
|
||||
<field name="post_salary"/>
|
||||
|
||||
@@ -32,6 +32,13 @@
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.create_salary_common()</field>
|
||||
</record>
|
||||
<record id="view_yuthon_payroll_common_server1" model="ir.actions.server">
|
||||
<field name="name">查看</field>
|
||||
<field name="model_id" ref="model_yuthon_payroll_common"/>
|
||||
<field name="binding_model_id" ref="model_yuthon_payroll_common"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.create_salary_four()</field>
|
||||
</record>
|
||||
<record id="view_yuthon_payroll_temporary_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.payroll.temporary.tree</field>
|
||||
<field name="model">yuthon.payroll.temporary</field>
|
||||
@@ -70,7 +77,7 @@
|
||||
<field name="employee_base_floor"/>
|
||||
<field name="payroll_type_ids" widget="many2many_tags"/>
|
||||
<field name="payroll_structure_ids" widget="many2many_tags" column_invisible="1"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
<field name="documents_ids" widget="preview_many2many" class="list_width"/>
|
||||
<field name="remarks"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<menuitem id="executive_manage_menu_root_board"
|
||||
name="行政管理"
|
||||
web_icon="yuthon_work_brand,static/description/manage.png"
|
||||
active="False"
|
||||
sequence="80"/>
|
||||
|
||||
<menuitem id="executive_manage_union_root_board"
|
||||
|
||||
@@ -393,6 +393,7 @@
|
||||
<menuitem id="training_manager_root_board"
|
||||
name="培训"
|
||||
web_icon="yuthon_work_brand,static/description/training.png"
|
||||
active="False"
|
||||
sequence="95"/>
|
||||
<menuitem id="employee_training_root_board"
|
||||
name="培训管理"
|
||||
|
||||
Reference in New Issue
Block a user