diff options
Diffstat (limited to 'indoteknik_api/models')
| -rw-r--r-- | indoteknik_api/models/__init__.py | 3 | ||||
| -rw-r--r-- | indoteknik_api/models/website_content.py | 17 |
2 files changed, 19 insertions, 1 deletions
diff --git a/indoteknik_api/models/__init__.py b/indoteknik_api/models/__init__.py index 3e00e2f0..4447c215 100644 --- a/indoteknik_api/models/__init__.py +++ b/indoteknik_api/models/__init__.py @@ -3,4 +3,5 @@ from . import product_pricelist from . import product_product from . import product_template from . import res_users -from . import x_manufactures
\ No newline at end of file +from . import x_manufactures +from . import website_content diff --git a/indoteknik_api/models/website_content.py b/indoteknik_api/models/website_content.py new file mode 100644 index 00000000..d06ae56f --- /dev/null +++ b/indoteknik_api/models/website_content.py @@ -0,0 +1,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 |
