summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Christianus <stephanchrst@gmail.com>2023-01-06 06:29:27 +0000
committerStephan Christianus <stephanchrst@gmail.com>2023-01-06 06:29:27 +0000
commit46956837111c3233434f3cd22444b55d38fadc6a (patch)
tree40ff42a0d0678ac5c9c3e7c653232be703f9a530
parent9a3a8c37b65d6017bae50d56b4c5bd1ea641a3b1 (diff)
parent8d315f204ef81d92c11dfcc60f40f1ab2eceb193 (diff)
Merged in release (pull request #15)
Release
-rw-r--r--indoteknik_api/controllers/api_v1/__init__.py1
-rw-r--r--indoteknik_api/controllers/api_v1/content.py27
-rw-r--r--indoteknik_custom/views/account_move.xml1
3 files changed, 29 insertions, 0 deletions
diff --git a/indoteknik_api/controllers/api_v1/__init__.py b/indoteknik_api/controllers/api_v1/__init__.py
index 2a93bcae..571f2900 100644
--- a/indoteknik_api/controllers/api_v1/__init__.py
+++ b/indoteknik_api/controllers/api_v1/__init__.py
@@ -12,3 +12,4 @@ from . import user
from . import wishlist
from . import brand_homepage
from . import customer
+from . import content
diff --git a/indoteknik_api/controllers/api_v1/content.py b/indoteknik_api/controllers/api_v1/content.py
new file mode 100644
index 00000000..bc19c6f3
--- /dev/null
+++ b/indoteknik_api/controllers/api_v1/content.py
@@ -0,0 +1,27 @@
+from .. import controller
+from odoo import http
+from odoo.http import request
+
+
+class WebsiteContent(controller.Controller):
+ prefix = '/api/v1/'
+
+ @http.route(prefix + 'video_content', auth='public', methods=['GET', 'OPTIONS'])
+ def get_customer_review(self, **kw):
+ if not self.authenticate():
+ return self.response(code=401, description='Unauthorized')
+ # base_url = request.env['ir.config_parameter'].get_param('web.base.url')
+ query = [('status', '=', 'tayang'), ('slide_type', '=', 'video')]
+ videos = request.env['website.content'].search(query, order='sequence')
+ data = []
+ for video in videos:
+ data.append({
+ 'id': video.id,
+ 'sequence': video.sequence,
+ 'slide_type': video.slide_type,
+ 'name': video.name,
+ 'url': video.url,
+ 'channel_id': video.channel_id,
+ 'channel_name': video.channel_id.name
+ })
+ return self.response(data)
diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml
index 6e52f075..b3e9fb8c 100644
--- a/indoteknik_custom/views/account_move.xml
+++ b/indoteknik_custom/views/account_move.xml
@@ -20,6 +20,7 @@
<field name="inherit_id" ref="account.view_out_invoice_tree"/>
<field name="arch" type="xml">
<field name="payment_state" position="after">
+ <field name="invoice_payment_term_id"/>
<field name="date_kirim_tukar_faktur"/>
<field name="shipper_faktur_id"/>
<field name="resi_tukar_faktur"/>