diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-01-10 10:08:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-01-10 10:08:50 +0700 |
| commit | f0f31234dfaa22850ebb502211a4488b4981f17c (patch) | |
| tree | 3ab1a41c19ac6c3ecb2abd64addf2159a08e8bdf | |
| parent | 8a70abf6f05e9ffc6e74ec2e80f61db72f6f0401 (diff) | |
change text to html in customer review
| -rw-r--r-- | indoteknik_api/controllers/api_v1/customer.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/customer_review.py | 1 | ||||
| -rw-r--r-- | 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 @@ <field name="sequence"/> <field name="image"/> <field name="customer_name"/> - <field name="ulasan"/> + <field name="ulasan_html"/> <field name="name"/> <field name="jabatan"/> <field name="status"/> |
