From bc2fa675d7111031314961e41a2350d1eeb2a901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Oct 2024 11:43:26 +0800 Subject: [PATCH 1/7] pengyuthon --- .../__manifest__.py | 1 + .../static/src/scss/form.scss | 146 ++++++++++++++++++ .../list_view_sticky_header_and_column.scss | 8 +- yuthon_issue/security/ir.model.access.csv | 14 +- .../views/issue_approval_decision_views.xml | 14 +- 5 files changed, 165 insertions(+), 18 deletions(-) create mode 100644 list_view_sticky_header_and_column/static/src/scss/form.scss diff --git a/list_view_sticky_header_and_column/__manifest__.py b/list_view_sticky_header_and_column/__manifest__.py index 6dcfc3b56..de7baa29f 100644 --- a/list_view_sticky_header_and_column/__manifest__.py +++ b/list_view_sticky_header_and_column/__manifest__.py @@ -37,6 +37,7 @@ 'depends': ['account', 'purchase', 'hr_expense', 'web'], 'assets': { 'web.assets_backend': [ + 'list_view_sticky_header_and_column/static/src/scss/form.scss', 'list_view_sticky_header_and_column/static/src/js' '/list_view_sticky_header_and_column.js', 'list_view_sticky_header_and_column/static/src/xml' diff --git a/list_view_sticky_header_and_column/static/src/scss/form.scss b/list_view_sticky_header_and_column/static/src/scss/form.scss new file mode 100644 index 000000000..64604c946 --- /dev/null +++ b/list_view_sticky_header_and_column/static/src/scss/form.scss @@ -0,0 +1,146 @@ +.o_form_view.o_xxl_form_view, { + .o_form_sheet_bg { + > .o_form_sheet { + width: 100%; + max-width: calc(100% - 100px) !important; + } + } +} + +button.btn { + margin-left: 3px; +} + +/* +选择o_wrap_field下具有o_required_modifier元素的标签, 在标签子元素o_wrap_label的label标签前面添加一个红色*号 +*/ +.o_wrap_field:has(.o_required_modifier) > .o_wrap_label { + position: relative; /* 为了使绝对定位的星号相对于标签定位 */ +} +.o_wrap_field:has(.o_required_modifier) > .o_wrap_label label::before { + content: "*"; + color: red; + font-weight: bold; + position: absolute; + left: 0.3rem; /* 根据需要调整位置 */ + top: 50%; + transform: translateY(-50%); + font-size: 1.2rem; /* 根据需要调整字体大小 */ +} + +//.o_wrap_field:has(.o_required_modifier) > .o_wrap_label label::before { +// content: "*"; +// color: red; +// font-weight: bold; +// display: inline-block; +// //margin-left: -0.5rem; +//} + +// 修改表单内label的样式 +.o_form_sheet, .o_form_nosheet { + .grid { + gap: 0 !important; + } + //.o_group { + // border-bottom: 1px solid black; + //} + > .o_inner_group:first-child { + border: 1px solid #{$gray-200}; + border-bottom: none; + } + > .o_inner_group:not(:first-child) { + border-right: 1px solid #{$gray-200}; + border-left: 2px solid #{$gray-200}; + } + > .o_group:first-child { + border: 1px solid #{$gray-200}; + border-bottom: none; + } + .o_group { + border-right: 1px solid #{$gray-200}; + border-left: 1px solid #{$gray-200}; + //box-shadow: inset 1px 0 0 #{$gray-200}, inset -1px 0 0 #{$gray-200}; + margin-right: calc(var(--gutter-x) * .0) !important; + margin-left: calc(var(--gutter-x) * .0) !important; + .o_inner_group { + padding-right: calc(var(--gutter-x) * .0) !important; + padding-left: calc(var(--gutter-x) * .0) !important; + } + //* { + // padding-right: calc(var(--gutter-x) * .0) !important; + // padding-left: calc(var(--gutter-x) * .0) !important; + //} + } + .o_horizontal_separator:not(:empty) { + text-align: center; + border-bottom: 1px solid #FFFFFF; + box-shadow: none; + //box-shadow: inset 0 1px 0 0 #FFFFFF !important; + padding: 0.5rem 1rem; + background: #{$gray-200}; + margin-bottom: 0 !important; + margin-top: 0 !important; + font-size: var(--body-font-size); + } + .o_inner_group { + --columns: 1; + gap: 0 !important;; + margin-bottom: 0 !important; + border-left: 1px solid #{$gray-200}; + margin-right: 0; + //box-shadow: inset 1px 0 0 #{$gray-200}, inset -1px 0 0 #{$gray-200}, inset 0 1px 0 #{$gray-200}; + //grid-template-columns: minmax(150px, auto) minmax(0, 1fr) !important; + } + .o_wrap_field { + .o_form_label { + margin-bottom: 0 !important; + } + .o_field_widget { + margin-bottom: 0 !important; + } + .o_wrap_label { + display: flex; + align-items: center; + } + .o_wrap_label:not(:last-child) { + padding: 0.8rem 1rem; + } + // 其实也是选择的label,不过防止有些样式覆盖 + .o_cell.o_wrap_label { + background: #{$gray-200} !important; + border-bottom: 1px solid #FFFFFF !important; + //margin-right: -1px !important; + } + + .o_wrap_input { + padding: 0 0 0 1rem; + display: flex; + align-items: center; + .o_field_x2many_list { + margin-left: -1rem !important; + width: calc(100% + 1rem) !important; + } + } + // 选择的也是o_wrap_input,不过有些字段设置nolabel后上面的选择不会被识别 + .o_cell:not(.o_wrap_label) { + border: 1px solid #{$gray-200} !important; + margin-top: -1px !important; + //box-shadow: inset 0 -1px 0 #{$gray-200}; + border-right: none; + display: flex; + align-items: center; + } + } + .o_form_statusbar { + border: 1px solid #{$gray-200}; + border-bottom: none; + .o_form_statusbar { + button {} + } + } +} +//.o_form_editable { +// .o_wrap_input { +// box-shadow: inset 0px -15px 30px -30px #{$gray-200}; +// } +//} \ No newline at end of file diff --git a/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss b/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss index 706cb7d71..d6e7285c0 100644 --- a/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss +++ b/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss @@ -33,10 +33,10 @@ } .o_form_view:not(.o_field_highlight) .o_field_widget:not(.o_field_invalid):not(.o_field_highlight) .o_input:not(:hover):not(:focus) { --o-input-border-color: transparent; - border-style: solid; - border-color: #000; - border-width: 0px; - border-bottom-width: 1px; + //border-style: solid; + //border-color: #000; + //border-width: 0px; + //border-bottom-width: 1px; } body.white .table { width: -webkit-fill-available !important; diff --git a/yuthon_issue/security/ir.model.access.csv b/yuthon_issue/security/ir.model.access.csv index 5d1cf9a60..a28fe2b21 100644 --- a/yuthon_issue/security/ir.model.access.csv +++ b/yuthon_issue/security/ir.model.access.csv @@ -1,5 +1,5 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_issue_library_line,issue_library_line,model_issue_library_line,base.group_user,1,1,1,1 +access_issue_library_line,issue_library_line,model_issue_library_line,,1,1,1,1 access_issue_approval_decision,issue_approval_decision,model_issue_approval_decision,base.group_user,1,1,1,1 access_issue_approval_decision_type,issue_approval_decision_type,model_issue_approval_decision_type,base.group_user,1,1,1,1 access_issue_library_approval_line,issue_library_approval_line,model_issue_library_approval_line,base.group_user,1,1,1,1 @@ -8,15 +8,3 @@ access_issue_approval_line,issue_approval_line,model_issue_approval_line,base.gr access_issue_library,issue_library,model_issue_library,base.group_user,1,1,1,1 access_issue_meeting_minutes_line,issue_meeting_minutes_line,model_issue_meeting_minutes_line,base.group_user,1,1,1,1 access_issue_meeting_minutes,issue_meeting_minutes,model_issue_meeting_minutes,base.group_user,1,1,1,1 - -access_issue_library,issue_library,model_issue_library,group_topic_admin,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_party_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_team_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_board_topic,1,1,1,1 - -access_issue_library,issue_library,model_issue_library,group_property_admin,1,1,1,1 -access_issue_library,issue_library,model_issue_library,property_group_party_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,property_group_team_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_grain_admin,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_grain_party_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_grain_team_topic,1,1,1,1 diff --git a/yuthon_issue/views/issue_approval_decision_views.xml b/yuthon_issue/views/issue_approval_decision_views.xml index bd6a2d65f..84b98eba0 100644 --- a/yuthon_issue/views/issue_approval_decision_views.xml +++ b/yuthon_issue/views/issue_approval_decision_views.xml @@ -80,11 +80,23 @@ + + issue.approval.decision.search + issue.approval.decision + 20 + + + + + + + 决策清单 issue.approval.decision tree,form - {'search_default_group_decision_type_on_id': True, 'search_default_group_decision_type_id': True} + {'search_default_group_decision_type_on_id': True, + 'search_default_group_decision_type_id': True} From 5d69a9baf5d6fd6318b8148be3023d0943851fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Oct 2024 15:40:39 +0800 Subject: [PATCH 2/7] pengyuthon --- yuthon_property/__manifest__.py | 7 +- .../data/data_yuthon_resource_mgmt_config.xml | 111 ++++++++ yuthon_property/models/__init__.py | 4 + yuthon_property/models/yuthon_draw_result.py | 18 ++ .../models/yuthon_expert_database.py | 30 ++ yuthon_property/models/yuthon_property.py | 121 +++++--- .../models/yuthon_property_evaluation.py | 36 +++ .../models/yuthon_resource_mgmt_config.py | 50 ++++ yuthon_property/security/ir.model.access.csv | 13 + yuthon_property/views/menuitem.xml | 260 +++--------------- .../views/yuthon_draw_result_views.xml | 46 ++++ .../views/yuthon_expert_database_views.xml | 50 ++++ .../yuthon_property_evaluation_views.xml | 175 ++++++++++++ .../views/yuthon_property_views.xml | 218 +++++++++------ .../yuthon_resource_mgmt_config_views.xml | 98 +++++++ 15 files changed, 892 insertions(+), 345 deletions(-) create mode 100644 yuthon_property/data/data_yuthon_resource_mgmt_config.xml create mode 100644 yuthon_property/models/yuthon_draw_result.py create mode 100644 yuthon_property/models/yuthon_expert_database.py create mode 100644 yuthon_property/models/yuthon_property_evaluation.py create mode 100644 yuthon_property/models/yuthon_resource_mgmt_config.py create mode 100644 yuthon_property/views/yuthon_draw_result_views.xml create mode 100644 yuthon_property/views/yuthon_expert_database_views.xml create mode 100644 yuthon_property/views/yuthon_property_evaluation_views.xml create mode 100644 yuthon_property/views/yuthon_resource_mgmt_config_views.xml diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py index e60d17469..877967f29 100644 --- a/yuthon_property/__manifest__.py +++ b/yuthon_property/__manifest__.py @@ -9,12 +9,17 @@ 'license': 'LGPL-3', 'data': [ 'security/ir.model.access.csv', + 'data/data_yuthon_resource_mgmt_config.xml', 'views/yuthon_property_views.xml', 'views/property_type_views.xml', + 'views/yuthon_draw_result_views.xml', + 'views/yuthon_expert_database_views.xml', + 'views/yuthon_resource_mgmt_config_views.xml', + 'views/yuthon_property_evaluation_views.xml', 'views/menuitem.xml', ], 'demo': [], - 'depends': ['mail','documents','soong_workflow'], + 'depends': ['mail'], 'installable': True, 'application': True, } diff --git a/yuthon_property/data/data_yuthon_resource_mgmt_config.xml b/yuthon_property/data/data_yuthon_resource_mgmt_config.xml new file mode 100644 index 000000000..34c99479f --- /dev/null +++ b/yuthon_property/data/data_yuthon_resource_mgmt_config.xml @@ -0,0 +1,111 @@ + + + + 厂房 + + + 商铺 + + + 办公 + + + 仓库 + + + 宿舍 + + + 专业市场 + + + 公租房 + + + 车位 + + + 土地 + + + 广告位 + + + 管子间 + + + + 一房一厅 + + + 一房一厅一卫 + + + 两房一厅 + + + 两房一厅一卫 + + + 两房两厅 + + + 两房两厅一卫 + + + + + 可租 + + + 自用 + + + 不可租 + + + + + 代管 + + + 自营 + + + + 收据 + + + 普票 + + + 专票 + + + 全电票 + + + + 待评估 + + + 评估中 + + + 评估备案 + + + 挂网 + + + 签约中 + + + 已出租 + + + 闲置 + + + + \ No newline at end of file diff --git a/yuthon_property/models/__init__.py b/yuthon_property/models/__init__.py index 3b0f4194c..0b1365487 100644 --- a/yuthon_property/models/__init__.py +++ b/yuthon_property/models/__init__.py @@ -1,2 +1,6 @@ from . import yuthon_property from . import property_type +from . import yuthon_resource_mgmt_config +from . import yuthon_draw_result +from . import yuthon_expert_database +from . import yuthon_property_evaluation diff --git a/yuthon_property/models/yuthon_draw_result.py b/yuthon_property/models/yuthon_draw_result.py new file mode 100644 index 000000000..282471e19 --- /dev/null +++ b/yuthon_property/models/yuthon_draw_result.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields, api + + +class YuthonDrawResult(models.Model): + _name = 'yuthon.draw.result' + _description = '抽签结果' + _rec_name = 'project' + + date = fields.Date(string='日期') + project = fields.Char(string='项目') + company = fields.Char(string='单位') + expert = fields.Char(string='专家') + phone = fields.Char(string='联系电话') + email = fields.Char(string='邮箱') + attachment = fields.Binary(string='抽签结果附件') + diff --git a/yuthon_property/models/yuthon_expert_database.py b/yuthon_property/models/yuthon_expert_database.py new file mode 100644 index 000000000..11f727ced --- /dev/null +++ b/yuthon_property/models/yuthon_expert_database.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields, api + + +GENDER_SELECTION = [ + ('0', '男'), + ('1', '女'), + ('99', '其他'), +] + + +class YuthonExpertDatabase(models.Model): + _name = 'yuthon.expert.database' + _description = '专家库' + + name = fields.Char(string='姓名') + gender = fields.Selection(selection=GENDER_SELECTION, string='性别') + company = fields.Char(string='单位名称') + id_number = fields.Char(string='身份证号') + certificate_number = fields.Char(string='评估师证书号') + phone = fields.Char(string='联系电话') + email = fields.Char(string='邮箱') + effective_date = fields.Date(string='生效日期') + expiration_date = fields.Date(string='失效日期') + + + + + diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py index 64c805d64..311b87077 100644 --- a/yuthon_property/models/yuthon_property.py +++ b/yuthon_property/models/yuthon_property.py @@ -7,62 +7,107 @@ class YuthonProperty(models.Model): _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] _rec_name = 'name' - name = fields.Char(string="名称") - property_precinct = fields.Char(string="楼盘片区") - property_floor = fields.Integer(string="楼层") + name = fields.Char(string="资产名称") + premises = fields.Char(string="楼盘") + units = fields.Char(string="单元") + house_type_id = fields.Many2one('yuthon.resource.house.type', string="户型") property_room = fields.Char(string="区") - property_house = fields.Char(string="户型") - property_orientation = fields.Char(string="朝向") - property_use_id = fields.Integer(string="物业用途ID") - property_asset_type = fields.Selection([('plant', '厂房'), ('goods', '商品'), - ('office', '写字楼'), ('dormitory', '宿舍'), - ('rig', '设备等管理用房')], string='管理类型') - property_asset_use = fields.Selection([('hire', '出租'), ('personal', '自用')], string='资产用途') - property_use_type = fields.Selection([('work', '办公'), ('dorm', '宿舍'), ('cater', '餐饮'),('shops', '商铺'), - ('plant', '厂房')], string='出租用途') - property_use_time = fields.Datetime(string="使用年限") - property_rent_type = fields.Selection([('could', '可租'), ('no', '不可租'), - ('done', '已租'), ('none', '空置'),('assessment','评估'), - ('none_assessment', '待评估'),('filing', '备案'),('hang', '挂网'), - ('agency', '签约中')], string="出租状态") - state_id = fields.Many2one('property.type', string='状态') + building_area = fields.Float(string="建筑面积") + actual_area = fields.Float(string="实际面积") + management_area = fields.Float(string="管理面积") + effective_date = fields.Date(string="生效日期") property_source = fields.Selection([('cut', '划入'), ('self', '自建'), ('replace', '置换'), ('buy', '购入'), - ('entrust', '委托'), ('Rent', '租入')], string='来源') + ('entrust', '委托'), ('Rent', '租入')], string='资产来源') + remark = fields.Char(string="备注") + vr_link = fields.Char(string="VR链接") + other_materials = fields.Binary(string="其他材料", readonly=False) + + abbreviation = fields.Char(string="简称") + property_floor = fields.Integer(string="楼层") + property_orientation = fields.Selection([('north', '东'), ('south', '南'), ('east', '西'), ('west', '北')], + string="朝向") + street = fields.Char(string="街道") + property_area = fields.Float(string="产权面积") + pooled_area = fields.Float(string="公摊面积") + rentable_area = fields.Float(string="可租面积") + end_date = fields.Date(string="结束日期") + state_id = fields.Many2one('property.type', string='状态') + is_meter = fields.Boolean(string="是否有水表") + is_electricity_meter = fields.Boolean(string="是否有电表") + + company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="所属公司") + admin_id = fields.Many2one('res.users', string="管理员") + purpose_id = fields.Many2one('yuthon.resource.purpose', string="资产用途") + mgmt_type_id = fields.Many2one('yuthon.resource.management.type', string="管理类型") + is_confirm_authorization = fields.Boolean(string="是否确权") + owner_id = fields.Many2one('res.users', string="权属人") + property_card = fields.Html(string="产权证") + life_timer = fields.Datetime(string="使用时间") + property_use_time = fields.Selection([('a', '70年'), ('b', '40年')], string="使用年限") + + property_precinct = fields.Char(string="片区") + asset_type_id = fields.Many2one('yuthon.resource.type', string="资产类型") + is_hvac = fields.Boolean(string="是否使用中央空调") + is_handle_land = fields.Boolean(string="是否办理土地有偿使用手续") + + ame = fields.Char(string='标题') + decoration_type = fields.Selection([('blank', '毛坯'), ('hardcover', '精装'), ('brands', '简装'), ('rsz', '豪装')], + string="装修类型") + water_meter_ids = fields.One2many('yuthon.property.water', 'yuthon_property_id', string='水表列表') + energy_meter_ids = fields.One2many('yuthon.property.energy', 'yuthon_property_id', string='电表列表') + + @api.onchange('building_area') + def _onchange_building_area(self): + for rec in self: + rec.management_area = rec.building_area + rec.rentable_area = rec.building_area + + property_use_id = fields.Integer(string="物业用途ID") image_1920 = fields.Image(string="图片") description = fields.Html(string="描述") - ame = fields.Char(string='标题') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_message_code')) rental_unit_price = fields.Float(string="评估单价") address = fields.Char(string="物业地址") - is_confirm_authorization = fields.Boolean(string="是否确权") - is_handle_land = fields.Boolean(string="是否办理土地有偿使用手续") - owner = fields.Char(string="权属人") title_number = fields.Char(string="产权编号") - property_area = fields.Float(string="产权面积") suite_area = fields.Float(string="套内面积") - pooled_area = fields.Float(string="公摊面积") start_time = fields.Date(string="开始时间") - end_time = fields.Date(string="结束时间") - management_area = fields.Float(string="管理面积") - rentable_area = fields.Float(string="可租面积") - is_meter = fields.Boolean(string="是否支持多个水表") - is_electricity_meter = fields.Boolean(string="是否支持多个电表") - is_hvac = fields.Boolean(string="是否中央空调") manage_standard = fields.Char(string="物业管理费标准") - remarks = fields.Char(string="备注") - company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="所属公司") - property = fields.Selection([('escrow','代管'), ('self','私有')], string="属性") - street = fields.Char(string="街道") - admin = fields.Many2one('res.users', string="管理员") title_address = fields.Char(string="产权地址") rental_address = fields.Char(string="出租地址") def put_change_title(self): pass - def put_change_manage(self): - pass \ No newline at end of file + pass + + +class YuthonPropertyWater(models.Model): + _name = 'yuthon.property.water' + _description = '水表' + _rec_name = 'code' + + code = fields.Char(string='编码') + rate = fields.Integer(string="倍率") + standard = fields.Integer(string="标准") + installation_date = fields.Datetime(string="安装日期") + demolition_date = fields.Datetime(string="拆除日期") + location = fields.Datetime(string="位置") + yuthon_property_id = fields.Many2one('yuthon.property', string="物业管理") + + +class YuthonPropertyEnergy(models.Model): + _name = 'yuthon.property.energy' + _description = '电表' + _rec_name = 'code' + + code = fields.Char(string='编码') + rate = fields.Integer(string="倍率") + standard = fields.Integer(string="标准") + installation_date = fields.Datetime(string="安装日期") + demolition_date = fields.Datetime(string="拆除日期") + location = fields.Datetime(string="位置") + yuthon_property_id = fields.Many2one('yuthon.property', string="物业管理") diff --git a/yuthon_property/models/yuthon_property_evaluation.py b/yuthon_property/models/yuthon_property_evaluation.py new file mode 100644 index 000000000..868f03af1 --- /dev/null +++ b/yuthon_property/models/yuthon_property_evaluation.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields, api + + +class YuthonPropertyEvaluation(models.Model): + _name = 'yuthon.property.evaluation' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = '物业评估' + + owner = fields.Char(string='权属人') + property_address = fields.Char(string='物业地址') + property_area = fields.Float(string='产权面积') + rentable_area = fields.Float(string='可租面积') + unit_price = fields.Float(string='单价') + current_status = fields.Date(string='现状(合同到期日)') + registered_use = fields.Char(string='证载用途') + rental_use = fields.Char(string='出租用途') + rental_conditions = fields.Text(string='出租条件') + district_manager = fields.Char(string='片区负责人') + company = fields.Char(string='所属公司') + remarks = fields.Text(string='备注') + + sequence = fields.Integer(string='序号', default=10) + + evaluation_asset = fields.Char(string='评估资产') + evaluation_area = fields.Float(string='评估面积(m²)') + evaluation_category = fields.Char(string='评估类别') + set_purpose = fields.Char(string='设定用途') + last_hand_rent_price = fields.Float(string='上一手历史租金单价(元/m²•月)') + gov_rent_price = fields.Float(string='政府租金参考价') + evaluation_rent_price = fields.Float(string='评估散租单价(元/m²•月)') + evaluation_rent_total = fields.Float(string='评估总价(元•月,散租)') + evaluation_whole_rent_price = fields.Float(string='评估整租单价(元/m² •月)') + evaluation_whole_rent_total = fields.Float(string='评估总价(元•月,整租)') + diff --git a/yuthon_property/models/yuthon_resource_mgmt_config.py b/yuthon_property/models/yuthon_resource_mgmt_config.py new file mode 100644 index 000000000..f3e551787 --- /dev/null +++ b/yuthon_property/models/yuthon_resource_mgmt_config.py @@ -0,0 +1,50 @@ +from pkg_resources import require + +from odoo import models, fields, api + + +class YuthonResourceMgmtConfig(models.Model): + _name = 'yuthon.resource.mgmt.config' + _description = '资源管理配置' + _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] + + asset_type_id = fields.Many2one('yuthon.resource.type', string="资产类型", required=True) + house_type_id = fields.Many2one('yuthon.resource.house.type', string="户型") + purpose_id = fields.Many2one('yuthon.resource.purpose', string="用途") + mgmt_type_id = fields.Many2one('yuthon.resource.management.type', string="管理类型") + billing_type_id = fields.Many2one('yuthon.resource.billing.type', string="开票类型") + + +class YuthonResourceType(models.Model): + _name = 'yuthon.resource.type' + _description = '资产类型' + + name = fields.Char(string="资产类型") + + +class YuthonResourceHouseType(models.Model): + _name = 'yuthon.resource.house.type' + _description = '户型' + + name = fields.Char(string="户型") + + +class YuthonResourcePurpose(models.Model): + _name = 'yuthon.resource.purpose' + _description = '用途' + + name = fields.Char(string="用途") + + +class YuthonResourceManagementType(models.Model): + _name = 'yuthon.resource.management.type' + _description = '管理类型' + + name = fields.Char(string="管理类型") + + +class YuthonResourceBillingType(models.Model): + _name = 'yuthon.resource.billing.type' + _description = '开票类型' + + name = fields.Char(string="开票类型") diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv index 2804b770e..c56b8b589 100644 --- a/yuthon_property/security/ir.model.access.csv +++ b/yuthon_property/security/ir.model.access.csv @@ -2,3 +2,16 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_yuthon_property,yuthon_property,model_yuthon_property,base.group_user,1,1,1,1 access_property_type,property_type,model_property_type,base.group_user,1,1,1,1 +access_yuthon_draw_result,yuthon.draw.result,model_yuthon_draw_result,base.group_user,1,1,1,1 +access_yuthon_expert_database,yuthon.expert.database,model_yuthon_expert_database,base.group_user,1,1,1,1 +access_yuthon_property_water,yuthon.property.water,model_yuthon_property_water,base.group_user,1,1,1,1 +access_yuthon_property_energy,yuthon.property.energy,model_yuthon_property_energy,base.group_user,1,1,1,1 +access_yuthon_resource_mgmt_config,yuthon.resource.mgmt.config,model_yuthon_resource_mgmt_config,base.group_user,1,1,1,1 +access_yuthon_resource_type,yuthon.resource.type,model_yuthon_resource_type,base.group_user,1,1,1,1 +access_yuthon_resource_house_type,yuthon.resource.house.type,model_yuthon_resource_house_type,base.group_user,1,1,1,1 +access_yuthon_resource_purpose,yuthon.resource.purpose,model_yuthon_resource_purpose,base.group_user,1,1,1,1 +access_yuthon_resource_management_type,yuthon.resource.management.type,model_yuthon_resource_management_type,base.group_user,1,1,1,1 +access_yuthon_resource_billing_type,yuthon.resource.billing.type,model_yuthon_resource_billing_type,base.group_user,1,1,1,1 +access_yuthon_property_evaluation,yuthon.property.evaluation,model_yuthon_property_evaluation,base.group_user,1,1,1,1 + + diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml index 96e5bd897..7128258e8 100644 --- a/yuthon_property/views/menuitem.xml +++ b/yuthon_property/views/menuitem.xml @@ -21,7 +21,7 @@ sequence="1" name="待评估" parent="yuthon_property_menu" - action="property_assess_action"/> + action="yuthon_property_evaluation_action1"/> + action="yuthon_property_evaluation_action2"/> + action="yuthon_expert_database_action"/> + action="base.open_module_tree"/> + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/yuthon_property/views/yuthon_draw_result_views.xml b/yuthon_property/views/yuthon_draw_result_views.xml new file mode 100644 index 000000000..d7397f9e1 --- /dev/null +++ b/yuthon_property/views/yuthon_draw_result_views.xml @@ -0,0 +1,46 @@ + + + + + yuthon_draw_result_view_tree + yuthon.draw.result + + + + + + + + + + + + + + + yuthon_draw_result_view_search + yuthon.draw.result + + + + + + + + + + + + + + + + + + + 抽签结果 + ir.actions.act_window + yuthon.draw.result + tree + + \ No newline at end of file diff --git a/yuthon_property/views/yuthon_expert_database_views.xml b/yuthon_property/views/yuthon_expert_database_views.xml new file mode 100644 index 000000000..a747a4cab --- /dev/null +++ b/yuthon_property/views/yuthon_expert_database_views.xml @@ -0,0 +1,50 @@ + + + + + yuthon_expert_database_view_tree + yuthon.expert.database + + + + + + + + + + + + + + + + + yuthon_expert_database_view_search + yuthon.expert.database + + + + + + + + + + + + + + + + + + + + + 专家库 + ir.actions.act_window + yuthon.expert.database + tree + + \ No newline at end of file diff --git a/yuthon_property/views/yuthon_property_evaluation_views.xml b/yuthon_property/views/yuthon_property_evaluation_views.xml new file mode 100644 index 000000000..381154c0b --- /dev/null +++ b/yuthon_property/views/yuthon_property_evaluation_views.xml @@ -0,0 +1,175 @@ + + + + + yuthon_property_evaluation_view_tree + yuthon.property.evaluation + + + + + + + + + + + + + + + + + + + + yuthon_property_evaluation_view_form1 + yuthon.property.evaluation + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+
+ + + + + + yuthon_property_evaluation_view_tree + yuthon.property.evaluation + + + + + + + + + + + + + + + + + + + + + + + + yuthon_property_evaluation_view_form1 + yuthon.property.evaluation + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+
+ + + yuthon_property_evaluation_view_search + yuthon.property.evaluation + + + + + + + + + + + + + + + + + + + + + + 待评估物业 + ir.actions.act_window + yuthon.property.evaluation + tree,form + [] + {} + + + + + + 已评估物业 + ir.actions.act_window + yuthon.property.evaluation + tree,form + [] + {} + + + + +
\ 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 61b3b9953..c38c1d161 100644 --- a/yuthon_property/views/yuthon_property_views.xml +++ b/yuthon_property/views/yuthon_property_views.xml @@ -5,101 +5,117 @@ yuthon.property -
-
- - - - - - - - - - - - - - +
+
+ + + + - - + + + + + + - - - - - - - - - - - - - + + + + + + + +
+ yuthon.property.form yuthon.property -
+ - -
-
- + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - + - - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + +
@@ -118,16 +134,12 @@ - + - - - - - + @@ -145,7 +157,7 @@
- Product
@@ -154,14 +166,18 @@ -
- 面积: +
+ 面积:
评估单价:
+
+ 管理员: + +
@@ -192,4 +208,36 @@ + + + yuthon.property.water.tree + yuthon.property.water + + + + + + + + + + + + + + yuthon.property.energy.tree + yuthon.property.energy + + + + + + + + + + + + + \ No newline at end of file diff --git a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml new file mode 100644 index 000000000..b93907f34 --- /dev/null +++ b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml @@ -0,0 +1,98 @@ + + + + yuthon.resource.mgmt.config.tree + yuthon.resource.mgmt.config + + + + + + + + + + + + + 资源管理配置 + yuthon.resource.mgmt.config + tree + + + + yuthon.resource.type.tree + yuthon.resource.type + + + + + + + + 资产类型 + yuthon.resource.type + tree + + + + yuthon.resource.house.type.tree + yuthon.resource.house.type + + + + + + + + 户型 + yuthon.resource.house.type + tree + + + + yuthon.resource.purpose.tree + yuthon.resource.purpose + + + + + + + + 用途 + yuthon.resource.purpose + tree + + + + yuthon.resource.management.type.tree + yuthon.resource.management.type + + + + + + + + 管理类型 + yuthon.resource.management.type + tree + + + + yuthon.resource.billing.type.tree + yuthon.resource.billing.type + + + + + + + + 开票类型 + yuthon.resource.billing.type + tree + + + From d03931affae8ec55ce92489fc0ce2f5caf069f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Oct 2024 11:43:26 +0800 Subject: [PATCH 3/7] pengyuthon --- .../__manifest__.py | 1 + .../static/src/scss/form.scss | 146 ++++++++++++++++++ .../list_view_sticky_header_and_column.scss | 8 +- yuthon_issue/security/ir.model.access.csv | 14 +- .../views/issue_approval_decision_views.xml | 14 +- 5 files changed, 165 insertions(+), 18 deletions(-) create mode 100644 list_view_sticky_header_and_column/static/src/scss/form.scss diff --git a/list_view_sticky_header_and_column/__manifest__.py b/list_view_sticky_header_and_column/__manifest__.py index 6dcfc3b56..de7baa29f 100644 --- a/list_view_sticky_header_and_column/__manifest__.py +++ b/list_view_sticky_header_and_column/__manifest__.py @@ -37,6 +37,7 @@ 'depends': ['account', 'purchase', 'hr_expense', 'web'], 'assets': { 'web.assets_backend': [ + 'list_view_sticky_header_and_column/static/src/scss/form.scss', 'list_view_sticky_header_and_column/static/src/js' '/list_view_sticky_header_and_column.js', 'list_view_sticky_header_and_column/static/src/xml' diff --git a/list_view_sticky_header_and_column/static/src/scss/form.scss b/list_view_sticky_header_and_column/static/src/scss/form.scss new file mode 100644 index 000000000..64604c946 --- /dev/null +++ b/list_view_sticky_header_and_column/static/src/scss/form.scss @@ -0,0 +1,146 @@ +.o_form_view.o_xxl_form_view, { + .o_form_sheet_bg { + > .o_form_sheet { + width: 100%; + max-width: calc(100% - 100px) !important; + } + } +} + +button.btn { + margin-left: 3px; +} + +/* +选择o_wrap_field下具有o_required_modifier元素的标签, 在标签子元素o_wrap_label的label标签前面添加一个红色*号 +*/ +.o_wrap_field:has(.o_required_modifier) > .o_wrap_label { + position: relative; /* 为了使绝对定位的星号相对于标签定位 */ +} +.o_wrap_field:has(.o_required_modifier) > .o_wrap_label label::before { + content: "*"; + color: red; + font-weight: bold; + position: absolute; + left: 0.3rem; /* 根据需要调整位置 */ + top: 50%; + transform: translateY(-50%); + font-size: 1.2rem; /* 根据需要调整字体大小 */ +} + +//.o_wrap_field:has(.o_required_modifier) > .o_wrap_label label::before { +// content: "*"; +// color: red; +// font-weight: bold; +// display: inline-block; +// //margin-left: -0.5rem; +//} + +// 修改表单内label的样式 +.o_form_sheet, .o_form_nosheet { + .grid { + gap: 0 !important; + } + //.o_group { + // border-bottom: 1px solid black; + //} + > .o_inner_group:first-child { + border: 1px solid #{$gray-200}; + border-bottom: none; + } + > .o_inner_group:not(:first-child) { + border-right: 1px solid #{$gray-200}; + border-left: 2px solid #{$gray-200}; + } + > .o_group:first-child { + border: 1px solid #{$gray-200}; + border-bottom: none; + } + .o_group { + border-right: 1px solid #{$gray-200}; + border-left: 1px solid #{$gray-200}; + //box-shadow: inset 1px 0 0 #{$gray-200}, inset -1px 0 0 #{$gray-200}; + margin-right: calc(var(--gutter-x) * .0) !important; + margin-left: calc(var(--gutter-x) * .0) !important; + .o_inner_group { + padding-right: calc(var(--gutter-x) * .0) !important; + padding-left: calc(var(--gutter-x) * .0) !important; + } + //* { + // padding-right: calc(var(--gutter-x) * .0) !important; + // padding-left: calc(var(--gutter-x) * .0) !important; + //} + } + .o_horizontal_separator:not(:empty) { + text-align: center; + border-bottom: 1px solid #FFFFFF; + box-shadow: none; + //box-shadow: inset 0 1px 0 0 #FFFFFF !important; + padding: 0.5rem 1rem; + background: #{$gray-200}; + margin-bottom: 0 !important; + margin-top: 0 !important; + font-size: var(--body-font-size); + } + .o_inner_group { + --columns: 1; + gap: 0 !important;; + margin-bottom: 0 !important; + border-left: 1px solid #{$gray-200}; + margin-right: 0; + //box-shadow: inset 1px 0 0 #{$gray-200}, inset -1px 0 0 #{$gray-200}, inset 0 1px 0 #{$gray-200}; + //grid-template-columns: minmax(150px, auto) minmax(0, 1fr) !important; + } + .o_wrap_field { + .o_form_label { + margin-bottom: 0 !important; + } + .o_field_widget { + margin-bottom: 0 !important; + } + .o_wrap_label { + display: flex; + align-items: center; + } + .o_wrap_label:not(:last-child) { + padding: 0.8rem 1rem; + } + // 其实也是选择的label,不过防止有些样式覆盖 + .o_cell.o_wrap_label { + background: #{$gray-200} !important; + border-bottom: 1px solid #FFFFFF !important; + //margin-right: -1px !important; + } + + .o_wrap_input { + padding: 0 0 0 1rem; + display: flex; + align-items: center; + .o_field_x2many_list { + margin-left: -1rem !important; + width: calc(100% + 1rem) !important; + } + } + // 选择的也是o_wrap_input,不过有些字段设置nolabel后上面的选择不会被识别 + .o_cell:not(.o_wrap_label) { + border: 1px solid #{$gray-200} !important; + margin-top: -1px !important; + //box-shadow: inset 0 -1px 0 #{$gray-200}; + border-right: none; + display: flex; + align-items: center; + } + } + .o_form_statusbar { + border: 1px solid #{$gray-200}; + border-bottom: none; + .o_form_statusbar { + button {} + } + } +} +//.o_form_editable { +// .o_wrap_input { +// box-shadow: inset 0px -15px 30px -30px #{$gray-200}; +// } +//} \ No newline at end of file diff --git a/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss b/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss index 706cb7d71..d6e7285c0 100644 --- a/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss +++ b/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss @@ -33,10 +33,10 @@ } .o_form_view:not(.o_field_highlight) .o_field_widget:not(.o_field_invalid):not(.o_field_highlight) .o_input:not(:hover):not(:focus) { --o-input-border-color: transparent; - border-style: solid; - border-color: #000; - border-width: 0px; - border-bottom-width: 1px; + //border-style: solid; + //border-color: #000; + //border-width: 0px; + //border-bottom-width: 1px; } body.white .table { width: -webkit-fill-available !important; diff --git a/yuthon_issue/security/ir.model.access.csv b/yuthon_issue/security/ir.model.access.csv index 5d1cf9a60..a28fe2b21 100644 --- a/yuthon_issue/security/ir.model.access.csv +++ b/yuthon_issue/security/ir.model.access.csv @@ -1,5 +1,5 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_issue_library_line,issue_library_line,model_issue_library_line,base.group_user,1,1,1,1 +access_issue_library_line,issue_library_line,model_issue_library_line,,1,1,1,1 access_issue_approval_decision,issue_approval_decision,model_issue_approval_decision,base.group_user,1,1,1,1 access_issue_approval_decision_type,issue_approval_decision_type,model_issue_approval_decision_type,base.group_user,1,1,1,1 access_issue_library_approval_line,issue_library_approval_line,model_issue_library_approval_line,base.group_user,1,1,1,1 @@ -8,15 +8,3 @@ access_issue_approval_line,issue_approval_line,model_issue_approval_line,base.gr access_issue_library,issue_library,model_issue_library,base.group_user,1,1,1,1 access_issue_meeting_minutes_line,issue_meeting_minutes_line,model_issue_meeting_minutes_line,base.group_user,1,1,1,1 access_issue_meeting_minutes,issue_meeting_minutes,model_issue_meeting_minutes,base.group_user,1,1,1,1 - -access_issue_library,issue_library,model_issue_library,group_topic_admin,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_party_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_team_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_board_topic,1,1,1,1 - -access_issue_library,issue_library,model_issue_library,group_property_admin,1,1,1,1 -access_issue_library,issue_library,model_issue_library,property_group_party_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,property_group_team_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_grain_admin,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_grain_party_topic,1,1,1,1 -access_issue_library,issue_library,model_issue_library,group_grain_team_topic,1,1,1,1 diff --git a/yuthon_issue/views/issue_approval_decision_views.xml b/yuthon_issue/views/issue_approval_decision_views.xml index bd6a2d65f..84b98eba0 100644 --- a/yuthon_issue/views/issue_approval_decision_views.xml +++ b/yuthon_issue/views/issue_approval_decision_views.xml @@ -80,11 +80,23 @@ + + issue.approval.decision.search + issue.approval.decision + 20 + + + + + + + 决策清单 issue.approval.decision tree,form - {'search_default_group_decision_type_on_id': True, 'search_default_group_decision_type_id': True} + {'search_default_group_decision_type_on_id': True, + 'search_default_group_decision_type_id': True} From 47e92241e78ac0f9be73ba096698324124af4d01 Mon Sep 17 00:00:00 2001 From: zhouzhou <123@qq.com> Date: Thu, 24 Oct 2024 15:25:58 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_issue/data/issue_library_code_data.xml | 7 ++++++ yuthon_issue/models/inherit_room_booking.py | 24 ++++++++++++++----- yuthon_issue/models/issue_library.py | 7 +++--- yuthon_issue/models/issue_meeting_minutes.py | 4 +++- yuthon_issue/views/inherit_room_booking.xml | 5 ++-- yuthon_issue/views/issue_library_views.xml | 18 +++++++++++--- .../views/issue_meeting_minutes_views.xml | 2 +- 7 files changed, 50 insertions(+), 17 deletions(-) diff --git a/yuthon_issue/data/issue_library_code_data.xml b/yuthon_issue/data/issue_library_code_data.xml index 40748bc0e..475e54212 100644 --- a/yuthon_issue/data/issue_library_code_data.xml +++ b/yuthon_issue/data/issue_library_code_data.xml @@ -23,4 +23,11 @@ 3 + + 会议纪要编号 + issue_meeting_minutes_code + HY%(y)s%(month)s%(day)s + 3 + + \ No newline at end of file diff --git a/yuthon_issue/models/inherit_room_booking.py b/yuthon_issue/models/inherit_room_booking.py index 7643fd261..3f369b8cc 100644 --- a/yuthon_issue/models/inherit_room_booking.py +++ b/yuthon_issue/models/inherit_room_booking.py @@ -4,18 +4,18 @@ from odoo import api, fields, models, _ class RoomBooking(models.Model): _inherit = 'room.booking' - room_booking_library_ids = fields.One2many('issue.library', 'room_booking_id') - + room_booking_library_ids = fields.One2many('issue.meeting.line', 'meeting_booking_id') + room_booking_id = fields.Many2one('issue.library') def bottom_meeting_approval(self): library_data = [] for library in self.room_booking_library_ids: library_data.append((0, 0, { - 'name': library.name, - 'decision_results': library.decision_results, - 'overview': library.decision_details, + 'minutes_id':library.issue_meeting.id, + 'decision_results':library.decision_results, + 'overview':library.decision_details, })) return { - 'name': '会议纪要审批', + 'name':'会议纪要审批', 'type': 'ir.actions.act_window', 'view_mode': "form", 'res_model': 'issue.meeting.minutes', @@ -25,3 +25,15 @@ class RoomBooking(models.Model): 'default_meeting_date': self.start_datetime, 'default_meeting_minutes_ids': library_data }} + + + +class IssueMeetingLine(models.Model): + _name = 'issue.meeting.line' + _description = '关联议题库明细行' + + + meeting_booking_id = fields.Many2one('room.booking', string='关联会议室') + issue_meeting_id = fields.Many2one('issue.library', string='关联议题库') + decision_results = fields.Selection([('agree', '通过'), ('disagree', '未通过')], string="决策结果") + decision_details = fields.Text(string="决策详情") diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py index d480ffa0d..5440433e5 100644 --- a/yuthon_issue/models/issue_library.py +++ b/yuthon_issue/models/issue_library.py @@ -26,10 +26,9 @@ class IssueLibrary(models.Model): issue_approval_id = fields.Many2one('issue.approval', string="关联议题审批") issue_library_line_ids = fields.One2many('issue.library.line', 'issue_library_id', string="决策明细") issue_library_approval_line_ids = fields.One2many('issue.library.approval.line', 'issue_approval_id', string='流程记录') - room_booking_id = fields.Many2one('room.booking', string="会议室") approval_decision_sequence = fields.Char(string="决策清单事项") - decision_results = fields.Selection([('agree', '通过'), ('disagree', '未通过')], string="决策结果") - decision_details = fields.Text(string="决策详情") + is_booking = fields.Boolean(string="是否上会") + room_booking_ids = fields.One2many('room.booking', 'room_booking_id', string="关联会议明细行") # 权限相关隐藏字段 employee_id = fields.Many2one('hr.employee', string='创建人', default=lambda self: self.env.user.employee_id) @@ -107,7 +106,7 @@ class IssueLibrary(models.Model): "res_model": "room.booking", "views": [[form_id, "form"]], "context": { - 'default_room_booking_library_ids': [(6, 0, issue_active_ids.ids)], + 'default_room_booking_library_ids': [(6,0, issue_active_ids.ids)], } } diff --git a/yuthon_issue/models/issue_meeting_minutes.py b/yuthon_issue/models/issue_meeting_minutes.py index f09a3a132..af0fffd3b 100644 --- a/yuthon_issue/models/issue_meeting_minutes.py +++ b/yuthon_issue/models/issue_meeting_minutes.py @@ -16,11 +16,13 @@ class IssueMeetingMinutes(models.Model): meeting_minutes_ids = fields.One2many('issue.meeting.minutes.line', 'meeting_minutes_id', string="会议纪要明细") notice_documents_ids = fields.Many2many('documents.document', string="纪要签名附件") + + class IssueMeetingMinutesLine(models.Model): _name = 'issue.meeting.minutes.line' _description = '会议纪要明细行' meeting_minutes_id = fields.Many2one('issue.meeting.minutes', string="关联会议纪要") - name = fields.Char(string='事项名称', required=True) + minutes_id = fields.Many2one('issue.library',string='事项名称', required=True) decision_results = fields.Selection([('agree', '通过'), ('disagree', '未通过')], string="审议情况") overview = fields.Text(string="概述") \ No newline at end of file diff --git a/yuthon_issue/views/inherit_room_booking.xml b/yuthon_issue/views/inherit_room_booking.xml index 351fb26a9..391143d24 100644 --- a/yuthon_issue/views/inherit_room_booking.xml +++ b/yuthon_issue/views/inherit_room_booking.xml @@ -9,8 +9,8 @@ - - + + @@ -20,4 +20,5 @@ + diff --git a/yuthon_issue/views/issue_library_views.xml b/yuthon_issue/views/issue_library_views.xml index 9b81493d0..96b8b66aa 100644 --- a/yuthon_issue/views/issue_library_views.xml +++ b/yuthon_issue/views/issue_library_views.xml @@ -55,6 +55,7 @@ + @@ -105,6 +106,17 @@ + + + + + + + + + + + @@ -1172,8 +1184,8 @@ (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form10')})]"/> - - + + issue.library.tree issue.library @@ -1334,7 +1346,7 @@ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree11')}), (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form11')})]"/> - + issue.library.tree issue.library diff --git a/yuthon_issue/views/issue_meeting_minutes_views.xml b/yuthon_issue/views/issue_meeting_minutes_views.xml index 7314c0c31..f53d2fe56 100644 --- a/yuthon_issue/views/issue_meeting_minutes_views.xml +++ b/yuthon_issue/views/issue_meeting_minutes_views.xml @@ -31,7 +31,7 @@ - + From 808a0e67eb6f0bd95d4509d47b3c7cc41a921c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Oct 2024 15:47:55 +0800 Subject: [PATCH 5/7] pengyuthon --- .../list_view_sticky_header_and_column.scss | 2 + .../views/soong_hr_employee_views.xml | 2 +- yuthon_property/__manifest__.py | 7 ++- yuthon_property/models/__init__.py | 5 ++ .../models/property_patrol_duty.py | 25 +++++++++ .../models/property_patrol_plan.py | 18 ++++++ .../models/property_patrol_position.py | 19 +++++++ .../models/property_patrol_standard.py | 18 ++++++ .../models/property_route_management.py | 13 +++++ yuthon_property/security/ir.model.access.csv | 6 +- yuthon_property/views/menuitem.xml | 29 +++++++++- .../views/property_patrol_duty.xml | 56 +++++++++++++++++++ .../views/property_patrol_plan.xml | 48 ++++++++++++++++ .../views/property_patrol_position.xml | 52 +++++++++++++++++ .../views/property_patrol_standard.xml | 50 +++++++++++++++++ .../views/property_route_management.xml | 40 +++++++++++++ yuthon_work_brand/views/hr_menus.xml | 4 +- 17 files changed, 387 insertions(+), 7 deletions(-) create mode 100644 yuthon_property/models/property_patrol_duty.py create mode 100644 yuthon_property/models/property_patrol_plan.py create mode 100644 yuthon_property/models/property_patrol_position.py create mode 100644 yuthon_property/models/property_patrol_standard.py create mode 100644 yuthon_property/models/property_route_management.py create mode 100644 yuthon_property/views/property_patrol_duty.xml create mode 100644 yuthon_property/views/property_patrol_plan.xml create mode 100644 yuthon_property/views/property_patrol_position.xml create mode 100644 yuthon_property/views/property_patrol_standard.xml create mode 100644 yuthon_property/views/property_route_management.xml diff --git a/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss b/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss index d6e7285c0..72dc1ebfa 100644 --- a/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss +++ b/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss @@ -63,3 +63,5 @@ th:hover .fa-thumb-tack, th.clicked-header .fa-thumb-tack { display: block; } + +//.o_input:hover{background: #b3c8df!important;} diff --git a/soong_workflow/views/soong_hr_employee_views.xml b/soong_workflow/views/soong_hr_employee_views.xml index c51a30d4b..60c2bdbfd 100644 --- a/soong_workflow/views/soong_hr_employee_views.xml +++ b/soong_workflow/views/soong_hr_employee_views.xml @@ -7,7 +7,7 @@ - + diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py index 877967f29..4eed42589 100644 --- a/yuthon_property/__manifest__.py +++ b/yuthon_property/__manifest__.py @@ -12,6 +12,11 @@ 'data/data_yuthon_resource_mgmt_config.xml', 'views/yuthon_property_views.xml', 'views/property_type_views.xml', + 'views/property_patrol_duty.xml', + 'views/property_patrol_plan.xml', + 'views/property_route_management.xml', + 'views/property_patrol_position.xml', + 'views/property_patrol_standard.xml', 'views/yuthon_draw_result_views.xml', 'views/yuthon_expert_database_views.xml', 'views/yuthon_resource_mgmt_config_views.xml', @@ -19,7 +24,7 @@ 'views/menuitem.xml', ], 'demo': [], - 'depends': ['mail'], + 'depends': ['mail','documents','soong_workflow'], 'installable': True, 'application': True, } diff --git a/yuthon_property/models/__init__.py b/yuthon_property/models/__init__.py index 0b1365487..dcf016523 100644 --- a/yuthon_property/models/__init__.py +++ b/yuthon_property/models/__init__.py @@ -1,5 +1,10 @@ from . import yuthon_property from . import property_type +from . import property_patrol_duty +from . import property_patrol_plan +from . import property_patrol_position +from . import property_patrol_standard +from . import property_route_management from . import yuthon_resource_mgmt_config from . import yuthon_draw_result from . import yuthon_expert_database diff --git a/yuthon_property/models/property_patrol_duty.py b/yuthon_property/models/property_patrol_duty.py new file mode 100644 index 000000000..907f5bd67 --- /dev/null +++ b/yuthon_property/models/property_patrol_duty.py @@ -0,0 +1,25 @@ +from odoo import models, fields, api + + +class PropertyPatrolDuty(models.Model): + _name = 'property.patrol.duty' + _description = '巡更任务' + + number = fields.Integer(string='序号') + task_number = fields.Char(string='任务编号') + task_category = fields.Char(string='任务类别') + route_name = fields.Char(string='路线名称') + people = fields.Char(string='责任人') + scheduled_time = fields.Datetime(string='计划巡检时间') + task_status = fields.Selection([('all_tasks', '全部任务'), ('not_started', '未开始'), + ('ing', '进行中'), ('ed', '已完成'), + ('overtime', '超时关闭'), ('void', '已作废')], string='任务状态') + timeout_cause = fields.Char(string='超时原因') + create_date = fields.Date(string="开工时间") + end_date = fields.Date(string="完工时间") + point_random = fields.Char(string='点位随机') + inspection_completion = fields.Char(string='巡检完成率') + inspection_schedule = fields.Char(string='巡检进度') + controls = fields.Char(string='操作') + + diff --git a/yuthon_property/models/property_patrol_plan.py b/yuthon_property/models/property_patrol_plan.py new file mode 100644 index 000000000..23ea99f4d --- /dev/null +++ b/yuthon_property/models/property_patrol_plan.py @@ -0,0 +1,18 @@ +from odoo import models, fields, api + + +class PropertyPatrolPlan(models.Model): + _name = 'property.patrol.plan' + _description = '巡更计划' + + plan_name = fields.Char(string='计划名称') + plan_category = fields.Char(string='计划类型') + people = fields.Char(string='巡检责任人') + time = fields.Integer(string='巡检周期') + start_date = fields.Date(string="生效日") + end_date = fields.Date(string="失效日") + generation_number = fields.Integer(string='任务生成数') + completed_number = fields.Integer(string='任务完成数') + founder = fields.Char(string='创建人/时间') + controls = fields.Char(string='操作') + diff --git a/yuthon_property/models/property_patrol_position.py b/yuthon_property/models/property_patrol_position.py new file mode 100644 index 000000000..2f93e51ea --- /dev/null +++ b/yuthon_property/models/property_patrol_position.py @@ -0,0 +1,19 @@ +from odoo import models, fields, api + + +class PropertyPatrolPosition(models.Model): + _name = 'property.patrol.position' + _description = '巡更点位' + + number = fields.Integer(string='序号') + point_number = fields.Char(string='点位编号') + point_name = fields.Char(string='点位名称') + external_coding = fields.Char(string='外部编码') + position = fields.Char(string='具体位置') + adapt_work = fields.Char(string='适应岗位') + founder = fields.Char(string='创建人/时间') + clock_in = fields.Boolean(string='扫码签到') + picture = fields.Boolean(string='强制拍照') + outside = fields.Char(string='外部二维码') + code_management = fields.Char(string='二维码管理') + controls = fields.Char(string='操作') diff --git a/yuthon_property/models/property_patrol_standard.py b/yuthon_property/models/property_patrol_standard.py new file mode 100644 index 000000000..1e8dd4d61 --- /dev/null +++ b/yuthon_property/models/property_patrol_standard.py @@ -0,0 +1,18 @@ +from odoo import models, fields, api + + +class PropertyPatrolStandard(models.Model): + _name = 'property.patrol.standard' + _description = '巡更标准' + + number = fields.Integer(string='序号') + task_number = fields.Char(string='任务编号') + question_type = fields.Char(string='题类型') + check_item = fields.Selection([('sweep_floor', '扫地拖地'), ('gate', '看大门'), ('Back door', '看后门')], string='检查顶') + title = fields.Selection([('cleaning', '保洁卫生'), ('gate', '看大门'), ('back_door', '看后门')], string='标题') + check_details = fields.Selection([('gate', '看大门'), ('back_door', '看后门')], string='检查明细') + result_option = fields.Selection([('ood', '好'), ('normal', '一般'), ('bad', '差')], string='检查明细') + people = fields.Char(string='创建人') + time = fields.Datetime(string='时间') + ed_time = fields.Datetime(string='最后修改') + controls = fields.Char(string='操作') diff --git a/yuthon_property/models/property_route_management.py b/yuthon_property/models/property_route_management.py new file mode 100644 index 000000000..5adf2d3f7 --- /dev/null +++ b/yuthon_property/models/property_route_management.py @@ -0,0 +1,13 @@ +from odoo import models, fields, api + + +class PropertyRouteManagement(models.Model): + _name = 'property.route.management' + _description = '路线管理' + + number = fields.Integer(string='序号') + patrol_types = fields.Char(string='安防巡更类型') + route_sequence = fields.Char(string='路线顺序') + patrol_number = fields.Integer(string='巡更点数量') + founder = fields.Char(string='创建人/时间') + controls = fields.Char(string='操作') diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv index c56b8b589..f1d5b151c 100644 --- a/yuthon_property/security/ir.model.access.csv +++ b/yuthon_property/security/ir.model.access.csv @@ -1,7 +1,11 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_yuthon_property,yuthon_property,model_yuthon_property,base.group_user,1,1,1,1 access_property_type,property_type,model_property_type,base.group_user,1,1,1,1 - +access_property_patrol_duty,property_patrol_duty,model_property_patrol_duty,base.group_user,1,1,1,1 +access_property_patrol_plan,property_patrol_plan,model_property_patrol_plan,base.group_user,1,1,1,1 +access_property_route_management,property_route_management,model_property_route_management,base.group_user,1,1,1,1 +access_property_patrol_position,property_patrol_position,model_property_patrol_position,base.group_user,1,1,1,1 +access_property_patrol_standard,property_patrol_standard,model_property_patrol_standard,base.group_user,1,1,1,1 access_yuthon_draw_result,yuthon.draw.result,model_yuthon_draw_result,base.group_user,1,1,1,1 access_yuthon_expert_database,yuthon.expert.database,model_yuthon_expert_database,base.group_user,1,1,1,1 access_yuthon_property_water,yuthon.property.water,model_yuthon_property_water,base.group_user,1,1,1,1 diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml index 7128258e8..0dbf6cdbe 100644 --- a/yuthon_property/views/menuitem.xml +++ b/yuthon_property/views/menuitem.xml @@ -21,7 +21,7 @@ sequence="1" name="待评估" parent="yuthon_property_menu" - action="yuthon_property_evaluation_action1"/> + action="property_assess_action"/> + + + + + + + + property.patrol.duty.tree + property.patrol.duty + + + + + + + + + + + + + + + + + + + + + property.patrol.duty.form + property.patrol.duty + +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + 巡更任务 + property.patrol.duty + tree,form + +
diff --git a/yuthon_property/views/property_patrol_plan.xml b/yuthon_property/views/property_patrol_plan.xml new file mode 100644 index 000000000..701879d89 --- /dev/null +++ b/yuthon_property/views/property_patrol_plan.xml @@ -0,0 +1,48 @@ + + + + property.patrol.plan.tree + property.patrol.plan + + + + + + + + + + + + + + + + + property.patrol.plan.form + property.patrol.plan + +
+ + + + + + + + + + + + + + +
+
+
+ + 巡更计划 + property.patrol.plan + tree,form + +
diff --git a/yuthon_property/views/property_patrol_position.xml b/yuthon_property/views/property_patrol_position.xml new file mode 100644 index 000000000..8fe0f0163 --- /dev/null +++ b/yuthon_property/views/property_patrol_position.xml @@ -0,0 +1,52 @@ + + + + property.patrol.position.tree + property.patrol.position + + + + + + + + + + + + + + + + + + + property.patrol.position.form + property.patrol.position + +
+ + + + + + + + + + + + + + + + +
+
+
+ + 巡更点位 + property.patrol.position + tree,form + +
diff --git a/yuthon_property/views/property_patrol_standard.xml b/yuthon_property/views/property_patrol_standard.xml new file mode 100644 index 000000000..6119ff19a --- /dev/null +++ b/yuthon_property/views/property_patrol_standard.xml @@ -0,0 +1,50 @@ + + + + property.patrol.standard.tree + property.patrol.standard + + + + + + + + + + + + + + + + + + property.patrol.standard.form + property.patrol.standard + +
+ + + + + + + + + + + + + + + +
+
+
+ + 巡更标准 + property.patrol.standard + tree,form + +
diff --git a/yuthon_property/views/property_route_management.xml b/yuthon_property/views/property_route_management.xml new file mode 100644 index 000000000..b31639635 --- /dev/null +++ b/yuthon_property/views/property_route_management.xml @@ -0,0 +1,40 @@ + + + + property.route.management.tree + property.route.management + + + + + + + + + + + + + property.route.management.form + property.route.management + +
+ + + + + + + + + + +
+
+
+ + 路线管理 + property.route.management + tree,form + +
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml index 679765151..9aecdb314 100644 --- a/yuthon_work_brand/views/hr_menus.xml +++ b/yuthon_work_brand/views/hr_menus.xml @@ -453,11 +453,11 @@ parent="holiday_set_menu_board" action="hr_holidays.open_view_accrual_plans" sequence="3"/> - + sequence="5"/> Date: Thu, 24 Oct 2024 16:00:38 +0800 Subject: [PATCH 6/7] pengyuthon --- yuthon_hr_attendance/__manifest__.py | 4 +- yuthon_hr_attendance/models/__init__.py | 1 - .../models/holidays_approval.py | 85 ------------------- .../security/ir.model.access.csv | 1 - .../views/holidays_approval.xml | 67 --------------- yuthon_hr_attendance/wizard/__init__.py | 1 - .../wizard/holiday_details_wizard.py | 21 ----- .../wizard/holiday_details_wizard_views.xml | 21 ----- 8 files changed, 1 insertion(+), 200 deletions(-) delete mode 100644 yuthon_hr_attendance/models/holidays_approval.py delete mode 100644 yuthon_hr_attendance/views/holidays_approval.xml delete mode 100644 yuthon_hr_attendance/wizard/holiday_details_wizard.py delete mode 100644 yuthon_hr_attendance/wizard/holiday_details_wizard_views.xml diff --git a/yuthon_hr_attendance/__manifest__.py b/yuthon_hr_attendance/__manifest__.py index 767039f7c..badddeb7e 100644 --- a/yuthon_hr_attendance/__manifest__.py +++ b/yuthon_hr_attendance/__manifest__.py @@ -12,8 +12,7 @@ 'category': 'Human Resources/Attendances', 'sequence': 240, 'website': 'https://www.pengyuthon.com', - # 'depends': ['hr_attendance', 'resource', 'base', 'hr', 'mail', 'soong_workflow'], - 'depends': ['hr_attendance', 'resource', 'base', 'hr', 'mail','soong_workflow','yuthon_holiday'], + 'depends': ['hr_attendance', 'resource', 'base', 'hr', 'mail', 'soong_workflow'], 'data': [ 'security/ir.model.access.csv', # 'security/approval_attendance.xml', @@ -29,7 +28,6 @@ 'views/go_approval.xml', 'views/duty_approval.xml', 'views/leave_approval.xml', - # 'views/holidays_approval.xml', 'views/remove_holiday_approval.xml', 'views/card_approval.xml', 'views/holiday_manage.xml', diff --git a/yuthon_hr_attendance/models/__init__.py b/yuthon_hr_attendance/models/__init__.py index 18702cbd0..70b02613f 100644 --- a/yuthon_hr_attendance/models/__init__.py +++ b/yuthon_hr_attendance/models/__init__.py @@ -8,7 +8,6 @@ from . import overtime_approval from . import go_approval from . import duty_approval from . import leave_approval -from . import holidays_approval from . import remove_holiday_approval from . import card_approval from . import holiday_manage diff --git a/yuthon_hr_attendance/models/holidays_approval.py b/yuthon_hr_attendance/models/holidays_approval.py deleted file mode 100644 index 07b36fbd5..000000000 --- a/yuthon_hr_attendance/models/holidays_approval.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- -from email.policy import default - -from odoo import api, fields, models, tools, _ -from datetime import datetime, time, timedelta -from odoo.exceptions import ValidationError, UserError - - -class HolidaysApprovals(models.Model): - _name = 'holidays.approval' - _description = "请假审批" - # _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin'] - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin'] - - name = fields.Char(string="名称") - company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="公司") - applicant_id = fields.Many2one('hr.employee', string="申请人", default=lambda self: self.env.user.id) - leave_absence_id = fields.Many2one('hr.employee', string="请假人") - code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('holidays_approval')) - department_id = fields.Many2one('hr.department', string="部门") - approvals_ids = fields.One2many('holidays.approvals.line', 'approvals_id', string="请假审批行") - - def holiday_approval(self): - pass - - @api.onchange('applicant_id') - def _onchange_applicant_id(self): - self.leave_absence_id = self.applicant_id - - -class HolidaysApprovalsLine(models.Model): - _name = 'holidays.approvals.line' - _description = '请假审批行' - - name = fields.Char(string="请假事由") - approvals_id = fields.Many2one('holidays.approval', string="管理请假审批") - vacation_category = fields.Many2one('holiday.type.setting', string="休假类别") - leave_type_id = fields.Many2one('hr.leave.type', string="请假类型",) - days_available = fields.Float(string="可用天数", store=True) - applicants = fields.Selection([('hour', '按小时'), ('day', '天'), ('half_day', '半天')], string="申请单位", - store=True) - date_start = fields.Datetime(string="开始时间", default=fields.Datetime.now) - date_end = fields.Datetime(string="结束时间") - leave_days = fields.Float(string='请假天数', store=True,compute='_compute_leave_days') - surplus_days = fields.Float(string="剩余天数",compute='_compute_surplus_days') - - @api.onchange('leave_type_id') - def onchange_approvals_ids(self): - for rec in self: - rec.days_available = rec.leave_type_id.holiday_days - rec.applicants = rec.leave_type_id.request_unit - - @api.depends('date_start', 'date_end') - def _compute_leave_days(self): - for rec in self: - if rec.date_start and rec.date_end: - delta = rec.date_end - rec.date_start - rec.leave_days = delta.days + (delta.seconds / 86400) - if rec.applicants == 'hour': - rec.leave_days = rec.leave_days / 24 - else: - rec.leave_days = 0 - - @api.depends('leave_days', 'days_available') - def _compute_surplus_days(self): - for rec in self: - rec.surplus_days = rec.days_available - rec.leave_days - - def button_holiday_detail(self): - return { - 'name': '请假详情', - 'view_mode': 'form', - 'res_model': 'holiday.details.wizard', - 'type': 'ir.actions.act_window', - 'target': 'new', - "context": { - 'default_holiday_days': self.leave_type_id.holiday_days, - 'default_vacation_days_description': self.leave_type_id.vacation_days_description, - 'default_vacation_type_id': self.vacation_category.id, - 'default_annual': self.leave_type_id.annual, - 'default_treated': self.leave_type_id.treated, - 'default_remarks': self.leave_type_id.remarks, - 'default_leave_type_id': self.leave_type_id.id, - } - } diff --git a/yuthon_hr_attendance/security/ir.model.access.csv b/yuthon_hr_attendance/security/ir.model.access.csv index 257207994..b3e4a98ad 100644 --- a/yuthon_hr_attendance/security/ir.model.access.csv +++ b/yuthon_hr_attendance/security/ir.model.access.csv @@ -20,4 +20,3 @@ access_holidays_approvals_line,holidays.approvals.line,model_holidays_approvals_ access_go_approvals_line,go.approvals.line,model_go_approvals_line,base.group_user,1,1,1,1 access_overtime_user_line,overtime.user.line,model_overtime_user_line,base.group_user,1,1,1,1 access_duty_approval_line,duty.approval.line,model_duty_approval_line,base.group_user,1,1,1,1 -access_holiday_details_wizard,holiday.details.wizard,model_holiday_details_wizard,base.group_user,1,1,1,1 diff --git a/yuthon_hr_attendance/views/holidays_approval.xml b/yuthon_hr_attendance/views/holidays_approval.xml deleted file mode 100644 index c3e62f4ad..000000000 --- a/yuthon_hr_attendance/views/holidays_approval.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - holiday.approval.tree - holidays.approval - - - - - - - - - - - holiday.approval.actions - holidays.approval - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - - - - + + +