From aefbbe76d0cb228d6928180991f59829d3ef2139 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 7 Mar 2023 15:06:30 +0700 Subject: Add website page content --- indoteknik_custom/__manifest__.py | 1 + indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/website_page_content.py | 10 +++++ indoteknik_custom/security/ir.model.access.csv | 1 + indoteknik_custom/views/website_page_content.xml | 48 ++++++++++++++++++++++++ 5 files changed, 61 insertions(+) create mode 100644 indoteknik_custom/models/website_page_content.py create mode 100644 indoteknik_custom/views/website_page_content.xml (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py index 449fd09c..701f33c0 100755 --- a/indoteknik_custom/__manifest__.py +++ b/indoteknik_custom/__manifest__.py @@ -59,6 +59,7 @@ 'views/customer_review.xml', 'views/website_content_channel.xml', 'views/website_content.xml', + 'views/website_page_content.xml', 'views/custom_mail_marketing.xml', 'views/website_ads.xml', 'views/leads_monitoring.xml', diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index bba017e7..5a4a0cfd 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -38,6 +38,7 @@ from . import users from . import website_brand_homepage from . import website_categories_homepage from . import website_content +from . import website_page_content from . import website_user_cart from . import website_user_wishlist from . import x_banner_banner diff --git a/indoteknik_custom/models/website_page_content.py b/indoteknik_custom/models/website_page_content.py new file mode 100644 index 00000000..a09de543 --- /dev/null +++ b/indoteknik_custom/models/website_page_content.py @@ -0,0 +1,10 @@ +from odoo import models, fields + + +class WebsitePageContent(models.Model): + _name = 'website.page.content' + _rec_name = 'url_path' + _sql_constraints = [('url_path_unique', 'unique(url_path)', 'URL Path already exists!')] + + url_path = fields.Char(string='Url Path') + content = fields.Html(string='Content') \ 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 3f762c13..e704f5a1 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -24,6 +24,7 @@ access_sales_outstanding,access.sales.outstanding,model_sales_outstanding,,1,1,1 access_customer_review,access.customer.review,model_customer_review,,1,1,1,1 access_website_content_channel,access.website.content.channel,model_website_content_channel,,1,1,1,1 access_website_content,access.website.content,model_website_content,,1,1,1,1 +access_website_page_content,access.website.page.content,model_website_page_content,,1,1,1,1 access_invoice_reklas,access.invoice.reklas,model_invoice_reklas,,1,1,1,1 access_custom_mail_marketing,access.custom.mail.marketing,model_custom_mail_marketing,,1,1,1,1 access_website_ads,access.website.ads,model_website_ads,,1,1,1,1 diff --git a/indoteknik_custom/views/website_page_content.xml b/indoteknik_custom/views/website_page_content.xml new file mode 100644 index 00000000..295cffde --- /dev/null +++ b/indoteknik_custom/views/website_page_content.xml @@ -0,0 +1,48 @@ + + + + website.page.content.tree + website.page.content + + + + + + + + + website.page.content.form + website.page.content + +
+ + + + + + + + + + + + +
+
+
+ + + Website Page Content + ir.actions.act_window + website.page.content + tree,form + + + +
\ No newline at end of file -- cgit v1.2.3