commit f902932644f81c494153144403c0f48c9103dfb4 Author: root Date: Sun Mar 13 08:24:15 2022 +0000 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c20c2ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__ + diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..511a0ca --- /dev/null +++ b/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import controllers +from . import models \ No newline at end of file diff --git a/__manifest__.py b/__manifest__.py new file mode 100644 index 0000000..badad10 --- /dev/null +++ b/__manifest__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +{ + 'name': "kalachakra", + + 'summary': """ + Short (1 phrase/line) summary of the module's purpose, used as + subtitle on modules listing or apps.openerp.com""", + + 'description': """ + Long description of module's purpose + """, + + 'author': "My Company", + 'website': "http://www.yourcompany.com", + + # Categories can be used to filter modules in modules listing + # Check https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/data/ir_module_category_data.xml + # for the full list + 'category': 'Uncategorized', + 'version': '0.1', + + # any module necessary for this one to work correctly + 'depends': ['base'], + + # always loaded + 'data': [ + # 'security/ir.model.access.csv', + 'views/views.xml', + 'views/templates.xml', + ], + # only loaded in demonstration mode + 'demo': [ + 'demo/demo.xml', + ], +} diff --git a/controllers/__init__.py b/controllers/__init__.py new file mode 100644 index 0000000..3c97f2e --- /dev/null +++ b/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import website_event \ No newline at end of file diff --git a/controllers/website_event.py b/controllers/website_event.py new file mode 100644 index 0000000..8ea1711 --- /dev/null +++ b/controllers/website_event.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from odoo import http +from odoo.http import request +import werkzeug +from odoo.tools import format_datetime, format_date, is_html_empty +from odoo.exceptions import UserError +from odoo.addons.website_event.controllers.main import WebsiteEventController + +class kalachakra_event(WebsiteEventController): + + def _extract_searched_event_tags(self, searches): + tags = request.env['event.tag'] + + if searches.get('tags'): + + tags = request.env['event.tag'].search([('name', '=', searches['tags'])]) + return tags diff --git a/demo/demo.xml b/demo/demo.xml new file mode 100644 index 0000000..d84edea --- /dev/null +++ b/demo/demo.xml @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/models/__init__.py b/models/__init__.py new file mode 100644 index 0000000..5305644 --- /dev/null +++ b/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models \ No newline at end of file diff --git a/models/models.py b/models/models.py new file mode 100644 index 0000000..92e6113 --- /dev/null +++ b/models/models.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# from odoo import models, fields, api + + +# class kalachakra(models.Model): +# _name = 'kalachakra.kalachakra' +# _description = 'kalachakra.kalachakra' + +# name = fields.Char() +# value = fields.Integer() +# value2 = fields.Float(compute="_value_pc", store=True) +# description = fields.Text() +# +# @api.depends('value') +# def _value_pc(self): +# for record in self: +# record.value2 = float(record.value) / 100 diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv new file mode 100644 index 0000000..1219e3c --- /dev/null +++ b/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_kalachakra_kalachakra,kalachakra.kalachakra,model_kalachakra_kalachakra,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/views/templates.xml b/views/templates.xml new file mode 100644 index 0000000..cea6b39 --- /dev/null +++ b/views/templates.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/views/views.xml b/views/views.xml new file mode 100644 index 0000000..52ea77c --- /dev/null +++ b/views/views.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file