diff --git a/odoo_screen_recording/README.rst b/odoo_screen_recording/README.rst new file mode 100644 index 000000000..eb4bbd6c5 --- /dev/null +++ b/odoo_screen_recording/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Odoo Screen Recording +================================================ +* Odoo Screen Recording to record and store your screen time. + +Configuration +============= +No additional Configuration + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +( https://www.gnu.org/licenses/agpl-3.0-standalone.html ) + +Credits +------- +* Developer: +(V14) Anjhana A K +(V16) Megha AP +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/odoo_screen_recording/__init__.py b/odoo_screen_recording/__init__.py new file mode 100644 index 000000000..359cef697 --- /dev/null +++ b/odoo_screen_recording/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/odoo_screen_recording/__manifest__.py b/odoo_screen_recording/__manifest__.py new file mode 100644 index 000000000..3bfa9ed2e --- /dev/null +++ b/odoo_screen_recording/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Odoo Screen Recording", + 'version': '14.0.1.0.0', + 'category': "Extra Tools", + 'summary': """Record your screen any time and store it for further use + in odoo""", + 'description': 'Screen recording in Odoo helps to record multiple screen ' + 'at a time to store or monitor the screen activities', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base'], + 'data': [ + 'security/ir.model.access.csv', + 'views/video_store_views.xml', + 'views/assets.xml', + ], + 'qweb': [ + "static/src/xml/button_systray.xml", + "static/src/xml/video_preview_widget.xml", + ], + 'images': [ + 'static/description/banner.png' + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/odoo_screen_recording/doc/RELEASE_NOTES.md b/odoo_screen_recording/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..2f9dab2d5 --- /dev/null +++ b/odoo_screen_recording/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 08.01.2024 +#### Version 14.0.1.0.0 +#### ADD +- Initial commit for Odoo Screen Recording \ No newline at end of file diff --git a/odoo_screen_recording/models/__init__.py b/odoo_screen_recording/models/__init__.py new file mode 100644 index 000000000..38d82617e --- /dev/null +++ b/odoo_screen_recording/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import video_store diff --git a/odoo_screen_recording/models/video_store.py b/odoo_screen_recording/models/video_store.py new file mode 100644 index 000000000..a7ca311d8 --- /dev/null +++ b/odoo_screen_recording/models/video_store.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class VideoStore(models.Model): + """In this model you can store recorded data as a record and view it + later""" + _name = 'video.store' + _description = 'Screen record video storage' + _rec_name = 'date' + + date = fields.Datetime(string='Date', default=fields.Datetime.now, + help="Date of screen capture") + description = fields.Char(string='Description', + help='Add description for recording') + video = fields.Char(string='Screen Record', + help="Recorded videos can be view here") + + @api.model + def video_record(self, url): + """Function used to create a record when the screen record is + stopped""" + self.create({'description': '', 'video': url}) + return True diff --git a/odoo_screen_recording/security/ir.model.access.csv b/odoo_screen_recording/security/ir.model.access.csv new file mode 100644 index 000000000..c1505aeaa --- /dev/null +++ b/odoo_screen_recording/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_model_video_store,video.store,model_video_store,base.group_user,1,1,1,1 diff --git a/odoo_screen_recording/static/description/assets/icons/check.png b/odoo_screen_recording/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/check.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/chevron.png b/odoo_screen_recording/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/chevron.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/cogs.png b/odoo_screen_recording/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/cogs.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/consultation.png b/odoo_screen_recording/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/consultation.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/ecom-black.png b/odoo_screen_recording/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/education-black.png b/odoo_screen_recording/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/education-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/hotel-black.png b/odoo_screen_recording/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/license.png b/odoo_screen_recording/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/license.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/lifebuoy.png b/odoo_screen_recording/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/logo.png b/odoo_screen_recording/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/logo.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/manufacturing-black.png b/odoo_screen_recording/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/pos-black.png b/odoo_screen_recording/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/pos-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/puzzle.png b/odoo_screen_recording/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/puzzle.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/restaurant-black.png b/odoo_screen_recording/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/service-black.png b/odoo_screen_recording/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/service-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/trading-black.png b/odoo_screen_recording/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/trading-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/training.png b/odoo_screen_recording/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/training.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/update.png b/odoo_screen_recording/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/update.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/user.png b/odoo_screen_recording/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/user.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/wrench.png b/odoo_screen_recording/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/wrench.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/1.png b/odoo_screen_recording/static/description/assets/modules/1.png new file mode 100644 index 000000000..0e2da45ce Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/1.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/2.png b/odoo_screen_recording/static/description/assets/modules/2.png new file mode 100644 index 000000000..8d3e51e0d Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/2.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/3.png b/odoo_screen_recording/static/description/assets/modules/3.png new file mode 100644 index 000000000..091c03de6 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/3.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/4.png b/odoo_screen_recording/static/description/assets/modules/4.png new file mode 100644 index 000000000..a2705f755 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/4.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/5.png b/odoo_screen_recording/static/description/assets/modules/5.png new file mode 100644 index 000000000..cb515f5c0 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/5.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/6.png b/odoo_screen_recording/static/description/assets/modules/6.png new file mode 100644 index 000000000..1d55729f9 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/6.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots.zip b/odoo_screen_recording/static/description/assets/screenshots.zip new file mode 100644 index 000000000..83ab5a74e Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots.zip differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/hero.gif b/odoo_screen_recording/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..5f3a37dcf Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/screenshot1.png b/odoo_screen_recording/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..105511e08 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/screenshot1.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/screenshot2.png b/odoo_screen_recording/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..08da88d5a Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/screenshot2.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/screenshot3.png b/odoo_screen_recording/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..85006493d Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/screenshot3.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/screenshot4.png b/odoo_screen_recording/static/description/assets/screenshots/screenshot4.png new file mode 100644 index 000000000..306ae34ae Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/screenshot4.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/screenshot5.png b/odoo_screen_recording/static/description/assets/screenshots/screenshot5.png new file mode 100644 index 000000000..385718738 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/screenshot5.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/screenshot6.png b/odoo_screen_recording/static/description/assets/screenshots/screenshot6.png new file mode 100644 index 000000000..2d28e4eed Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/screenshot6.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/screenshot7.png b/odoo_screen_recording/static/description/assets/screenshots/screenshot7.png new file mode 100644 index 000000000..b8f4cf89e Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/screenshot7.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/screenshot8.png b/odoo_screen_recording/static/description/assets/screenshots/screenshot8.png new file mode 100644 index 000000000..d54741f99 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/screenshot8.png differ diff --git a/odoo_screen_recording/static/description/banner.png b/odoo_screen_recording/static/description/banner.png new file mode 100644 index 000000000..73be8ea73 Binary files /dev/null and b/odoo_screen_recording/static/description/banner.png differ diff --git a/odoo_screen_recording/static/description/icon.png b/odoo_screen_recording/static/description/icon.png new file mode 100644 index 000000000..19222b1f9 Binary files /dev/null and b/odoo_screen_recording/static/description/icon.png differ diff --git a/odoo_screen_recording/static/description/index.html b/odoo_screen_recording/static/description/index.html new file mode 100644 index 000000000..fd86c22d7 --- /dev/null +++ b/odoo_screen_recording/static/description/index.html @@ -0,0 +1,698 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+ +
+
+
+

+ Odoo Screen Recording

+

+ Record Your Screen With Odoo And Store It For Future

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ This application allows to record your screen and store and view recorded video.

+
+
+
+
+

+ Features +

+
+
+
+ +
+
+

+ Enterprise & Community Support.

+
+
+
+
+ +
+
+

+ Allows to record your entire screen, window or Chrome tabs

+
+
+
+
+ +
+
+

+ Can record multiple screens at a time

+
+
+
+
+ +
+
+

+ Can store the recordings in Odoo.

+
+
+
+
+ +
+
+

+ Able to view and play recorded video in Odoo itself

+
+
+
+
+
+

+ Screenshots +

+
+
+

+ You can see a white camera systray icon for recording your screen +

+ +
+
+

+ After clicking camera icon a popup will appear displaying options for share your screen. Here you can find option to select tabs

+ +
+

+ Here you can see options to choose corresponding window

+ +
+
+

+ You also have the option to choose the entire screen. Simply click the "Share" button to initiate the record. +

+ +
+
+

+ When recording starts, the white camera systray icon will change to green. To stop recording, click "Stop sharing" +

+ +
+
+

+ From the "Screen Capture" app you can access and view all the recorded videos, +

+ +
+
+

+ In tree view , you can see the corresponding Date and Time of each video +

+ +
+
+

+ In form view , you can see the corresponding Date and Time of each video You can also add description if needed.Also, you can play the video too, +

+ +
+
+ +
+
+

Suggested + Products

+
+ + +
+
+ + + +
+
+
+

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our + Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+ +
+
+ + + + + +
+
+
+

Need Help?

+
+
+
+ + +
+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
+
+
diff --git a/odoo_screen_recording/static/src/js/button_systray.js b/odoo_screen_recording/static/src/js/button_systray.js new file mode 100644 index 000000000..37ba7c028 --- /dev/null +++ b/odoo_screen_recording/static/src/js/button_systray.js @@ -0,0 +1,79 @@ +odoo.define('odoo_screen_recording.video', function (require) { + "use strict"; + var SystrayMenu = require('web.SystrayMenu'); + var Widget = require('web.Widget'); + var rpc = require("web.rpc"); + var VideoButton = Widget.extend({ + template: 'ScreenCaptureSystray', + events: { + 'click #capture_screen': '_onClick', + }, + _onClick: function () { + try { + // Get display media stream + navigator.mediaDevices.getDisplayMedia({ video: true }) + .then(stream => { + // Change button color to indicate recording + let icon = document.querySelector(".record"); + icon.style.color = '#28a745'; + + // Set up media recorder + const mime = MediaRecorder.isTypeSupported("video/webm; codecs=vp9") + ? "video/webm; codecs=vp9" + : "video/webm"; + + let mediaRecorder = new MediaRecorder(stream, { mimeType: mime }); + let chunks = []; + + // Event listener for data available + mediaRecorder.addEventListener('dataavailable', function (e) { + chunks.push(e.data); + }); + + // Event listener for recording stop + mediaRecorder.addEventListener('stop', function () { + // Change button color back to default + let icon = document.querySelector(".record"); + icon.style.color = 'white'; + + // Create a blob from the recorded chunks + let blob = new Blob(chunks, { type: chunks[0].type }); + + // Convert blob to base64 + const blobToBase64 = blob => { + const reader = new FileReader(); + reader.readAsDataURL(blob); + return new Promise(resolve => { + reader.onloadend = () => { + resolve(reader.result); + }; + }); + }; + + // Process the base64 result + blobToBase64(blob).then(res => { + // Send the base64 data to the Odoo server + rpc.query({ + model: 'video.store', + method: 'video_record', + args: [res], + }).then(function (response) { }); + }); + }); + + // Start recording + mediaRecorder.start(); + }) + .catch(error => { + console.error('Error capturing screen:', error); + // Handle error as needed + }); + } catch (e) { + console.error('Error:', e); + // Handle error as needed + } + }, + }); + SystrayMenu.Items.push(VideoButton); + return VideoButton; +}); diff --git a/odoo_screen_recording/static/src/js/video_preview_widget.js b/odoo_screen_recording/static/src/js/video_preview_widget.js new file mode 100644 index 000000000..2a411c14f --- /dev/null +++ b/odoo_screen_recording/static/src/js/video_preview_widget.js @@ -0,0 +1,16 @@ +odoo.define('odoo_screen_recording.VideoWidget', function (require) { + "use strict"; + var AbstractField = require('web.AbstractField'); + var core = require('web.core'); + var field_registry = require('web.field_registry'); + var _t = core._t; + var VideoWidget = AbstractField.extend({ + template: 'VideoWidget', + supportedFieldTypes: ['char'], + _render: function () { + this._super.apply(this, arguments); + this.$el.find('video').attr('src', this.value); + }, + }); + field_registry.add('videoWidget', VideoWidget); +}); diff --git a/odoo_screen_recording/static/src/xml/button_systray.xml b/odoo_screen_recording/static/src/xml/button_systray.xml new file mode 100644 index 000000000..827f79146 --- /dev/null +++ b/odoo_screen_recording/static/src/xml/button_systray.xml @@ -0,0 +1,12 @@ + + + + +
  • + + + +
  • +
    +
    diff --git a/odoo_screen_recording/static/src/xml/video_preview_widget.xml b/odoo_screen_recording/static/src/xml/video_preview_widget.xml new file mode 100644 index 000000000..db8ce8e35 --- /dev/null +++ b/odoo_screen_recording/static/src/xml/video_preview_widget.xml @@ -0,0 +1,11 @@ + + + + +
    + +
    +
    +
    diff --git a/odoo_screen_recording/views/assets.xml b/odoo_screen_recording/views/assets.xml new file mode 100644 index 000000000..67f4f2d92 --- /dev/null +++ b/odoo_screen_recording/views/assets.xml @@ -0,0 +1,12 @@ + + + +