From b4b544fa8bfd92f73c49daed520fa34660630379 Mon Sep 17 00:00:00 2001 From: IT Fixcomart Date: Mon, 8 Aug 2022 15:05:33 +0700 Subject: Membuat view dan model user.activity.log --- indoteknik_custom/__manifest__.py | 1 + indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/user_activity_log.py | 11 ++++++ indoteknik_custom/security/ir.model.access.csv | 3 +- indoteknik_custom/views/user_activity_log.xml | 51 ++++++++++++++++++++++++++ 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 indoteknik_custom/models/user_activity_log.py create mode 100644 indoteknik_custom/views/user_activity_log.xml diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py index edadc1a1..b240df1a 100644 --- a/indoteknik_custom/__manifest__.py +++ b/indoteknik_custom/__manifest__.py @@ -14,6 +14,7 @@ 'views/coupon_program.xml', 'views/product_public_category.xml', 'views/product_template.xml', + 'views/user_activity_log.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 6573205e..5f5dcf1e 100644 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -10,3 +10,4 @@ from . import x_product_tags from . import stock_vendor from . import crm_lead from . import res_users +from . import user_activity_log diff --git a/indoteknik_custom/models/user_activity_log.py b/indoteknik_custom/models/user_activity_log.py new file mode 100644 index 00000000..558e5b5c --- /dev/null +++ b/indoteknik_custom/models/user_activity_log.py @@ -0,0 +1,11 @@ +from odoo import models, fields + + +class UserActivityLog(models.Model): + _name = 'user.activity.log' + _rec_name = 'page_title' + + page_title = fields.Char(string="Judul Halaman") + url = fields.Char(string="URL") + res_user_id = fields.Many2one("res.users", string="User") + email = fields.Char(string="Email") diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index 92417f01..510987a8 100644 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -5,4 +5,5 @@ access_x_biaya_kirim,access.x.biaya.kirim,model_x_biaya_kirim,,1,1,1,1 access_x_manufactures,access.x.manufactures,model_x_manufactures,,1,1,1,1 access_x_partner_purchase_order,access.x.partner.purchase.order,model_x_partner_purchase_order,,1,1,1,1 access_x_product_tags,access.x.product.tags,model_x_product_tags,,1,1,1,1 -access_stock_vendor,access.stock.vendor,model_stock_vendor,,1,1,1,1 \ No newline at end of file +access_stock_vendor,access.stock.vendor,model_stock_vendor,,1,1,1,1 +access_user_activity_log,access.user.activity.log,model_user_activity_log,,1,1,1,1 \ No newline at end of file diff --git a/indoteknik_custom/views/user_activity_log.xml b/indoteknik_custom/views/user_activity_log.xml new file mode 100644 index 00000000..db242505 --- /dev/null +++ b/indoteknik_custom/views/user_activity_log.xml @@ -0,0 +1,51 @@ + + + + user.activity.log.tree + user.activity.log + + + + + + + + + + + + + user.activity.log.form + user.activity.log + +
+ + + + + + + + + + + +
+
+
+ + + User Activity Log + ir.actions.act_window + user.activity.log + tree,form + + + +
\ No newline at end of file -- cgit v1.2.3