diff --git a/yuthon_issue/views/issue_library_views.xml b/yuthon_issue/views/issue_library_views.xml index 517c895ad..fbbe7a1be 100644 --- a/yuthon_issue/views/issue_library_views.xml +++ b/yuthon_issue/views/issue_library_views.xml @@ -2672,6 +2672,9 @@ 议题库 issue.library tree,form + 批量上会 diff --git a/yuthon_issue/views/menus.xml b/yuthon_issue/views/menus.xml index b4e094ecf..d01acb392 100644 --- a/yuthon_issue/views/menus.xml +++ b/yuthon_issue/views/menus.xml @@ -11,17 +11,16 @@ parent="tianhe_issue_library_menu_root" action="issue_library_my_action" sequence="1"/> - + name="议题审批" + action="issue_library_approval_action" + sequence="5"/> - + sequence="10"/> - - - - - - - - - - - - + sequence="15"/> + sequence="20"/> + sequence="25"/> + sequence="30"/> + sequence="35"/> + + + + + + + + + + + + + sequence="45"/> + sequence="50"/> - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/yuthon_property/models/property_electric_reading.py b/yuthon_property/models/property_electric_reading.py index bd415f42c..347f5943d 100644 --- a/yuthon_property/models/property_electric_reading.py +++ b/yuthon_property/models/property_electric_reading.py @@ -1,4 +1,5 @@ from odoo import models, fields, api +from odoo.exceptions import UserError, ValidationError class PropertyElectricReading(models.Model): @@ -10,7 +11,6 @@ class PropertyElectricReading(models.Model): position = fields.Char(string='单元编号') property_id = fields.Many2one('yuthon.property', string='地址') users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) - contract = fields.Char(string='合同') lessee_id = fields.Many2one(related='property_id.lessee_id', string="承租方") state = fields.Char(string='状态') employee_ids = fields.Many2many('hr.employee', string='抄表人') @@ -51,3 +51,18 @@ class PropertyElectricReading(models.Model): 'res_model': 'property.electric.reading', 'res_id': self.id, } + + def button_electric_push(self): + for rec in self: + rec.write({ + 'is_push': True, + }) + if rec.is_push: + raise UserError(f"该仪表已经推送,不能重复推送") + self.env["property.tariff.list"].create({ + 'code': rec.name, + 'property_id': rec.yuthon_property_id.id if rec.yuthon_property_id else None, + 'ratio': rec.gauge_magnification, + 'position': rec.unit_number, + 'type': rec.type, + }) \ No newline at end of file diff --git a/yuthon_property/models/property_management_list.py b/yuthon_property/models/property_management_list.py index f860f17b6..59aea3f44 100644 --- a/yuthon_property/models/property_management_list.py +++ b/yuthon_property/models/property_management_list.py @@ -5,21 +5,12 @@ class PropertyManagementList(models.Model): _name = 'property.management.list' _description = '物业费管理列表' - contract_code = fields.Char(string='合同编号', required=True) + contract_code = fields.Char(string='合同编号') property_id = fields.Many2one('yuthon.property', string='物业') lessee_id = fields.Many2one('property.tenant.information', string='承租方') due_date = fields.Date(string='应收日期') - year = fields.Char(string='所属年') - month = fields.Char(string='所属月') - management_fee_standard = fields.Float(string='管理费标准') - original_amount = fields.Float(string='原金额') + message_standard_id = fields.Many2one('property.message.fee', string="管理费标准") + original_amount = fields.Float(string='金额') reduction_amount = fields.Float(string='减免金额') remarks = fields.Text(string='备注') - is_cancel = fields.Boolean(string='作废') - is_red = fields.Boolean(string='红冲') - red_date = fields.Date(string='红冲日期') - charge_status = fields.Selection([('not_paid', '未收'), ('paid', '已收')], string='收费状态') - is_invoice = fields.Boolean(string='开票') - is_suspend = fields.Boolean(string='挂起') create_time = fields.Datetime(string='创建时间') - last_update_time = fields.Datetime(string='最后修改时间') diff --git a/yuthon_property/models/property_meter_archives.py b/yuthon_property/models/property_meter_archives.py index dc7ca915d..db21a33ed 100644 --- a/yuthon_property/models/property_meter_archives.py +++ b/yuthon_property/models/property_meter_archives.py @@ -63,35 +63,4 @@ class PropertyMeterArchives(models.Model): "target": "new", } - def button_reading_push(self): - for rec in self: - rec.write({ - 'is_push': True, - }) - if rec.is_push: - raise UserError("该仪表已经推送,不能重复推送") - self.env["property.electric.reading"].create({ - 'code': rec.name, - 'property_id': rec.yuthon_property_id.id if rec.yuthon_property_id else None, - 'ratio': rec.gauge_magnification, - 'position': rec.unit_number, - 'type': rec.type, - 'is_push': True, - }) - def batch_reading_push(self): - archives_ids = self.env["property.meter.archives"].browse(self._context.get('active_ids', self._context.get('active_id'))) - for record in archives_ids: - record.write({ - 'is_push': True, - }) - if record.is_push: - raise UserError(f"该{record.name}仪表已经推送,不能重复推送") - self.env["property.electric.reading"].create({ - 'code': record.name, - 'property_id': record.yuthon_property_id.id if record.yuthon_property_id else None, - 'ratio': record.gauge_magnification, - 'position': record.unit_number, - 'type': record.type, - 'is_push': True, - }) \ No newline at end of file diff --git a/yuthon_property/models/property_meter_water.py b/yuthon_property/models/property_meter_water.py index 843e69dbd..a926f3abe 100644 --- a/yuthon_property/models/property_meter_water.py +++ b/yuthon_property/models/property_meter_water.py @@ -61,36 +61,3 @@ class PropertyMeterWater(models.Model): "view_mode": "form", "target": "new", } - - def button_reading_water_push(self): - for rec in self: - rec.write({ - 'is_push': True, - }) - if rec.is_push: - raise UserError(f"该仪表已经推送,不能重复推送") - self.env["property.water.reading"].create({ - 'code': rec.name , - 'property_id': rec.yuthon_property_id.id if rec.yuthon_property_id else None, - 'ratio': rec.gauge_magnification, - 'position': rec.unit_number , - 'type': rec.type, - 'is_push': True, - }) - - def batch_reading_water_push(self): - water_ids = self.env["property.meter.water"].browse(self._context.get('active_ids', self._context.get('active_id'))) - for record in water_ids: - record.write({ - 'is_push': True, - }) - if record.is_push: - raise UserError(f"该{record.unit_number}仪表已经推送,不能重复推送") - self.env["property.water.reading"].create({ - 'code': record.name, - 'property_id': record.yuthon_property_id.id if record.yuthon_property_id else None, - 'ratio': record.gauge_magnification, - 'position': record.unit_number, - 'type': record.type, - 'is_push': True, - }) \ No newline at end of file diff --git a/yuthon_property/models/property_tariff_list.py b/yuthon_property/models/property_tariff_list.py index 2dc27b896..eebce76db 100644 --- a/yuthon_property/models/property_tariff_list.py +++ b/yuthon_property/models/property_tariff_list.py @@ -14,7 +14,7 @@ class PropertyTariffList(models.Model): month = fields.Char(string='所属月') tariff_meter_reading = fields.Float(string='电费读数') tariff_fee_standard = fields.Float(string='电费标准') - original_amount = fields.Float(string='原金额') + original_amount = fields.Float(string='金额') deduction_amount = fields.Float(string='减免金额') remarks = fields.Text(string='备注') is_cancel = fields.Boolean(string='作废') diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml index d38218432..73529dd03 100644 --- a/yuthon_property/views/menuitem.xml +++ b/yuthon_property/views/menuitem.xml @@ -83,27 +83,11 @@ sequence="4" name="应收" parent="yuthon_property_estate_menu"/> - - - - - - - - - @@ -43,7 +42,6 @@ - @@ -85,11 +83,6 @@ - - 电表抄表任务 - property.electric.reading - tree,form,search - 发送消息提醒 diff --git a/yuthon_property/views/property_management_list_views.xml b/yuthon_property/views/property_management_list_views.xml index f886e93e3..8a865db16 100644 --- a/yuthon_property/views/property_management_list_views.xml +++ b/yuthon_property/views/property_management_list_views.xml @@ -5,32 +5,16 @@ property.management.list - - - - + - - - - - - - - - + - - 管理费列表 - property.management.list - tree - diff --git a/yuthon_property/views/property_meter_archives_views.xml b/yuthon_property/views/property_meter_archives_views.xml index c112f388c..3232fb7a6 100644 --- a/yuthon_property/views/property_meter_archives_views.xml +++ b/yuthon_property/views/property_meter_archives_views.xml @@ -14,7 +14,6 @@ -