diff --git a/yuthon_hr_employee/models/inherit_hr_job.py b/yuthon_hr_employee/models/inherit_hr_job.py
index 14a431aa0..d0edb3630 100644
--- a/yuthon_hr_employee/models/inherit_hr_job.py
+++ b/yuthon_hr_employee/models/inherit_hr_job.py
@@ -24,6 +24,7 @@ class HrJob(models.Model):
establishment_quotas = fields.Integer(string="编制定员")
job_personnel_ids = fields.Many2many('hr.employee', string='在岗人员')
recruitment_employees = fields.Integer(string="招聘人数")
+ email = fields.Char(string='邮箱')
job_personnel = fields.Text(string="在岗人员", compute='_compute_job_personnel')
remarks = fields.Text(string="备注")
is_recruitment_status = fields.Boolean(string="招聘状态")
diff --git a/yuthon_hr_employee/views/inherit_hr_applicant_views.xml b/yuthon_hr_employee/views/inherit_hr_applicant_views.xml
index 7fdee7e58..898163717 100644
--- a/yuthon_hr_employee/views/inherit_hr_applicant_views.xml
+++ b/yuthon_hr_employee/views/inherit_hr_applicant_views.xml
@@ -63,9 +63,9 @@
1
-
- 1
-
+
+
+
1
diff --git a/yuthon_hr_employee/views/inherit_hr_job_views.xml b/yuthon_hr_employee/views/inherit_hr_job_views.xml
index df4d72c55..1090a015c 100644
--- a/yuthon_hr_employee/views/inherit_hr_job_views.xml
+++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml
@@ -135,9 +135,18 @@
+
+
+
+
+ 合同类型
+
+
+ 1
+
@@ -150,6 +159,9 @@
action_create_new_job
object
+
+ 新建人员信息
+
diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
index 6cda30d06..1ee9635c4 100644
--- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
+++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
@@ -271,14 +271,6 @@
-
-
-
-
-
-
-
-
批量更新员工
diff --git a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py
index 6a2345429..babe02a88 100644
--- a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py
@@ -45,12 +45,6 @@ class YuthonInterviewApproval(models.Model):
}
}
- def put_interview_stage(self):
- for rec in self.applicant_ids:
- employee_id = self.env['hr.applicant'].search([('partner_name', '=',rec.name)])
- employee_id.write({
- 'stage_id': rec.interview_stage_id.id})
-
def put_interview_wizard(self):
self.ensure_one()
application_list = []
@@ -59,13 +53,14 @@ class YuthonInterviewApproval(models.Model):
'applicant_time': applicant.interview_time,
'employee_ids': applicant.employee_ids.ids,
'stage_id': applicant.stage_id.id}))
+
return {
'name': '面试结果',
'type': 'ir.actions.act_window',
'view_mode': 'form',
'res_model': 'interview.approval.wizard',
'target': 'new',
- 'context': {'default_interview_approval_line_ids': application_list, }
+ 'context': {'default_interview_approval_line_ids': application_list}
}
@api.onchange('is_issues')
@@ -100,10 +95,13 @@ class InterviewApprovalLine(models.Model):
def button_applicant_ids(self):
self.ensure_one()
- return {
- 'type': 'ir.actions.act_window',
- 'res_model': 'hr.applicant',
- 'res_id': self.id,
- 'view_mode': 'form',
- 'target': 'current',
- }
\ No newline at end of file
+ applicant = self.env['hr.applicant'].search([('name', '=', self.name)], limit=1)
+ if applicant:
+ return {
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'hr.applicant',
+ 'res_id': applicant.id,
+ 'view_mode': 'form',
+ 'target': 'current',
+ }
+ return None
\ No newline at end of file
diff --git a/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml
index 7127b3333..1763c0caa 100644
--- a/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml
@@ -65,7 +65,7 @@
-
+
diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py
index b5a38df20..84d719c12 100644
--- a/yuthon_property/__manifest__.py
+++ b/yuthon_property/__manifest__.py
@@ -10,6 +10,7 @@
'data': [
'security/ir.model.access.csv',
'security/yuthon_property_group.xml',
+ 'security/yuthon_accounts_group.xml',
'data/data_yuthon_resource_mgmt_config.xml',
'data/yuthon_property_approval_data.xml',
'views/yuthon_property_views.xml',
diff --git a/yuthon_property/models/property_bank_statements.py b/yuthon_property/models/property_bank_statements.py
index 2e16a5e36..909d6e8d2 100644
--- a/yuthon_property/models/property_bank_statements.py
+++ b/yuthon_property/models/property_bank_statements.py
@@ -31,35 +31,9 @@ class PropertyBankStatements(models.Model):
remake = fields.Text('备注')
property_ids = fields.Many2many('yuthon.property', string='物业地址')
-
- # def button_reconciliation(self):
- # for rec in self:
- # for property_id in rec.property_ids:
- # receivable_ids = self.env['property.accounts.receivable'].search([('property_id', '=', property_id.id)])
- # for receivable_id in receivable_ids:
- # difference_amount = receivable_id.original_amount - rec.original_amount
- # receivable_id.write({
- # 'is_reconciliation': True,
- # 'difference_amount': difference_amount
- # })
-
- def button_all_reconciliation(self):
- statements_ids = self.env["property.bank.statements"].browse(
- self._context.get('active_ids', self._context.get('active_id')))
- for statements_id in statements_ids:
- for property_id in statements_id.property_ids:
- receivable_ids = self.env['property.accounts.receivable'].search([('property_id', '=', property_id.id)])
- for receivable_id in receivable_ids:
- difference_amount = receivable_id.original_amount - statements_id.original_amount
- receivable_id.write({
- 'is_reconciliation': True,
- 'difference_amount': difference_amount
- })
-
def unlink(self):
return super().unlink()
-
@api.onchange('name')
def _onchange_name(self):
contract_ids = self.env['property.lease.contract']
@@ -78,6 +52,18 @@ class PropertyBankStatements(models.Model):
self.property_ids = [(6, 0, property_ids)]
self.contract_ids = [(6, 0, contract_ids.ids)] if contract_ids else []
+ @api.onchange('property_ids')
+ def _onchange_property_or_contract_ids(self):
+ bank_list = []
+ if self.name:
+ bank_id = self.env['property.bank.line'].search([('bank', '=', self.name)])
+ if not bank_id:
+ for property_id in self.property_ids:
+ lease_contract_id = self.env['property.lease.contract'].search([('name', '=', property_id.name)])
+ if lease_contract_id:
+ lessee_id = lease_contract_id.lessee_id
+ bank_list.append((0, 0, {'name': self.name_account, 'user': lessee_id.name, 'bank': self.name,}))
+ lessee_id.bank_ids = bank_list
@api.model
def create(self, vals):
record = super(PropertyBankStatements, self).create(vals)
@@ -102,10 +88,6 @@ class PropertyBankStatements(models.Model):
self.property_ids = [(6, 0, property_ids)]
self.contract_ids = [(6, 0, contract_ids.ids)] if contract_ids else []
- def put_button(self):
- for record in self:
- record.is_put = True
-
def put_button_cancel(self):
for record in self:
- record.is_put = False
\ No newline at end of file
+ record.is_put = False
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index 27d4732e8..dd58ff3df 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -338,6 +338,7 @@ class ManageInformationLine(models.Model):
management_area = fields.Float(string="管理面积", digits=(16, 4))
rent_area = fields.Float(string="可租面积", digits=(16, 4))
admin_id = fields.Many2one('res.users', string="管理员")
+
company_id = fields.Many2one('yuthon.property.company', string="所属公司")
start_time = fields.Date(string="生效日期", default=fields.Date.today)
end_date = fields.Date(string="失效日期")
diff --git a/yuthon_property/security/yuthon_accounts_group.xml b/yuthon_property/security/yuthon_accounts_group.xml
new file mode 100644
index 000000000..17cf54a03
--- /dev/null
+++ b/yuthon_property/security/yuthon_accounts_group.xml
@@ -0,0 +1,34 @@
+
+
+
+ 财务群组
+
+
+ 财务用户
+
+
+
+ 财务管理员
+
+
+
+
+
+ 财务用户只读规则
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_property/static/src/xml/statements_create_button.xml b/yuthon_property/static/src/xml/statements_create_button.xml
index ab8293ff9..33f0eaa1f 100644
--- a/yuthon_property/static/src/xml/statements_create_button.xml
+++ b/yuthon_property/static/src/xml/statements_create_button.xml
@@ -3,7 +3,7 @@
diff --git a/yuthon_property/static/tmpl/fapiaojibenxinxi.xlsx b/yuthon_property/static/tmpl/fapiaojibenxinxi.xlsx
index 3d3e41dfc..9999acf60 100644
Binary files a/yuthon_property/static/tmpl/fapiaojibenxinxi.xlsx and b/yuthon_property/static/tmpl/fapiaojibenxinxi.xlsx differ
diff --git a/yuthon_property/static/tmpl/fapiaomingxixinxi.xlsx b/yuthon_property/static/tmpl/fapiaomingxixinxi.xlsx
index b7ff60e58..39008e5d9 100644
Binary files a/yuthon_property/static/tmpl/fapiaomingxixinxi.xlsx and b/yuthon_property/static/tmpl/fapiaomingxixinxi.xlsx differ
diff --git a/yuthon_property/static/tmpl/tedingyewuxinxi.xlsx b/yuthon_property/static/tmpl/tedingyewuxinxi.xlsx
index 1458e8e96..df6a64172 100644
Binary files a/yuthon_property/static/tmpl/tedingyewuxinxi.xlsx and b/yuthon_property/static/tmpl/tedingyewuxinxi.xlsx differ
diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml
index 1162771a8..da4de258c 100644
--- a/yuthon_property/views/menuitem.xml
+++ b/yuthon_property/views/menuitem.xml
@@ -140,25 +140,30 @@
code
- action = model.download_template_with_data()
-
-
-
+
+
+
发票明细信息模板下载
diff --git a/yuthon_property/views/property_bank_statements_views.xml b/yuthon_property/views/property_bank_statements_views.xml
index 50a8a7ec0..beebbf55e 100644
--- a/yuthon_property/views/property_bank_statements_views.xml
+++ b/yuthon_property/views/property_bank_statements_views.xml
@@ -26,7 +26,7 @@
-
+
@@ -57,7 +57,6 @@
-
@@ -66,7 +65,7 @@
对账
property.bank.statements
tree
- [('is_put', '=', False)]
+ [('is_put', '=', True)]
@@ -74,15 +73,8 @@
银行流水
property.bank.statements
tree
- [('is_put', '=', True)]
+ [('is_put', '=', False)]
-
- 批量对账
-
-
- code
- action = model.button_all_reconciliation()
-
\ No newline at end of file
diff --git a/yuthon_property/views/property_rent_list_views.xml b/yuthon_property/views/property_rent_list_views.xml
index 605819989..9ebd9197e 100644
--- a/yuthon_property/views/property_rent_list_views.xml
+++ b/yuthon_property/views/property_rent_list_views.xml
@@ -17,8 +17,8 @@
-
-
+
+
diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py
index 6b2e6adb6..5db27ae42 100644
--- a/yuthon_property_approval/__manifest__.py
+++ b/yuthon_property_approval/__manifest__.py
@@ -64,6 +64,7 @@
'views/property_sporadic_works_views.xml',
'views/property_service_approval_views.xml',
'views/property_engineering_approval_views.xml',
+ 'views/property_accounts_approval_views.xml',
'views/property_delegated_agent_views.xml',
'views/property_transaction_confirmed.xml',
'wizard/property_add_wizard_views.xml',
diff --git a/yuthon_property_approval/models/__init__.py b/yuthon_property_approval/models/__init__.py
index 7695fc2f9..5a0731dd0 100644
--- a/yuthon_property_approval/models/__init__.py
+++ b/yuthon_property_approval/models/__init__.py
@@ -52,4 +52,5 @@ from . import property_borrowing_approval
from . import perperty_claim_approval
from . import property_service_approval
from . import property_engineering_approval
-from . import property_current_approval
\ No newline at end of file
+from . import property_current_approval
+from . import property_accounts_approval
\ No newline at end of file
diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py
index f7ea1744c..6855986d3 100644
--- a/yuthon_property_approval/models/inherit_yuthon_property.py
+++ b/yuthon_property_approval/models/inherit_yuthon_property.py
@@ -16,30 +16,31 @@ class PropertyBankStatements(models.Model):
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
contract_ids = fields.Many2many('property.lease.contract', string="租赁合同审批")
+ accounts_id = fields.Many2one('property.accounts.approval', string="关联生成应收审批单")
def button_manage(self):
pass
- def button_reconciliation(self):
- for record in self:
- for contract_id in record.contract_ids:
- receivable_id = self.env['property.accounts.receivable'].search([('contract_id', '=', contract_id.id)])
- if receivable_id:
- dt = datetime.strptime(str(record.start_time), '%Y-%m-%d %H:%M:%S').date()
- due = datetime.strptime(str(receivable_id.due_date), '%Y-%m-%d').date()
- # 判断是否违约
- if receivable_id.due_date > record.start_time and receivable_id.is_reconciliation == False:
- original_amount = (due - dt).days * (receivable_id.original_amount - record.original_amount)*0.001
- self.env['property.penalty.list'].create({
- 'contract_id': contract_id.id,
- 'property_id': contract_id.lease_ids[0].address_id.id,
- 'lessee_id': contract_id.lessee_id.id,
- 'original_amount':original_amount
- })
- receivable_id.is_reconciliation = True
+ def _handle_contract_penalty(self, record):
+ for contract_id in record.contract_ids:
+ receivable_id = self.env['property.accounts.receivable'].search([('contract_id', '=', contract_id.id)])
+ if receivable_id:
+ dt = datetime.strptime(str(record.start_time), '%Y-%m-%d %H:%M:%S').date()
+ due = datetime.strptime(str(receivable_id.due_date), '%Y-%m-%d').date()
+ # 判断是否违约
+ if receivable_id.due_date > record.start_time and not receivable_id.is_reconciliation:
+ original_amount = (due - dt).days * (receivable_id.original_amount - record.original_amount) * 0.001
+ self.env['property.penalty.list'].create({
+ 'contract_id': contract_id.id,
+ 'property_id': contract_id.lease_ids[0].address_id.id,
+ 'lessee_id': contract_id.lessee_id.id,
+ 'original_amount': original_amount
+ })
+ receivable_id.is_reconciliation = True
- if self.name:
- bank_id = self.env['property.bank.line'].search([('bank', '=', self.name)])
+ def _get_reconciliation_vals(self, record):
+ if record.name:
+ bank_id = self.env['property.bank.line'].search([('bank', '=', record.name)])
total_rent_month = 0
if bank_id:
tenant_id = bank_id.tenant_id
@@ -54,34 +55,38 @@ class PropertyBankStatements(models.Model):
# 应收电费
electricity_ids = self.env['property.tariff.list'].search([('lessee_id', '=', tenant_id.id)])
- def create_reconciliation_vals(ids):
+ def create_reconciliation_vals(ids, collection_type_val):
nonlocal total_rent_month
vals_list = []
- for record in ids:
- property_id = record.property_id.id if record.property_id else False
- contract_id = record.contract_id.id if record.contract_id else False
- original_amount = record.original_amount if record.original_amount else 0
+ for sub_record in ids:
+ property_id = sub_record.property_id.id if sub_record.property_id else False
+ contract_id = sub_record.contract_id.id if sub_record.contract_id else False
+ original_amount = sub_record.original_amount if sub_record.original_amount else 0
vals = {
'property_id': property_id,
'contract_id': contract_id,
'rent_month': original_amount,
'rent': original_amount,
+ 'collection_type': collection_type_val,
}
- # 使用 (0, 0, vals) 格式表示创建新记录
total_rent_month += original_amount
vals_list.append((0, 0, vals))
return vals_list
all_vals = []
- all_vals.extend(create_reconciliation_vals(rent_ids))
- all_vals.extend(create_reconciliation_vals(deposit_ids))
- all_vals.extend(create_reconciliation_vals(management_ids))
- all_vals.extend(create_reconciliation_vals(water_ids))
- all_vals.extend(create_reconciliation_vals(electricity_ids))
+ all_vals.extend(create_reconciliation_vals(rent_ids, 'rent'))
+ all_vals.extend(create_reconciliation_vals(deposit_ids, 'deposit'))
+ all_vals.extend(create_reconciliation_vals(management_ids, 'management_fee'))
+ all_vals.extend(create_reconciliation_vals(water_ids, 'water_fee'))
+ all_vals.extend(create_reconciliation_vals(electricity_ids, 'electricity_fee'))
+ return all_vals, total_rent_month
+ return [], 0
+
+ def _get_context_and_action(self, record, all_vals, total_rent_month):
context = {
- "default_account": self.name,
- "default_actual_total":self.original_amount,
+ "default_account": record.name,
+ "default_actual_total": record.original_amount,
"default_reconciliation_line_ids": all_vals,
"default_receivable_total": total_rent_month
}
@@ -95,6 +100,60 @@ class PropertyBankStatements(models.Model):
"context": context,
}
+ def button_reconciliation(self):
+ for record in self:
+ self._handle_contract_penalty(record)
+ all_vals, total_rent_month = self._get_reconciliation_vals(record)
+ return self._get_context_and_action(record, all_vals, total_rent_month)
+
+ def button_all_reconciliation(self):
+ statements_ids = self.env["property.bank.statements"].browse(self._context.get('active_ids', self._context.get('active_id')))
+ total_all_vals = []
+ grand_total_rent_month = 0
+ for record in statements_ids:
+ self._handle_contract_penalty(record)
+ all_vals, total_rent_month = self._get_reconciliation_vals(record)
+ total_all_vals.extend(all_vals)
+ grand_total_rent_month += total_rent_month
+ if statements_ids:
+ first_record = statements_ids[0]
+ return self._get_context_and_action(first_record, total_all_vals, grand_total_rent_month)
+ return None
+
+ def put_button(self):
+ form_id = self.env.ref('yuthon_property_approval.view_property_accounts_approval_form').id
+ bank_list = []
+ bank_list.append((0, 0, {
+ 'start_time': self.start_time,
+ 'company_id': self.company_id.id if self.company_id else False,
+ 'name': self.name,
+ 'bank_name': self.bank_name,
+ 'name_account': self.name_account,
+ 'purpose': self.purpose,
+ 'journal_date': self.journal_date,
+ 'bank_branch': self.bank_branch,
+ 'extract': self.extract,
+ 'account_code': self.account_code,
+ 'is_put': self.is_put,
+ 'remake': self.remake,
+ 'original_amount': self.original_amount,
+ 'contract_account': self.contract_account,
+ 'contract_penalty': self.contract_penalty,
+ 'property_ids': [(6, 0, self.property_ids.ids)] if self.property_ids else [],
+ 'contract_ids': [(6, 0, self.contract_ids.ids)] if self.contract_ids else [],
+ 'bank_number': self.bank_number,
+ 'message': self.message,
+ 'number': self.number,
+ 'voucher_type': self.voucher_type
+ }))
+ return {
+ "type": "ir.actions.act_window",
+ "name": "应收账单生成审批单",
+ "res_model": "property.accounts.approval",
+ "views": [[form_id, "form"]],
+ "context": {
+ "default_bank_ids": bank_list,}}
+
class PropertyBankLine(models.Model):
_inherit = 'property.bank.line'
diff --git a/yuthon_property_approval/models/property_accounts_approval.py b/yuthon_property_approval/models/property_accounts_approval.py
new file mode 100644
index 000000000..7843323c1
--- /dev/null
+++ b/yuthon_property_approval/models/property_accounts_approval.py
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import models, fields, api, exceptions, _
+from datetime import datetime, timedelta
+
+
+class PropertyAccountsApproval(models.Model):
+ _name = 'property.accounts.approval'
+ _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin']
+ _description = '生成应收审批单'
+
+ name = fields.Char(string='名称', required=True)
+ code = fields.Char(string="编号",
+ default=lambda self: self.env['ir.sequence'].next_by_code(
+ 'property_claim_approval_code'))
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司")
+ department_id = fields.Many2one('hr.department', string="部门")
+ urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
+ default='normal')
+ reason_application = fields.Html(string="事由")
+ documents_ids = fields.Many2many('ir.attachment', string="附件")
+ is_issues = fields.Boolean(string="是否上会")
+ related_issues_id = fields.Many2one('issue.library', string="关联议题")
+ active = fields.Boolean('Active', default=True, tracking=True)
+ bank_ids = fields.One2many('property.bank.statements', 'accounts_id', string="银行流水明细")
+
+ def _get_default_name_title(self):
+ return self._description if self._description else self._name
+
+ name_title = fields.Char(default=_get_default_name_title)
+
+ # 流程结束触发方法
+ def put_button(self):
+ for record in self:
+ record.is_put = True
diff --git a/yuthon_property_approval/models/property_management.py b/yuthon_property_approval/models/property_management.py
index 3fbd39011..4a02693b3 100644
--- a/yuthon_property_approval/models/property_management.py
+++ b/yuthon_property_approval/models/property_management.py
@@ -50,6 +50,7 @@ class PropertyInformationDetailLines(models.Model):
new_property_id = fields.Many2one('property.management', string="新物业信息")
company_id = fields.Many2one('yuthon.property.company', string="所属公司")
+ purpose_id = fields.Many2one('yuthon.resource.purpose', string="管理类型")
new_admin = fields.Char(string="新管理员")
admin_id = fields.Many2one('res.users', string="管理员")
new_precincts = fields.Many2one('yuthon.precinct.message', string="新片区")
diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv
index 154d8c070..1f8c71cf8 100644
--- a/yuthon_property_approval/security/ir.model.access.csv
+++ b/yuthon_property_approval/security/ir.model.access.csv
@@ -93,5 +93,6 @@ access_property_reconciliation_line,property_reconciliation_line,model_property_
access_property_service_approval,property_service_approval,model_property_service_approval,base.group_user,1,1,1,1
access_property_engineering_approval,property_engineering_approval,model_property_engineering_approval,base.group_user,1,1,1,1
access_property_current_approval, property_current_approval,model_property_current_approval,base.group_user,1,1,1,1
+access_property_accounts_approval, property_accounts_approval,model_property_accounts_approval,base.group_user,1,1,1,1
diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
index 1bbf81a43..2aa8f46e5 100644
--- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml
+++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
@@ -371,11 +371,30 @@
-
+
+ property.bank.statements.tree1
+ property.bank.statements
+
+
+
+
+
+
+
+
+
+
+
+ 批量对账
+
+
+ code
+ action = model.button_all_reconciliation()
+
property.penalty.list.tree
property.penalty.list
diff --git a/yuthon_property_approval/views/property_accounts_approval_views.xml b/yuthon_property_approval/views/property_accounts_approval_views.xml
new file mode 100644
index 000000000..909dc790b
--- /dev/null
+++ b/yuthon_property_approval/views/property_accounts_approval_views.xml
@@ -0,0 +1,83 @@
+
+
+
+ property.accounts.approval.tree
+ property.accounts.approval
+
+
+
+
+
+
+
+
+ property.accounts.approval.form
+ property.accounts.approval
+
+
+
+
+
+ 应收账单生成审批单
+ property.accounts.approval
+ tree,form
+
+
diff --git a/yuthon_property_approval/views/property_management.xml b/yuthon_property_approval/views/property_management.xml
index 8f68601f8..3f013a4ec 100644
--- a/yuthon_property_approval/views/property_management.xml
+++ b/yuthon_property_approval/views/property_management.xml
@@ -74,6 +74,7 @@
+
diff --git a/yuthon_property_approval/views/property_menu_all.xml b/yuthon_property_approval/views/property_menu_all.xml
index 300296a2f..172489934 100644
--- a/yuthon_property_approval/views/property_menu_all.xml
+++ b/yuthon_property_approval/views/property_menu_all.xml
@@ -40,6 +40,12 @@
parent="yuthon_property.yuthon_property_estate_menu"
name="流程"
sequence="10"/>
+
diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
index 3dd492f09..fdf7e151f 100644
--- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py
+++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
@@ -14,43 +14,6 @@ class PropertyReconciliationWizard(models.Model):
def confirm(self):
pass
- @api.onchange('account')
- def _onchange_account(self):
- if self.account:
- bank_id = self.env['property.bank.line'].search([('bank', '=', self.account)])
- if bank_id:
- tenant_id = bank_id.tenant_id
- # 应收租金
- rent_ids = self.env['property.rent.list'].search([('lessee_id', '=', tenant_id.id)])
- # 应收押金
- deposit_ids = self.env['property.deposit.list'].search([('lessee_id', '=', tenant_id.id)])
- # 应收管理费
- management_ids = self.env['property.management.list'].search([('lessee_id', '=', tenant_id.id)])
- # 应收水费
- water_ids = self.env['property.water.list'].search([('lessee_id', '=', tenant_id.id)])
- # 应收电费
- electricity_ids = self.env['property.tariff.list'].search([('lessee_id', '=', tenant_id.id)])
-
- def create_reconciliation_line(ids):
- for record in ids:
- property_id = record.property_id.id if record.property_id else False
- contract_id = record.contract_id.id if record.contract_id else False
- original_amount = record.original_amount if record.original_amount else 0
- vals = {
- # 'reconciliation_id': self.id,
- 'property_id': property_id,
- 'contract_id': contract_id,
- 'rent_month': original_amount,
- }
- self.sudo().env['property.reconciliation.line'].create(vals)
-
- # 为不同类型的应收款项创建明细行
- create_reconciliation_line(rent_ids)
- create_reconciliation_line(deposit_ids)
- create_reconciliation_line(management_ids)
- create_reconciliation_line(water_ids)
- create_reconciliation_line(electricity_ids)
-
class PropertyReconciliationLine(models.Model):
_name = 'property.reconciliation.line'
_description = '对账明细'
@@ -62,5 +25,7 @@ class PropertyReconciliationLine(models.Model):
rent = fields.Float(string='应收租金')
penalty = fields.Float(string='违约金')
amount = fields.Float(string='金额')
- collection_type = fields.Char(string='收款类型')
+ collection_type = fields.Selection([('deposit', '押金'), ('rent', '租金'), ('water_fee', '水费'),
+ ('electricity_fee', '电费'), ('penalty', '违约'), ('management_fee', '管理费'), ('repair_fee', '维修费'),
+ ('other', '其他')], string='收款类型')
remake = fields.Char(string='备注')
\ No newline at end of file
diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py
index 3c68d7da8..d1d2d25d6 100644
--- a/yuthon_salary/models/inherit_hr_payslip.py
+++ b/yuthon_salary/models/inherit_hr_payslip.py
@@ -9,6 +9,7 @@ class InheritHrPayslip(models.Model):
full_attendance_award = fields.Float(string='全勤奖', compute='_compute_salary', store=True)
commuting_allowance = fields.Float(string='通信补贴', compute='_compute_salary', store=True)
rank_salary = fields.Float(string='职级工资', compute='_compute_salary', store=True)
+ account_id = fields.Many2one('yuthon.account.group', string='工资表分组')
@api.depends('line_ids')
def _compute_salary(self):
diff --git a/yuthon_salary/models/yuthon_payroll_type_setting.py b/yuthon_salary/models/yuthon_payroll_type_setting.py
index 6a1e219c3..b83b5ecb1 100644
--- a/yuthon_salary/models/yuthon_payroll_type_setting.py
+++ b/yuthon_salary/models/yuthon_payroll_type_setting.py
@@ -8,4 +8,11 @@ class YuthonPayrollTypeSetting(models.Model):
name = fields.Char(string='职级类别')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储')], string='所属公司')
\ No newline at end of file
+ ('thlc', '天河粮储')], string='所属公司')
+
+
+class YuthonAccountGroup(models.Model):
+ _name = 'yuthon.account.group'
+ _description = '工资表分组'
+
+ name = fields.Char(string='分组名称')
diff --git a/yuthon_salary/security/ir.model.access.csv b/yuthon_salary/security/ir.model.access.csv
index 068d793de..1f70803a3 100644
--- a/yuthon_salary/security/ir.model.access.csv
+++ b/yuthon_salary/security/ir.model.access.csv
@@ -6,3 +6,4 @@ access_yuthon_payroll_temporary,access_yuthon_payroll_temporary,model_yuthon_pay
access_yuthon_payroll_insurances,access_yuthon_payroll_insurances,model_yuthon_payroll_insurances,base.group_user,1,1,1,1
access_yuthon_payroll_wizard,access_yuthon_payroll_wizard,model_yuthon_payroll_wizard,base.group_user,1,1,1,1
access_salary_compute_wizard,access_salary_compute_wizard,model_salary_compute_wizard,base.group_user,1,1,1,1
+access_yuthon_account_group,access_yuthon_account_group,model_yuthon_account_group,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml
index ffd3437f9..0d342398f 100644
--- a/yuthon_salary/views/inherit_hr_payslip_views.xml
+++ b/yuthon_salary/views/inherit_hr_payslip_views.xml
@@ -18,6 +18,7 @@
1
+
@@ -65,5 +66,16 @@
-
+
+ view.hr.payslip.filter.inherit
+ hr.payslip
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_salary/views/yuthon_payroll_type_setting_views.xml b/yuthon_salary/views/yuthon_payroll_type_setting_views.xml
index f0553fba6..d27d18fda 100644
--- a/yuthon_salary/views/yuthon_payroll_type_setting_views.xml
+++ b/yuthon_salary/views/yuthon_payroll_type_setting_views.xml
@@ -15,4 +15,18 @@
yuthon.payroll.type.setting
tree
+
+ yuthon.account.group.tree
+ yuthon.account.group
+
+
+
+
+
+
+
+ 工资表分组
+ yuthon.account.group
+ tree
+
diff --git a/yuthon_trade/__manifest__.py b/yuthon_trade/__manifest__.py
index 46a8d8f2e..32ad91f0d 100644
--- a/yuthon_trade/__manifest__.py
+++ b/yuthon_trade/__manifest__.py
@@ -23,8 +23,6 @@
'views/yuthon_trade_supportive.xml',
'views/yuthon_none_views.xml',
'views/yuthon_mutual_approval_views.xml',
- 'views/yuthon_hospital_approval_views.xml',
- 'views/yuthon_disease_approval_views.xml',
'views/yuthon_care_condolences_views.xml',
'views/yuthon_trade_setting_views.xml',
'views/yuthon_work_condolences_views.xml',
diff --git a/yuthon_trade/models/__init__.py b/yuthon_trade/models/__init__.py
index 37bb91f3d..856c54a42 100644
--- a/yuthon_trade/models/__init__.py
+++ b/yuthon_trade/models/__init__.py
@@ -15,5 +15,4 @@ from . import yuthon_work_condolences
from . import yuthon_trade_setting
from . import yuthon_message_approval
from . import yuthon_mutual_approval
-from . import yuthon_hospital_approval
-from . import yuthon_disease_approval
+from . import yuthon_error
diff --git a/yuthon_trade/models/yuthon_disease_approval.py b/yuthon_trade/models/yuthon_disease_approval.py
deleted file mode 100644
index b82879028..000000000
--- a/yuthon_trade/models/yuthon_disease_approval.py
+++ /dev/null
@@ -1,33 +0,0 @@
-from odoo import models, fields, api
-from odoo.exceptions import UserError
-
-class YuthonDiseaseApproval(models.Model):
- _name = 'yuthon.disease.approval'
- _description = '重大疾病互助审批'
- _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
-
- code = fields.Char(string="编号",
- default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_leaving_approval_code'))
- text = fields.Text(string='正文')
- name = fields.Char(string="名称")
- employee_id = fields.Many2one('hr.employee', string="姓名")
- employee_phone = fields.Char(related='employee_id.work_phone', string='联系电话')
- sex = fields.Selection([('male', '男'), ('female', '女')], string='性别')
- card = fields.Char(string='身份证号')
- unit = fields.Char(string='参保单位名称')
- contact_user_id = fields.Many2one('hr.employee', string="单位联系人")
- phone = fields.Char(related='contact_user_id.work_phone', string='单位联系电话')
- disease_type = fields.Char(string='疾病类型')
- crediting_id = fields.Many2one('res.users', string="收款人姓名")
- bank_phone = fields.Char(string='银行账号')
- bank_name = fields.Char(string='开户行')
- remake = fields.Text(string='备注')
- urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
- default='normal')
-
- def _get_default_name_title(self):
- return self._description if self._description else self._name
-
- name_title = fields.Char(default=_get_default_name_title)
-
- documents_ids = fields.Many2many('ir.attachment', string="附件")
\ No newline at end of file
diff --git a/yuthon_trade/models/yuthon_error.py b/yuthon_trade/models/yuthon_error.py
new file mode 100644
index 000000000..39cecc968
--- /dev/null
+++ b/yuthon_trade/models/yuthon_error.py
@@ -0,0 +1,8 @@
+from odoo import models, fields, api
+
+class YuthonDiseaseApproval(models.Model):
+ _name = 'yuthon.disease.approval'
+
+
+class YuthonHospitalApproval(models.Model):
+ _name = 'yuthon.hospital.approval'
diff --git a/yuthon_trade/models/yuthon_hospital_approval.py b/yuthon_trade/models/yuthon_hospital_approval.py
deleted file mode 100644
index 19e2ef5c5..000000000
--- a/yuthon_trade/models/yuthon_hospital_approval.py
+++ /dev/null
@@ -1,32 +0,0 @@
-from odoo import models, fields, api
-from odoo.exceptions import UserError
-
-class YuthonHospitalApproval(models.Model):
- _name = 'yuthon.hospital.approval'
- _description = '住院互助申请表'
- _rec_name = 'name'
- _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
-
- code = fields.Char(string="编号",
- default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_leaving_approval_code'))
- text = fields.Text(string='正文')
- name = fields.Char(string="参保名称")
- employee_phone = fields.Char(related='employee_id.work_phone', string='联系电话')
- employee_id = fields.Many2one('hr.employee', string="姓名")
- sex = fields.Selection([('male', '男'), ('female', '女')], string='性别')
- card = fields.Char(string='身份证号')
- bank_name = fields.Char(string='开户行')
- contact_user_id = fields.Many2one('hr.employee', string="单位联系人")
- phone = fields.Char(related='contact_user_id.work_phone', string='单位联系电话')
- bank_phone = fields.Char(string='银行账号')
- account = fields.Char('户名')
- remake = fields.Text(string='备注')
- urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
- default='normal')
-
- def _get_default_name_title(self):
- return self._description if self._description else self._name
-
- name_title = fields.Char(default=_get_default_name_title)
-
- documents_ids = fields.Many2many('ir.attachment', string="附件")
\ No newline at end of file
diff --git a/yuthon_trade/security/ir.model.access.csv b/yuthon_trade/security/ir.model.access.csv
index 0752bb6a1..400c37cd0 100644
--- a/yuthon_trade/security/ir.model.access.csv
+++ b/yuthon_trade/security/ir.model.access.csv
@@ -18,7 +18,5 @@ access_yuthon_work_setting,yuthon_work_setting,model_yuthon_work_setting,base.gr
access_yuthon_message_approval,yuthon_message_approval,model_yuthon_message_approval,base.group_user,1,1,1,1
access_yuthon_publish_type,yuthon_publish_type,model_yuthon_publish_type,base.group_user,1,1,1,1
access_yuthon_mutual_approval,yuthon_mutual_approval,model_yuthon_mutual_approval,base.group_user,1,1,1,1
-access_yuthon_hospital_approval,yuthon_hospital_approval,model_yuthon_hospital_approval,base.group_user,1,1,1,1
-access_yuthon_disease_approval,yuthon_disease_approval,model_yuthon_disease_approval,base.group_user,1,1,1,1
diff --git a/yuthon_trade/views/yuthon_disease_approval_views.xml b/yuthon_trade/views/yuthon_disease_approval_views.xml
deleted file mode 100644
index 5f25a1759..000000000
--- a/yuthon_trade/views/yuthon_disease_approval_views.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
- yuthon.disease.approval.tree
- yuthon.disease.approval
-
-
-
-
-
-
-
- yuthon.disease.approval.form
- yuthon.disease.approval
-
-
-
-
-
- 重大疾病互助审批
- yuthon.disease.approval
- tree,form
-
-
diff --git a/yuthon_trade/views/yuthon_hospital_approval_views.xml b/yuthon_trade/views/yuthon_hospital_approval_views.xml
deleted file mode 100644
index 03cc9639a..000000000
--- a/yuthon_trade/views/yuthon_hospital_approval_views.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
- yuthon.hospital.approval.tree
- yuthon.hospital.approval
-
-
-
-
-
-
-
- yuthon.hospital.approval.form
- yuthon.hospital.approval
-
-
-
-
-
- 主要互助金审批
- yuthon.hospital.approval
- tree,form
-
-
-
diff --git a/yuthon_trade/views/yuthon_trade_menu.xml b/yuthon_trade/views/yuthon_trade_menu.xml
index d73bcac65..70fb85ed2 100644
--- a/yuthon_trade/views/yuthon_trade_menu.xml
+++ b/yuthon_trade/views/yuthon_trade_menu.xml
@@ -88,16 +88,6 @@
parent="executive_trade_process_ment"
action="view_mutual_approval_action"
sequence="30"/>
-
-
+
+