diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 39c6106b6..804db2de6 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -27,9 +27,9 @@ class HrAttendance(models.Model): out_card_location = fields.Char(string="外出打卡地点") work_hours = fields.Float(string="工作时长") current_data = fields.Date(string='打卡日期', tracking=True) - week = fields.Selection([('one', '星期一'), ('two', '星期二'), ('three', '星期三'), - ('four', '星期四'), ('five', '星期五'), ('six', '星期六'), - ('seven', '星期日')], string='星期', compute='_compute_week', store=True) + week = fields.Selection([('one', '一'), ('two', '二'), ('three', '三'), + ('four', '四'), ('five', '五'), ('six', '六'), + ('seven', '日')], string='星期', compute='_compute_week', store=True) abnormal = fields.Integer(string="异常计算") shift_id = fields.Many2one('planning.slot', string="班次", store=True) shift_name = fields.Char(string="班次", related="shift_id.template_id.planning_name") diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py index 53280b8e7..a285455e1 100644 --- a/yuthon_property/__manifest__.py +++ b/yuthon_property/__manifest__.py @@ -25,6 +25,7 @@ 'views/property_meter_archives_views.xml', 'views/property_meter_water_views.xml', 'views/property_tenant_information_views.xml', + 'views/yuthon_property_setting_views.xml', 'views/property_intention_information.xml', 'views/property_water_list_views.xml', 'views/property_tariff_list_views.xml', diff --git a/yuthon_property/models/__init__.py b/yuthon_property/models/__init__.py index 92d84e234..972a03d13 100644 --- a/yuthon_property/models/__init__.py +++ b/yuthon_property/models/__init__.py @@ -31,4 +31,5 @@ from . import property_check_project from . import property_check_room from . import property_check_stairs from . import property_meter_reading -from . import property_message_fee \ No newline at end of file +from . import property_message_fee +from . import yuthon_property_setting \ No newline at end of file diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py index cb98c4c67..3cc7116b4 100644 --- a/yuthon_property/models/yuthon_property.py +++ b/yuthon_property/models/yuthon_property.py @@ -9,6 +9,7 @@ class YuthonProperty(models.Model): _rec_name = 'name' name = fields.Char(string="资产名称") + referred = fields.Char(string="简称") premises = fields.Char(string="楼盘") units = fields.Char(string="单元") house_type_id = fields.Many2one('yuthon.resource.house.type', string="户型") diff --git a/yuthon_property/models/yuthon_property_setting.py b/yuthon_property/models/yuthon_property_setting.py new file mode 100644 index 000000000..8be6c1d4e --- /dev/null +++ b/yuthon_property/models/yuthon_property_setting.py @@ -0,0 +1,18 @@ +from odoo import models, fields, api +from odoo.exceptions import UserError, ValidationError + + +class YuthonPenaltySetting(models.Model): + _name = 'yuthon.penalty.setting' + _description = '违约金配置' + + name = fields.Char(string="名称") + ratio = fields.Float(string="比例") + + +class YuthonTariffSetting(models.Model): + _name = 'yuthon.tariff.setting' + _description = '税率配置' + + name = fields.Char(string="名称") + ratio = fields.Float(string="比例") diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv index 27b97f783..7c00fef8d 100644 --- a/yuthon_property/security/ir.model.access.csv +++ b/yuthon_property/security/ir.model.access.csv @@ -41,4 +41,6 @@ access_property_check_project,property_check_project,model_property_check_projec access_property_check_room,property_check_room,model_property_check_room,base.group_user,1,1,1,1 access_property_check_stairs,property_check_stairs,model_property_check_stairs,base.group_user,1,1,1,1 access_property_meter_reading,property_meter_reading,model_property_meter_reading,base.group_user,1,1,1,1 -access_property_message_fee,property_message_fee,model_property_message_fee,base.group_user,1,1,1,1 \ No newline at end of file +access_property_message_fee,property_message_fee,model_property_message_fee,base.group_user,1,1,1,1 +access_yuthon_penalty_setting,yuthon_penalty_setting,model_yuthon_penalty_setting,base.group_user,1,1,1,1 +access_yuthon_tariff_setting,yuthon_tariff_setting,model_yuthon_tariff_setting,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml index 9840ac767..17871af57 100644 --- a/yuthon_property/views/menuitem.xml +++ b/yuthon_property/views/menuitem.xml @@ -319,6 +319,11 @@ action="yuthon_property_source_action" sequence="12"/> + + + + + + yuthon.property.penalty.tree + yuthon.penalty.setting + + + + + + + + + yuthon.property.tariff.tree + yuthon.tariff.setting + + + + + + + + + 违约金配置 + yuthon.penalty.setting + tree + + + 税率配置 + yuthon.tariff.setting + tree + + \ No newline at end of file diff --git a/yuthon_property/views/yuthon_property_views.xml b/yuthon_property/views/yuthon_property_views.xml index 0340e686c..9ef7e53bb 100644 --- a/yuthon_property/views/yuthon_property_views.xml +++ b/yuthon_property/views/yuthon_property_views.xml @@ -29,6 +29,7 @@ + diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 98722605b..8ba9216f3 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -3,6 +3,9 @@ import pandas as pd from dateutil.relativedelta import relativedelta from datetime import datetime, timedelta + +from numpy.ma.core import default_filler + from odoo import models, fields, api, exceptions, _ from odoo.exceptions import UserError, ValidationError @@ -52,27 +55,17 @@ class PropertyLeaseContract(models.Model): cycle_dict =fields.Selection([('monthly','月度'), ('quarter','季度'), ('half','半年'),('year','年度')],string='付款方式') cycle_mode = fields.Selection([('fixed','合同月'), ('floating','自然月')],string='周期方式') expected_reminders = fields.Char(string="逾期提醒") - increment_method = fields.Selection([('percentage','百分比'),('increment_price','递增单价'),('increment_amount','递增金额')], string='每月递增') - - first_years_begin = fields.Integer(string="第几年开始") - increments_every_few_years = fields.Integer(string="每几年递增") - - increment_percentage = fields.Float(string="递增百分比") - increment_price = fields.Float(string="递增单价") - increment_amount = fields.Float(string="递增金额") - rent_free_period = fields.Integer(string="免租期") - rent_free_period_year = fields.Integer(string="免租期") - rent_free_period_month = fields.Integer(string="免租期") - # rent_free_period_uom = fields.Selection([('year', '年'), ('month', '月')], default="year", string="免租期单位") + increment_method = fields.Selection([('percentage','百分比'),('increment_price','递增单价'),('increment_amount','递增金额')], string='每月递增', default='percentage') + rent_free_period = fields.Datetime(string="免租期") breach_time = fields.Date(string="违约计算时点") - percentage_liquidated_damages = fields.Char(string="违约金比例") + percentage_liquidated_damages = fields.Many2one('yuthon.penalty.setting', string="违约金比例") date_of_payment = fields.Date(string="每月支付日期") unit_price = fields.Float(string="单价") deposit = fields.Float(string="押金") performance_bonds = fields.Float(string="履约保证金") first_year_rent = fields.Float(string="首年租金") total_contract_receivables = fields.Float(string="合同应收") - tax_rate = fields.Float(string="税率") + tax_rate = fields.Many2one('yuthon.tariff.setting', string="税率") not_tax_amount = fields.Float(string="不含税价") tax = fields.Float(string="税金") miscellaneous = fields.Char(string="其他约定")