From 5f0508111d0dbf37130c27b58694a4a59fa9f2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20de=20Souza?= Date: Tue, 16 May 2017 19:43:51 -0300 Subject: [PATCH] first commit --- __init__.py | 4 +++ __manifest__.py | 35 +++++++++++++++++++++ controllers/__init__.py | 3 ++ controllers/controllers.py | 20 ++++++++++++ demo/demo.xml | 30 ++++++++++++++++++ models/__init__.py | 3 ++ models/models.py | 15 +++++++++ security/ir.model.access.csv | 2 ++ views/templates.xml | 22 ++++++++++++++ views/views.xml | 59 ++++++++++++++++++++++++++++++++++++ 10 files changed, 193 insertions(+) create mode 100644 __init__.py create mode 100644 __manifest__.py create mode 100644 controllers/__init__.py create mode 100644 controllers/controllers.py create mode 100644 demo/demo.xml create mode 100644 models/__init__.py create mode 100644 models/models.py create mode 100644 security/ir.model.access.csv create mode 100644 views/templates.xml create mode 100644 views/views.xml 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..0e88b11 --- /dev/null +++ b/__manifest__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +{ + 'name': "odoo_mautic", + + '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/master/odoo/addons/base/module/module_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', + ], +} \ No newline at end of file diff --git a/controllers/__init__.py b/controllers/__init__.py new file mode 100644 index 0000000..457bae2 --- /dev/null +++ b/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import controllers \ No newline at end of file diff --git a/controllers/controllers.py b/controllers/controllers.py new file mode 100644 index 0000000..174b1a8 --- /dev/null +++ b/controllers/controllers.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from odoo import http + +# class OdooMautic(http.Controller): +# @http.route('/odoo_mautic/odoo_mautic/', auth='public') +# def index(self, **kw): +# return "Hello, world" + +# @http.route('/odoo_mautic/odoo_mautic/objects/', auth='public') +# def list(self, **kw): +# return http.request.render('odoo_mautic.listing', { +# 'root': '/odoo_mautic/odoo_mautic', +# 'objects': http.request.env['odoo_mautic.odoo_mautic'].search([]), +# }) + +# @http.route('/odoo_mautic/odoo_mautic/objects//', auth='public') +# def object(self, obj, **kw): +# return http.request.render('odoo_mautic.object', { +# 'object': obj +# }) \ No newline at end of file diff --git a/demo/demo.xml b/demo/demo.xml new file mode 100644 index 0000000..e766cce --- /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..5f54dde --- /dev/null +++ b/models/models.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields, api + +# class odoo_mautic(models.Model): +# _name = 'odoo_mautic.odoo_mautic' + +# name = fields.Char() +# value = fields.Integer() +# value2 = fields.Float(compute="_value_pc", store=True) +# description = fields.Text() +# +# @api.depends('value') +# def _value_pc(self): +# self.value2 = float(self.value) / 100 \ No newline at end of file diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv new file mode 100644 index 0000000..b95b0d6 --- /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_odoo_mautic_odoo_mautic,odoo_mautic.odoo_mautic,model_odoo_mautic_odoo_mautic,,1,0,0,0 \ No newline at end of file diff --git a/views/templates.xml b/views/templates.xml new file mode 100644 index 0000000..ba61acd --- /dev/null +++ b/views/templates.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/views/views.xml b/views/views.xml new file mode 100644 index 0000000..ff2334b --- /dev/null +++ b/views/views.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file