diff --git a/cor_custom/__init__.py b/cor_custom/__init__.py new file mode 100644 index 0000000..511a0ca --- /dev/null +++ b/cor_custom/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import controllers +from . import models \ No newline at end of file diff --git a/cor_custom/__manifest__.py b/cor_custom/__manifest__.py new file mode 100644 index 0000000..517a6b0 --- /dev/null +++ b/cor_custom/__manifest__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +{ + 'name': "cor_custom", + + '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/cor_custom/controllers/__init__.py b/cor_custom/controllers/__init__.py new file mode 100644 index 0000000..457bae2 --- /dev/null +++ b/cor_custom/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import controllers \ No newline at end of file diff --git a/cor_custom/controllers/controllers.py b/cor_custom/controllers/controllers.py new file mode 100644 index 0000000..a8a213a --- /dev/null +++ b/cor_custom/controllers/controllers.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# from odoo import http + + +# class CorCustom(http.Controller): +# @http.route('/cor_custom/cor_custom/', auth='public') +# def index(self, **kw): +# return "Hello, world" + +# @http.route('/cor_custom/cor_custom/objects/', auth='public') +# def list(self, **kw): +# return http.request.render('cor_custom.listing', { +# 'root': '/cor_custom/cor_custom', +# 'objects': http.request.env['cor_custom.cor_custom'].search([]), +# }) + +# @http.route('/cor_custom/cor_custom/objects//', auth='public') +# def object(self, obj, **kw): +# return http.request.render('cor_custom.object', { +# 'object': obj +# }) diff --git a/cor_custom/demo/demo.xml b/cor_custom/demo/demo.xml new file mode 100644 index 0000000..1d8cbab --- /dev/null +++ b/cor_custom/demo/demo.xml @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/cor_custom/models/__init__.py b/cor_custom/models/__init__.py new file mode 100644 index 0000000..5305644 --- /dev/null +++ b/cor_custom/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models \ No newline at end of file diff --git a/cor_custom/models/models.py b/cor_custom/models/models.py new file mode 100644 index 0000000..c89ae76 --- /dev/null +++ b/cor_custom/models/models.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# from odoo import models, fields, api + + +# class cor_custom(models.Model): +# _name = 'cor_custom.cor_custom' +# _description = 'cor_custom.cor_custom' + +# 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/cor_custom/security/ir.model.access.csv b/cor_custom/security/ir.model.access.csv new file mode 100644 index 0000000..fdc1832 --- /dev/null +++ b/cor_custom/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_cor_custom_cor_custom,cor_custom.cor_custom,model_cor_custom_cor_custom,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/cor_custom/views/templates.xml b/cor_custom/views/templates.xml new file mode 100644 index 0000000..cea6b39 --- /dev/null +++ b/cor_custom/views/templates.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/cor_custom/views/views.xml b/cor_custom/views/views.xml new file mode 100644 index 0000000..de75043 --- /dev/null +++ b/cor_custom/views/views.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file