From e8198eb85eacee0de5786712c7e8b113ef98a1df Mon Sep 17 00:00:00 2001 From: Thor Date: Wed, 8 May 2019 10:41:54 +0200 Subject: [PATCH] [ADD] base_month: Creation of new object with the months of the year. --- base_month/README.rst | 34 +++++++ base_month/__init__.py | 1 + base_month/__manifest__.py | 19 ++++ base_month/data/ir_sequence_data.xml | 51 ++++++++++ base_month/i18n/es.po | 127 ++++++++++++++++++++++++ base_month/models/__init__.py | 1 + base_month/models/base_month.py | 11 ++ base_month/security/ir.model.access.csv | 2 + 8 files changed, 246 insertions(+) create mode 100644 base_month/README.rst create mode 100644 base_month/__init__.py create mode 100644 base_month/__manifest__.py create mode 100644 base_month/data/ir_sequence_data.xml create mode 100644 base_month/i18n/es.po create mode 100644 base_month/models/__init__.py create mode 100644 base_month/models/base_month.py create mode 100644 base_month/security/ir.model.access.csv diff --git a/base_month/README.rst b/base_month/README.rst new file mode 100644 index 0000000000..599429e11a --- /dev/null +++ b/base_month/README.rst @@ -0,0 +1,34 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +========== +Base month +========== + +* Creation of new object with the months of the year. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Avanzosc + +Contributors +~~~~~~~~~~~~ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/base_month/__init__.py b/base_month/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/base_month/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/base_month/__manifest__.py b/base_month/__manifest__.py new file mode 100644 index 0000000000..c5abb8a077 --- /dev/null +++ b/base_month/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2019 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Base Month", + "version": "12.0.1.0.0", + "category": "Contract Management", + "license": "AGPL-3", + "author": "AvanzOSC", + "website": "http://www.avanzosc.es", + "depends": [ + "base", + ], + "data": [ + "data/ir_sequence_data.xml", + "security/ir.model.access.csv", + ], + "installable": True, +} diff --git a/base_month/data/ir_sequence_data.xml b/base_month/data/ir_sequence_data.xml new file mode 100644 index 0000000000..d17ad0095b --- /dev/null +++ b/base_month/data/ir_sequence_data.xml @@ -0,0 +1,51 @@ + + + + January + 1 + + + February + 2 + + + March + 3 + + + April + 4 + + + May + 5 + + + June + 6 + + + July + 7 + + + August + 8 + + + September + 9 + + + October + 10 + + + November + 11 + + + December + 12 + + diff --git a/base_month/i18n/es.po b/base_month/i18n/es.po new file mode 100644 index 0000000000..d05e3c4e43 --- /dev/null +++ b/base_month/i18n/es.po @@ -0,0 +1,127 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_month +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-05-08 08:36+0000\n" +"PO-Revision-Date: 2019-05-08 08:36+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: base_month +#: model:base.month,name:base_month.base_month_april +msgid "April" +msgstr "Abril" + +#. module: base_month +#: model:base.month,name:base_month.base_month_august +msgid "August" +msgstr "Agosto" + +#. module: base_month +#: model:ir.model.fields,field_description:base_month.field_base_month__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: base_month +#: model:ir.model.fields,field_description:base_month.field_base_month__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: base_month +#: model:base.month,name:base_month.base_month_december +msgid "December" +msgstr "Diciembre" + +#. module: base_month +#: model:ir.model.fields,field_description:base_month.field_base_month__display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: base_month +#: model:base.month,name:base_month.base_month_february +msgid "February" +msgstr "Febrero" + +#. module: base_month +#: model:ir.model.fields,field_description:base_month.field_base_month__id +msgid "ID" +msgstr "" + +#. module: base_month +#: model:base.month,name:base_month.base_month_january +msgid "January" +msgstr "Enero" + +#. module: base_month +#: model:base.month,name:base_month.base_month_july +msgid "July" +msgstr "Julio" + +#. module: base_month +#: model:base.month,name:base_month.base_month_june +msgid "June" +msgstr "Junio" + +#. module: base_month +#: model:ir.model.fields,field_description:base_month.field_base_month____last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: base_month +#: model:ir.model.fields,field_description:base_month.field_base_month__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: base_month +#: model:ir.model.fields,field_description:base_month.field_base_month__write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: base_month +#: model:base.month,name:base_month.base_month_march +msgid "March" +msgstr "Marzo" + +#. module: base_month +#: model:base.month,name:base_month.base_month_may +msgid "May" +msgstr "Mayo" + +#. module: base_month +#: model:ir.model.fields,field_description:base_month.field_base_month__name +msgid "Month" +msgstr "Mes" + +#. module: base_month +#: model:ir.model,name:base_month.model_base_month +msgid "Months of the year" +msgstr "Meses del año" + +#. module: base_month +#: model:base.month,name:base_month.base_month_november +msgid "November" +msgstr "Noviembre" + +#. module: base_month +#: model:base.month,name:base_month.base_month_october +msgid "October" +msgstr "Octubre" + +#. module: base_month +#: model:base.month,name:base_month.base_month_september +msgid "September" +msgstr "Septiembre" + +#. module: base_month +#: model:ir.model.fields,field_description:base_month.field_base_month__number +msgid "Number of month" +msgstr "Número de mes" + diff --git a/base_month/models/__init__.py b/base_month/models/__init__.py new file mode 100644 index 0000000000..be6514d56c --- /dev/null +++ b/base_month/models/__init__.py @@ -0,0 +1 @@ +from . import base_month diff --git a/base_month/models/base_month.py b/base_month/models/base_month.py new file mode 100644 index 0000000000..9cd88f32a4 --- /dev/null +++ b/base_month/models/base_month.py @@ -0,0 +1,11 @@ +# Copyright 2019 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import models, fields + + +class BaseMonth(models.Model): + _name = 'base.month' + _description = 'Months of the year' + + name = fields.Char(string='Month', translate=True, required=True) + number = fields.Integer(string='Number of month', required=True) diff --git a/base_month/security/ir.model.access.csv b/base_month/security/ir.model.access.csv new file mode 100644 index 0000000000..bd04b71cb1 --- /dev/null +++ b/base_month/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_base_month_user,base.month,base_month.model_base_month,base.group_user,1,1,1,0