From 5fdade43dd264f834a52194b22a9d687c4dc6aab Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 22 Feb 2023 17:08:53 +0700 Subject: user company request and register logic --- indoteknik_custom/__manifest__.py | 1 + indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/user_company_request.py | 15 ++++++++ indoteknik_custom/security/ir.model.access.csv | 3 +- indoteknik_custom/views/user_company_request.xml | 49 ++++++++++++++++++++++++ 5 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 indoteknik_custom/models/user_company_request.py create mode 100644 indoteknik_custom/views/user_company_request.xml (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py index 243b3028..5a3ffe0a 100755 --- a/indoteknik_custom/__manifest__.py +++ b/indoteknik_custom/__manifest__.py @@ -25,6 +25,7 @@ 'views/sale_monitoring.xml', 'views/sale_monitoring_detail.xml', 'views/user_activity_log.xml', + 'views/user_company_request.xml', 'views/vit_kelurahan.xml', 'views/vit_kecamatan.xml', 'views/vit_kota.xml', diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 62a024e3..4cb8bdda 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -32,6 +32,7 @@ from . import stock_picking_type from . import stock_picking from . import stock_vendor from . import user_activity_log +from . import user_company_request from . import users from . import website_brand_homepage from . import website_categories_homepage diff --git a/indoteknik_custom/models/user_company_request.py b/indoteknik_custom/models/user_company_request.py new file mode 100644 index 00000000..c69b789c --- /dev/null +++ b/indoteknik_custom/models/user_company_request.py @@ -0,0 +1,15 @@ +from odoo import models, fields + + +class UserCompanyRequest(models.Model): + _name = 'user.company.request' + _rec_name = 'user_id' + + user_id = fields.Many2one('res.partner', string='User') + user_company_id = fields.Many2one('res.partner', string='Company') + user_input = fields.Char(string='User Input') + is_approve = fields.Selection([ + ('approved', 'Approve'), + ('rejected', 'Reject'), + ], string='Approval') + \ 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 977f3a1b..26c1bd73 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -33,4 +33,5 @@ access_midtrans_recurring,access.midtrans.recurring,model_midtrans_recurring,,1, 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 \ No newline at end of file +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 diff --git a/indoteknik_custom/views/user_company_request.xml b/indoteknik_custom/views/user_company_request.xml new file mode 100644 index 00000000..a44a48e0 --- /dev/null +++ b/indoteknik_custom/views/user_company_request.xml @@ -0,0 +1,49 @@ + + + + user.company.request.tree + user.company.request + + + + + + + + + + + + user.company.request.form + user.company.request + +
+ + + + + + + + + + +
+
+
+ + + User Company Request + ir.actions.act_window + user.company.request + tree,form + + + +
\ No newline at end of file -- cgit v1.2.3