From d8b2957e2def549a70bccdd5fc390fc5c1f5dab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Mon, 12 Aug 2024 22:05:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E5=AE=A1=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_contract/__manifest__.py | 2 ++ yuthon_contract/models/__init__.py | 2 ++ yuthon_contract/models/inherit_hr_contract.py | 9 ++++++++ yuthon_contract/models/inherit_sale_order.py | 9 ++++++++ .../views/inherit_hr_contract_views.xml | 23 +++++++++++++++++++ .../views/inherit_sale_order_views.xml | 23 +++++++++++++++++++ 6 files changed, 68 insertions(+) create mode 100644 yuthon_contract/models/inherit_hr_contract.py create mode 100644 yuthon_contract/models/inherit_sale_order.py create mode 100644 yuthon_contract/views/inherit_hr_contract_views.xml create mode 100644 yuthon_contract/views/inherit_sale_order_views.xml diff --git a/yuthon_contract/__manifest__.py b/yuthon_contract/__manifest__.py index 6e3ecc183..f781edf48 100644 --- a/yuthon_contract/__manifest__.py +++ b/yuthon_contract/__manifest__.py @@ -14,6 +14,8 @@ 'data': [ 'security/ir.model.access.csv', 'views/contract_menu_views.xml', + 'views/inherit_hr_contract_views.xml', + 'views/inherit_sale_order_views.xml', ], 'installable': True, diff --git a/yuthon_contract/models/__init__.py b/yuthon_contract/models/__init__.py index e69de29bb..ddcbf4194 100644 --- a/yuthon_contract/models/__init__.py +++ b/yuthon_contract/models/__init__.py @@ -0,0 +1,2 @@ +from . import inherit_hr_contract +from . import inherit_sale_order diff --git a/yuthon_contract/models/inherit_hr_contract.py b/yuthon_contract/models/inherit_hr_contract.py new file mode 100644 index 000000000..f54c0d607 --- /dev/null +++ b/yuthon_contract/models/inherit_hr_contract.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +from odoo import api, fields, models, tools +from odoo.exceptions import ValidationError + + +class HrContract(models.Model): + _inherit = "hr.contract" + _description = "员工合同拓展" + diff --git a/yuthon_contract/models/inherit_sale_order.py b/yuthon_contract/models/inherit_sale_order.py new file mode 100644 index 000000000..0effe307b --- /dev/null +++ b/yuthon_contract/models/inherit_sale_order.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +from odoo import api, fields, models, tools +from odoo.exceptions import ValidationError + + +class SaleOrder(models.Model): + _inherit = "sale.order" + _description = "租赁合同拓展" + diff --git a/yuthon_contract/views/inherit_hr_contract_views.xml b/yuthon_contract/views/inherit_hr_contract_views.xml new file mode 100644 index 000000000..77b001e87 --- /dev/null +++ b/yuthon_contract/views/inherit_hr_contract_views.xml @@ -0,0 +1,23 @@ + + + + inherit.hr.contract.yuthon.tree + hr.contract + + + + + + + + + inherit.hr.contract.yuthon.form + hr.contract + + + + + + + + diff --git a/yuthon_contract/views/inherit_sale_order_views.xml b/yuthon_contract/views/inherit_sale_order_views.xml new file mode 100644 index 000000000..1df22c69b --- /dev/null +++ b/yuthon_contract/views/inherit_sale_order_views.xml @@ -0,0 +1,23 @@ + + + + inherit.sale.renting.yuthon.tree + sale.order + + + + + + + + + inherit.sale.renting.yuthon.form + sale.order + + + + + + + + From 4daa2024563757d11b721b710b35a0b6277de4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Mon, 12 Aug 2024 22:11:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E5=AE=A1=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_contract/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_contract/__manifest__.py b/yuthon_contract/__manifest__.py index f781edf48..1151ece57 100644 --- a/yuthon_contract/__manifest__.py +++ b/yuthon_contract/__manifest__.py @@ -10,7 +10,7 @@ 'category': 'Human Resources/Attendances', 'version': '0.1', 'license': 'LGPL-3', - 'depends': ['mail', 'hr_contract', 'sale_renting'], + 'depends': ['hr_contract', 'sale_renting'], 'data': [ 'security/ir.model.access.csv', 'views/contract_menu_views.xml',