From f0f31234dfaa22850ebb502211a4488b4981f17c Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 Jan 2023 10:08:50 +0700 Subject: change text to html in customer review --- indoteknik_api/controllers/api_v1/customer.py | 2 +- indoteknik_custom/models/customer_review.py | 1 + indoteknik_custom/views/customer_review.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indoteknik_api/controllers/api_v1/customer.py b/indoteknik_api/controllers/api_v1/customer.py index 58c93376..f6d6d40d 100644 --- a/indoteknik_api/controllers/api_v1/customer.py +++ b/indoteknik_api/controllers/api_v1/customer.py @@ -21,7 +21,7 @@ class CustomerReview(controller.Controller): 'sequence': review.sequence, 'image': base_url + 'api/image/customer.review/image/' + str(review.id) if review.image else '', 'customer_name': review.customer_name, - 'ulasan': review.ulasan, + 'ulasan': review.ulasan_html, 'name': review.name, 'jabatan': review.jabatan }) diff --git a/indoteknik_custom/models/customer_review.py b/indoteknik_custom/models/customer_review.py index 5fb93b2e..d64d2d5a 100644 --- a/indoteknik_custom/models/customer_review.py +++ b/indoteknik_custom/models/customer_review.py @@ -8,6 +8,7 @@ class CustomerReview(models.Model): customer_name = fields.Char(string='Customer') image = fields.Binary(string='Image') ulasan = fields.Char(string='Ulasan') + ulasan_html = fields.Html('Ulasan html', sanitize_attributes=False, sanitize_form=False) name = fields.Char(string='Name') jabatan = fields.Char(string='Jabatan') status = fields.Selection([ diff --git a/indoteknik_custom/views/customer_review.xml b/indoteknik_custom/views/customer_review.xml index 7d7e66df..b01c5bf5 100644 --- a/indoteknik_custom/views/customer_review.xml +++ b/indoteknik_custom/views/customer_review.xml @@ -33,7 +33,7 @@ - + -- cgit v1.2.3