From 5c9214c1c846e61c5356e1b19341b070c2303198 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Thu, 23 Feb 2023 10:39:40 +0700 Subject: partner company type and edit partner data --- indoteknik_custom/__manifest__.py | 1 + indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/res_partner.py | 1 + .../models/res_partner_company_type.py | 7 ++++ indoteknik_custom/security/ir.model.access.csv | 3 +- indoteknik_custom/views/res_partner.xml | 3 ++ .../views/res_partner_company_type.xml | 43 ++++++++++++++++++++++ indoteknik_custom/views/user_company_request.xml | 2 +- 8 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 indoteknik_custom/models/res_partner_company_type.py create mode 100644 indoteknik_custom/views/res_partner_company_type.xml (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py index 5a3ffe0a..449fd09c 100755 --- a/indoteknik_custom/__manifest__.py +++ b/indoteknik_custom/__manifest__.py @@ -16,6 +16,7 @@ 'views/delivery_order.xml', 'views/product_pricelist.xml', 'views/res_groups.xml', + 'views/res_partner_company_type.xml', 'views/res_partner.xml', 'views/product_pricelist_item.xml', 'views/product_public_category.xml', diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 4cb8bdda..ebbf2e09 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -19,6 +19,7 @@ from . import purchase_order_line from . import purchase_order from . import purchase_outstanding from . import purchase_pricelist +from . import res_partner_company_type from . import res_partner from . import res_users from . import sale_monitoring_detail diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index 403245fb..1cdf7c72 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -5,3 +5,4 @@ class ResPartner(models.Model): _inherit = 'res.partner' reference_number = fields.Char(string="Reference Number") + company_type_id = fields.Many2one('res.partner.company_type', string='Company Type') diff --git a/indoteknik_custom/models/res_partner_company_type.py b/indoteknik_custom/models/res_partner_company_type.py new file mode 100644 index 00000000..2bd356a1 --- /dev/null +++ b/indoteknik_custom/models/res_partner_company_type.py @@ -0,0 +1,7 @@ +from odoo import models, fields + + +class ResPartnerCompanyType(models.Model): + _name = 'res.partner.company_type' + + name = fields.Char('Name') \ No newline at end of file diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index 26c1bd73..d5142381 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -34,4 +34,5 @@ access_midtrans_account,access.midtrans.account,model_midtrans_account,,1,1,1,1 access_ip_lookup,access.ip.lookup,model_ip_lookup,,1,1,1,1 access_ip_lookup_line,access.ip.lookup.line,model_ip_lookup_line,,1,1,1,1 access_wati_notification,access.wati.notification,model_wati_notification,,1,1,1,1 -access_user_company_request,access.user.company.request,model_user_company_request,,1,1,1,1 \ No newline at end of file +access_user_company_request,access.user.company.request,model_user_company_request,,1,1,1,1 +access_res_partner_company_type,access.res.partner.company_type,model_res_partner_company_type,,1,1,1,1 \ No newline at end of file diff --git a/indoteknik_custom/views/res_partner.xml b/indoteknik_custom/views/res_partner.xml index 673718c4..47f41ab2 100644 --- a/indoteknik_custom/views/res_partner.xml +++ b/indoteknik_custom/views/res_partner.xml @@ -9,6 +9,9 @@ + + + diff --git a/indoteknik_custom/views/res_partner_company_type.xml b/indoteknik_custom/views/res_partner_company_type.xml new file mode 100644 index 00000000..ed21c1c9 --- /dev/null +++ b/indoteknik_custom/views/res_partner_company_type.xml @@ -0,0 +1,43 @@ + + + + res.partner.company_type.tree + res.partner.company_type + + + + + + + + + res.partner.company_type.form + res.partner.company_type + +
+ + + + + + + +
+
+
+ + + Company Type + ir.actions.act_window + res.partner.company_type + tree,form + + + +
\ No newline at end of file diff --git a/indoteknik_custom/views/user_company_request.xml b/indoteknik_custom/views/user_company_request.xml index a44a48e0..0b787683 100644 --- a/indoteknik_custom/views/user_company_request.xml +++ b/indoteknik_custom/views/user_company_request.xml @@ -43,7 +43,7 @@ id="menu_user_company_request" name="User Company Request" parent="contacts.menu_contacts" - sequence="5" + sequence="3" action="action_user_company_request" /> \ No newline at end of file -- cgit v1.2.3