diff options
| -rw-r--r-- | indoteknik_custom/models/solr/x_banner_banner.py | 4 | ||||
| -rwxr-xr-x | indoteknik_custom/models/x_banner_banner.py | 4 | ||||
| -rwxr-xr-x | indoteknik_custom/views/x_banner_banner.xml | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/indoteknik_custom/models/solr/x_banner_banner.py b/indoteknik_custom/models/solr/x_banner_banner.py index 67739d47..8452644c 100644 --- a/indoteknik_custom/models/solr/x_banner_banner.py +++ b/indoteknik_custom/models/solr/x_banner_banner.py @@ -23,7 +23,7 @@ class XBannerBanner(models.Model): 'function_name': function_name }) - @api.constrains('x_name', 'x_url_banner', 'background_color', 'x_banner_image', 'x_banner_category', 'x_relasi_manufacture', 'x_sequence_banner', 'x_status_banner', 'sequence', 'group_by_week') + @api.constrains('x_name', 'x_url_banner', 'background_color', 'x_banner_image', 'x_banner_category', 'x_relasi_manufacture', 'x_sequence_banner', 'x_status_banner', 'sequence', 'group_by_week', 'headline_banner_s', 'description_banner_s') def _create_solr_queue_sync_brands(self): self._create_solr_queue('_sync_banners_to_solr') @@ -49,6 +49,8 @@ class XBannerBanner(models.Model): 'category_id_i': banners.x_banner_category.id or '', 'manufacture_id_i': banners.x_relasi_manufacture.id or '', 'group_by_week': banners.group_by_week or '', + 'headline_banner_s': banners.x_headline_banner or '', + 'description_banner_s': banners.x_description_banner or '', }) self.solr().add([document]) banners.update_last_update_solr() diff --git a/indoteknik_custom/models/x_banner_banner.py b/indoteknik_custom/models/x_banner_banner.py index d6884c9b..810bdf39 100755 --- a/indoteknik_custom/models/x_banner_banner.py +++ b/indoteknik_custom/models/x_banner_banner.py @@ -23,4 +23,6 @@ class XBannerBanner(models.Model): ('2', '2'), ('3', '3'), ('4', '4') - ], string='Group by Week')
\ No newline at end of file + ], string='Group by Week') + x_headline_banner = fields.Text(string="Headline Banner") + x_description_banner = fields.Text(string="Description Banner")
\ No newline at end of file diff --git a/indoteknik_custom/views/x_banner_banner.xml b/indoteknik_custom/views/x_banner_banner.xml index c90e718b..ec1e38a5 100755 --- a/indoteknik_custom/views/x_banner_banner.xml +++ b/indoteknik_custom/views/x_banner_banner.xml @@ -31,6 +31,8 @@ <field name="x_status_banner" /> <field name="sequence" /> <field name="group_by_week" /> + <field name="x_headline_banner" /> + <field name="x_description_banner" /> <field name="last_update_solr" readonly="1"/> </group> <group> |
