diff --git a/ur_data/ur_data/__init__.py b/ur_data/ur_data/__init__.py new file mode 100644 index 0000000..511a0ca --- /dev/null +++ b/ur_data/ur_data/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import controllers +from . import models \ No newline at end of file diff --git a/ur_data/ur_data/__manifest__.py b/ur_data/ur_data/__manifest__.py new file mode 100644 index 0000000..4c149d1 --- /dev/null +++ b/ur_data/ur_data/__manifest__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +{ + 'name': """Business Register(Uzņēmumu Reģistrs) open data retriever""", + + 'summary':"""Module for loading Latvian Business Register data""", + + '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/ur_data/ur_data/__pycache__/__init__.cpython-39.pyc b/ur_data/ur_data/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..3477449 Binary files /dev/null and b/ur_data/ur_data/__pycache__/__init__.cpython-39.pyc differ diff --git a/ur_data/ur_data/controllers/__init__.py b/ur_data/ur_data/controllers/__init__.py new file mode 100644 index 0000000..457bae2 --- /dev/null +++ b/ur_data/ur_data/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import controllers \ No newline at end of file diff --git a/ur_data/ur_data/controllers/__pycache__/__init__.cpython-39.pyc b/ur_data/ur_data/controllers/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..47902b2 Binary files /dev/null and b/ur_data/ur_data/controllers/__pycache__/__init__.cpython-39.pyc differ diff --git a/ur_data/ur_data/controllers/__pycache__/controllers.cpython-39.pyc b/ur_data/ur_data/controllers/__pycache__/controllers.cpython-39.pyc new file mode 100644 index 0000000..dd2eac2 Binary files /dev/null and b/ur_data/ur_data/controllers/__pycache__/controllers.cpython-39.pyc differ diff --git a/ur_data/ur_data/controllers/controllers.py b/ur_data/ur_data/controllers/controllers.py new file mode 100644 index 0000000..a0b0b9e --- /dev/null +++ b/ur_data/ur_data/controllers/controllers.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# from odoo import http + + +# class UrData(http.Controller): +# @http.route('/ur_data/ur_data', auth='public') +# def index(self, **kw): +# return "Hello, world" + +# @http.route('/ur_data/ur_data/objects', auth='public') +# def list(self, **kw): +# return http.request.render('ur_data.listing', { +# 'root': '/ur_data/ur_data', +# 'objects': http.request.env['ur_data.ur_data'].search([]), +# }) + +# @http.route('/ur_data/ur_data/objects/', auth='public') +# def object(self, obj, **kw): +# return http.request.render('ur_data.object', { +# 'object': obj +# }) diff --git a/ur_data/ur_data/demo/demo.xml b/ur_data/ur_data/demo/demo.xml new file mode 100644 index 0000000..f385723 --- /dev/null +++ b/ur_data/ur_data/demo/demo.xml @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/ur_data/ur_data/models/__init__.py b/ur_data/ur_data/models/__init__.py new file mode 100644 index 0000000..5305644 --- /dev/null +++ b/ur_data/ur_data/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models \ No newline at end of file diff --git a/ur_data/ur_data/models/__pycache__/__init__.cpython-39.pyc b/ur_data/ur_data/models/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..c9e3bc8 Binary files /dev/null and b/ur_data/ur_data/models/__pycache__/__init__.cpython-39.pyc differ diff --git a/ur_data/ur_data/models/__pycache__/models.cpython-39.pyc b/ur_data/ur_data/models/__pycache__/models.cpython-39.pyc new file mode 100644 index 0000000..e269241 Binary files /dev/null and b/ur_data/ur_data/models/__pycache__/models.cpython-39.pyc differ diff --git a/ur_data/ur_data/models/models.py b/ur_data/ur_data/models/models.py new file mode 100644 index 0000000..901f967 --- /dev/null +++ b/ur_data/ur_data/models/models.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# from odoo import models, fields, api + + +# class ur_data(models.Model): +# _name = 'ur_data.ur_data' +# _description = 'ur_data.ur_data' + +# 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/ur_data/ur_data/security/ir.model.access.csv b/ur_data/ur_data/security/ir.model.access.csv new file mode 100644 index 0000000..5adfc8b --- /dev/null +++ b/ur_data/ur_data/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_ur_data_ur_data,ur_data.ur_data,model_ur_data_ur_data,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/ur_data/ur_data/static/description/icon.png b/ur_data/ur_data/static/description/icon.png new file mode 100644 index 0000000..2298750 Binary files /dev/null and b/ur_data/ur_data/static/description/icon.png differ diff --git a/ur_data/ur_data/views/templates.xml b/ur_data/ur_data/views/templates.xml new file mode 100644 index 0000000..cea6b39 --- /dev/null +++ b/ur_data/ur_data/views/templates.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/ur_data/ur_data/views/views.xml b/ur_data/ur_data/views/views.xml new file mode 100644 index 0000000..b813d92 --- /dev/null +++ b/ur_data/ur_data/views/views.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file