From 06b5e39b476279bc5f98751b0a9b0409dbb640d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E6=9C=AA=E5=A4=AE?= <2996985766@qq.com> Date: Wed, 24 Sep 2025 23:13:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E8=A7=92=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- estate/views/res_users_views.xml | 2 +- many2many_tags_preview/.gitignore | 5 -- many2many_tags_preview/LICENSE | 27 ------ many2many_tags_preview/README.md | 6 +- .../{many2many_tags_preview => }/__init__.py | 0 .../__manifest__.py | 0 .../many2many_tags_preview/LICENSE | 27 ------ .../many2many_tags_preview/README.md | 79 ------------------ .../models/__init__.py | 0 .../models/ir_ui_view.py | 0 .../static/description/cover.png | Bin .../static/description/gifs/FormPreview.gif | Bin .../static/description/gifs/KanbanPreview.gif | Bin .../static/description/gifs/ListPreview.gif | Bin .../static/description/icon.png | Bin .../static/description/icon.svg | 0 .../static/description/index.html | 0 .../kanban_many2many_tags_field.js | 0 .../many2many_tags/many2many_tags_field.js | 0 .../many2many_tags/many2many_tags_field.xml | 0 ...many2many_tags_field_color_list_popover.js | 0 21 files changed, 4 insertions(+), 142 deletions(-) delete mode 100644 many2many_tags_preview/.gitignore delete mode 100644 many2many_tags_preview/LICENSE rename many2many_tags_preview/{many2many_tags_preview => }/__init__.py (100%) rename many2many_tags_preview/{many2many_tags_preview => }/__manifest__.py (100%) delete mode 100644 many2many_tags_preview/many2many_tags_preview/LICENSE delete mode 100644 many2many_tags_preview/many2many_tags_preview/README.md rename many2many_tags_preview/{many2many_tags_preview => }/models/__init__.py (100%) rename many2many_tags_preview/{many2many_tags_preview => }/models/ir_ui_view.py (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/description/cover.png (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/description/gifs/FormPreview.gif (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/description/gifs/KanbanPreview.gif (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/description/gifs/ListPreview.gif (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/description/icon.png (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/description/icon.svg (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/description/index.html (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/src/many2many_tags/kanban_many2many_tags_field.js (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/src/many2many_tags/many2many_tags_field.js (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/src/many2many_tags/many2many_tags_field.xml (100%) rename many2many_tags_preview/{many2many_tags_preview => }/static/src/many2many_tags/many2many_tags_field_color_list_popover.js (100%) diff --git a/estate/views/res_users_views.xml b/estate/views/res_users_views.xml index f1928d5c7..c2b32c6d3 100644 --- a/estate/views/res_users_views.xml +++ b/estate/views/res_users_views.xml @@ -6,7 +6,7 @@ - + diff --git a/many2many_tags_preview/.gitignore b/many2many_tags_preview/.gitignore deleted file mode 100644 index 47e0bb75b..000000000 --- a/many2many_tags_preview/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -__pycache__/ -*.py[cod] -*.pyo -*.pyd -*.so \ No newline at end of file diff --git a/many2many_tags_preview/LICENSE b/many2many_tags_preview/LICENSE deleted file mode 100644 index 7a5c68e71..000000000 --- a/many2many_tags_preview/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Odoo Proprietary License v1.0 - -This software and associated files (the "Software") may only be used (executed, -modified, executed after modifications) if you have purchased a valid license -from the authors, typically via Odoo Apps, or if you have received a written -agreement from the authors of the Software (see the COPYRIGHT file). - -You may develop Odoo modules that use the Software as a library (typically -by depending on it, importing it and using its resources), but without copying -any source code or material from the Software. You may distribute those -modules under the license of your choice, provided that this license is -compatible with the terms of the Odoo Proprietary License (For example: -LGPL, MIT, or proprietary licenses similar to this one). - -It is forbidden to publish, distribute, sublicense, or sell copies of the Software -or modified copies of the Software. - -The above copyright notice and this permission notice must be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/many2many_tags_preview/README.md b/many2many_tags_preview/README.md index c7a644719..c976dfb98 100644 --- a/many2many_tags_preview/README.md +++ b/many2many_tags_preview/README.md @@ -51,15 +51,15 @@ In your Odoo view XML file, use the widget with options: ### Form View -![FormPreview](many2many_tags_preview/static/description/gifs/FormPreview.gif) +![FormPreview](static/description/gifs/FormPreview.gif) ### List View -![ListPreview](many2many_tags_preview/static/description/gifs/ListPreview.gif) +![ListPreview](static/description/gifs/ListPreview.gif) ### Kanban View -![KanbanPreview](many2many_tags_previewstatic/description/gifs/KanbanPreview.gif) +![KanbanPreview](static/description/gifs/KanbanPreview.gif) --- diff --git a/many2many_tags_preview/many2many_tags_preview/__init__.py b/many2many_tags_preview/__init__.py similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/__init__.py rename to many2many_tags_preview/__init__.py diff --git a/many2many_tags_preview/many2many_tags_preview/__manifest__.py b/many2many_tags_preview/__manifest__.py similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/__manifest__.py rename to many2many_tags_preview/__manifest__.py diff --git a/many2many_tags_preview/many2many_tags_preview/LICENSE b/many2many_tags_preview/many2many_tags_preview/LICENSE deleted file mode 100644 index 7a5c68e71..000000000 --- a/many2many_tags_preview/many2many_tags_preview/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Odoo Proprietary License v1.0 - -This software and associated files (the "Software") may only be used (executed, -modified, executed after modifications) if you have purchased a valid license -from the authors, typically via Odoo Apps, or if you have received a written -agreement from the authors of the Software (see the COPYRIGHT file). - -You may develop Odoo modules that use the Software as a library (typically -by depending on it, importing it and using its resources), but without copying -any source code or material from the Software. You may distribute those -modules under the license of your choice, provided that this license is -compatible with the terms of the Odoo Proprietary License (For example: -LGPL, MIT, or proprietary licenses similar to this one). - -It is forbidden to publish, distribute, sublicense, or sell copies of the Software -or modified copies of the Software. - -The above copyright notice and this permission notice must be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/many2many_tags_preview/many2many_tags_preview/README.md b/many2many_tags_preview/many2many_tags_preview/README.md deleted file mode 100644 index c976dfb98..000000000 --- a/many2many_tags_preview/many2many_tags_preview/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# Many2Many Tags Preview - -🚀 **Odoo Module** — 快速预览 Many2Many 字段的标签,提升导航效率。 -This module enhances the standard `many2many_tags` widget in Odoo, allowing instant preview and quick access to related records in **List, Form, and Kanban** views. - ---- - -## ✨ Features - -- 🔍 **Quick Preview** - Preview related records directly from many2many tags. - -- ⚙️ **Custom Form View** - Support `context={'open_form_view': 'xml_id'}` to open a specific form view. - -- 🔄 **Seamless Integration** - Fully compatible with Odoo native `many2many_tags`. - -- 📱 **Multi-View Support** - Works in **List**, **Form**, and **Kanban** views. - ---- - -## 📦 Installation - -1. Clone this repository into your Odoo `addons` directory -2. Restart Odoo server. -3. Activate developer mode. -4. Update Apps list and install **Many2Many Tags Preview** module. - ---- - -## 🛠 Usage - -In your Odoo view XML file, use the widget with options: - -```xml - -``` - -- `widget="many2many_tags"` → Render tags. -- `options="{'color_field': 'color'}"` → Use the `color` field for tag coloring. -- `context="{'open_form_view': 'xml_id'}` → Specify a custom form view (if omitted, default form opens). - ---- - -## 🖼 Screenshots - -### Form View - -![FormPreview](static/description/gifs/FormPreview.gif) - -### List View - -![ListPreview](static/description/gifs/ListPreview.gif) - -### Kanban View - -![KanbanPreview](static/description/gifs/KanbanPreview.gif) - ---- - -## 📌 Compatibility - -- ✅ Odoo 17.0 -- ✅ Odoo 18.0 -- ✅ Odoo 19.0 - -Supports **Community** and **Enterprise** editions. - ---- - -## 📧 Contact - -Author: **LuckyJie12** -Email: [2996985766@qq.com](mailto:2996985766@qq.com) diff --git a/many2many_tags_preview/many2many_tags_preview/models/__init__.py b/many2many_tags_preview/models/__init__.py similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/models/__init__.py rename to many2many_tags_preview/models/__init__.py diff --git a/many2many_tags_preview/many2many_tags_preview/models/ir_ui_view.py b/many2many_tags_preview/models/ir_ui_view.py similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/models/ir_ui_view.py rename to many2many_tags_preview/models/ir_ui_view.py diff --git a/many2many_tags_preview/many2many_tags_preview/static/description/cover.png b/many2many_tags_preview/static/description/cover.png similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/description/cover.png rename to many2many_tags_preview/static/description/cover.png diff --git a/many2many_tags_preview/many2many_tags_preview/static/description/gifs/FormPreview.gif b/many2many_tags_preview/static/description/gifs/FormPreview.gif similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/description/gifs/FormPreview.gif rename to many2many_tags_preview/static/description/gifs/FormPreview.gif diff --git a/many2many_tags_preview/many2many_tags_preview/static/description/gifs/KanbanPreview.gif b/many2many_tags_preview/static/description/gifs/KanbanPreview.gif similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/description/gifs/KanbanPreview.gif rename to many2many_tags_preview/static/description/gifs/KanbanPreview.gif diff --git a/many2many_tags_preview/many2many_tags_preview/static/description/gifs/ListPreview.gif b/many2many_tags_preview/static/description/gifs/ListPreview.gif similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/description/gifs/ListPreview.gif rename to many2many_tags_preview/static/description/gifs/ListPreview.gif diff --git a/many2many_tags_preview/many2many_tags_preview/static/description/icon.png b/many2many_tags_preview/static/description/icon.png similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/description/icon.png rename to many2many_tags_preview/static/description/icon.png diff --git a/many2many_tags_preview/many2many_tags_preview/static/description/icon.svg b/many2many_tags_preview/static/description/icon.svg similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/description/icon.svg rename to many2many_tags_preview/static/description/icon.svg diff --git a/many2many_tags_preview/many2many_tags_preview/static/description/index.html b/many2many_tags_preview/static/description/index.html similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/description/index.html rename to many2many_tags_preview/static/description/index.html diff --git a/many2many_tags_preview/many2many_tags_preview/static/src/many2many_tags/kanban_many2many_tags_field.js b/many2many_tags_preview/static/src/many2many_tags/kanban_many2many_tags_field.js similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/src/many2many_tags/kanban_many2many_tags_field.js rename to many2many_tags_preview/static/src/many2many_tags/kanban_many2many_tags_field.js diff --git a/many2many_tags_preview/many2many_tags_preview/static/src/many2many_tags/many2many_tags_field.js b/many2many_tags_preview/static/src/many2many_tags/many2many_tags_field.js similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/src/many2many_tags/many2many_tags_field.js rename to many2many_tags_preview/static/src/many2many_tags/many2many_tags_field.js diff --git a/many2many_tags_preview/many2many_tags_preview/static/src/many2many_tags/many2many_tags_field.xml b/many2many_tags_preview/static/src/many2many_tags/many2many_tags_field.xml similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/src/many2many_tags/many2many_tags_field.xml rename to many2many_tags_preview/static/src/many2many_tags/many2many_tags_field.xml diff --git a/many2many_tags_preview/many2many_tags_preview/static/src/many2many_tags/many2many_tags_field_color_list_popover.js b/many2many_tags_preview/static/src/many2many_tags/many2many_tags_field_color_list_popover.js similarity index 100% rename from many2many_tags_preview/many2many_tags_preview/static/src/many2many_tags/many2many_tags_field_color_list_popover.js rename to many2many_tags_preview/static/src/many2many_tags/many2many_tags_field_color_list_popover.js From 75aa8a8a97ff32e794052a6e433d8f0192967a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 25 Sep 2025 11:00:46 +0800 Subject: [PATCH 2/2] =?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 --- .../models/property_meter_archives.py | 2 + .../models/property_meter_water.py | 2 + .../views/property_meter_archives_views.xml | 1 + .../views/property_meter_water_views.xml | 1 + yuthon_property_approval/__manifest__.py | 1 + .../models/inherit_yuthon_property.py | 19 ++++++ .../security/ir.model.access.csv | 4 ++ .../views/inherit_yuthon_property_views.xml | 2 + yuthon_property_approval/wizard/__init__.py | 3 +- .../wizard/penalty_line_wizard.py | 50 ++++++++++++++++ .../wizard/penalty_line_wizard_viwes.xml | 58 +++++++++++++++++++ .../wizard/property_reconciliation_wizard.py | 4 +- .../property_reconciliation_wizard_views.xml | 2 +- 13 files changed, 144 insertions(+), 5 deletions(-) create mode 100644 yuthon_property_approval/wizard/penalty_line_wizard.py create mode 100644 yuthon_property_approval/wizard/penalty_line_wizard_viwes.xml diff --git a/yuthon_property/models/property_meter_archives.py b/yuthon_property/models/property_meter_archives.py index d2f027801..d2afbeb5a 100644 --- a/yuthon_property/models/property_meter_archives.py +++ b/yuthon_property/models/property_meter_archives.py @@ -6,9 +6,11 @@ from odoo.exceptions import UserError, ValidationError class PropertyMeterArchives(models.Model): _name = 'property.meter.archives' _description = '电表库' + _order = 'number asc' name = fields.Char(string='仪表编号') unit_number = fields.Char(string='单元编号/用途') + number = fields.Char(string="序号") installation_location = fields.Char(string='安装位置') is_state = fields.Boolean(string='是否启用') type = fields.Selection([('public', '公共'), ('fees', '收费')], string='类型') diff --git a/yuthon_property/models/property_meter_water.py b/yuthon_property/models/property_meter_water.py index 1a930c3ab..5023012d5 100644 --- a/yuthon_property/models/property_meter_water.py +++ b/yuthon_property/models/property_meter_water.py @@ -5,8 +5,10 @@ from odoo.exceptions import UserError, ValidationError class PropertyMeterWater(models.Model): _name = 'property.meter.water' _description = '水表库' + _order = 'number asc' name = fields.Char(string='仪表编号') + number = fields.Char(string="序号") unit_number = fields.Char(string='单元编号/用途') installation_location = fields.Char(string='安装位置') is_state = fields.Boolean(string='是否启用') diff --git a/yuthon_property/views/property_meter_archives_views.xml b/yuthon_property/views/property_meter_archives_views.xml index f4e0fc0eb..88827a6e4 100644 --- a/yuthon_property/views/property_meter_archives_views.xml +++ b/yuthon_property/views/property_meter_archives_views.xml @@ -10,6 +10,7 @@