summaryrefslogtreecommitdiff
path: root/indoteknik_api/models/website_content.py
blob: d06ae56f3b26caa90d187fe546ee4cd782c1e943 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from odoo import models


class WebsiteContent(models.Model):
    _inherit = 'website.content'

    def api_single_response(self, website_content):
        data = {
            'id': website_content.id,
            'channel_name': website_content.channel_id.name,
            'sequence': website_content.sequence,
            'slide_type': website_content.slide_type,
            'name': website_content.name,
            'url': website_content.url
        }

        return data