diff options
| author | Stephan Christianus <stephanchrst@gmail.com> | 2023-01-10 03:11:22 +0000 |
|---|---|---|
| committer | Stephan Christianus <stephanchrst@gmail.com> | 2023-01-10 03:11:22 +0000 |
| commit | 19bbd3203d41d9f52206d7ceaa96480a19566197 (patch) | |
| tree | 5f3ec2b28c7197d339b58d13a93967fa4a498a53 | |
| parent | b1329f940ae66b60185fa097012393b0d51b9e5f (diff) | |
| parent | e4abbde470d917d04256c9804b80d82194d73b51 (diff) | |
Merged in release (pull request #18)
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"/> |
