-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[8.0][base_custom_info] New module to have custom information associated to any model #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
32441de
[ADD][8.0] base_custom_info: Init develop
carlosdauden 096f951
[ADD][8.0] base_custom_info: Initial development
carlosdauden 93548cc
[ADD][8.0] base_custom_info: Views
carlosdauden 8724d54
[IMP][8.0] base_custom_info: Actions and menus. Refactor strings Info…
carlosdauden a694cfa
[FIX][8.0] base_custom_info: Minor fix and security
carlosdauden 821a8fd
Fix many bugs and styling, and prepare for OCA.
yajo 56243f2
Cosmetic changes.
yajo 2e0f544
Move model to model_id.
yajo 74224c2
Better string.
yajo a8dba79
Warn about data types.
yajo d1b340b
Fix bug in domain computation.
yajo b00ae9a
Use of `@api.multi`.
yajo 01fd725
Use model codename instead and make its linked record a computed field.
yajo b404d46
Add images.
yajo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| .. 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 Custom Info | ||
| ================ | ||
|
|
||
| This module allows to create custom fields in models without altering model's | ||
| structure. | ||
|
|
||
| Installation | ||
| ============ | ||
|
|
||
| This module serves as a base for other modules that implement this behavior in | ||
| concrete models. | ||
|
|
||
| This module is a technical dependency and is to be installed in parallel to | ||
| other modules. | ||
|
|
||
| Usage | ||
| ===== | ||
|
|
||
| This module defines *Custom Info Templates* that define what properties are | ||
| expected for a given record. | ||
|
|
||
| To define a template, you need to: | ||
|
|
||
| * Go to *Settings > Custom Info > Templates*. | ||
| * Create one. | ||
| * Add some *Properties* to it. | ||
|
|
||
| All database records with that template enabled will automatically fill those | ||
| properties. | ||
|
|
||
| To manage the properties, you need to: | ||
|
|
||
| * Go to *Settings > Custom Info > Properties*. | ||
|
|
||
| To manage their values, you need to: | ||
|
|
||
| * Go to *Settings > Custom Info > Values*. | ||
|
|
||
| .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
| :alt: Try me on Runbot | ||
| :target: https://runbot.odoo-community.org/runbot/135/8.0 | ||
|
|
||
| Development | ||
| =========== | ||
|
|
||
| To create a module that supports custom information, just depend on this module | ||
| and inherit from the ``custom.info`` model. | ||
|
|
||
| Known issues / Roadmap | ||
| ====================== | ||
|
|
||
| * All data types of custom information values are text strings. | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues | ||
| <https://github.com/OCA/product-attribute/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 | ||
| <https://github.com/OCA/ | ||
| product-attribute/issues/new?body=module:%20 | ||
| base_custom_info%0Aversion:%20 | ||
| 8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| * Rafael Blasco <rafabn@antiun.com> | ||
| * Carlos Dauden <carlos@incaser.es> | ||
| * Sergio Teruel <sergio@incaser.es> | ||
| * Jairo Llopis <yajo.sk8@gmail.com> | ||
|
|
||
| Maintainer | ||
| ---------- | ||
|
|
||
| .. image:: https://odoo-community.org/logo.png | ||
| :alt: Odoo Community Association | ||
| :target: https://odoo-community.org | ||
|
|
||
| This module is maintained by the OCA. | ||
|
|
||
| OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
| mission is to support the collaborative development of Odoo features and | ||
| promote its widespread use. | ||
|
|
||
| To contribute to this module, please visit https://odoo-community.org. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # © 2015 Antiun Ingeniería S.L. - Sergio Teruel | ||
| # © 2015 Antiun Ingeniería S.L. - Carlos Dauden | ||
| # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
|
||
| from . import models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # © 2015 Antiun Ingeniería S.L. - Sergio Teruel | ||
| # © 2015 Antiun Ingeniería S.L. - Carlos Dauden | ||
| # © 2015 Antiun Ingeniería S.L. - Jairo Llopis | ||
| # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
|
||
| { | ||
| 'name': "Base Custom Info", | ||
| 'summary': "Add custom field in models", | ||
| 'category': 'Tools', | ||
| 'version': '8.0.1.0.0', | ||
| 'depends': [ | ||
| 'base', | ||
| ], | ||
| 'data': [ | ||
| 'views/custom_info_template_view.xml', | ||
| 'views/custom_info_property_view.xml', | ||
| 'views/custom_info_value_view.xml', | ||
| 'views/menu.xml', | ||
| 'security/ir.model.access.csv', | ||
| ], | ||
| "images": [ | ||
| "images/menu.png", | ||
| "images/properties.png", | ||
| "images/templates.png", | ||
| "images/values.png", | ||
| ], | ||
| 'author': 'Antiun Ingeniería S.L., ' | ||
| 'Incaser Informatica S.L., ' | ||
| 'Odoo Community Association (OCA)', | ||
| 'website': 'http://www.antiun.com', | ||
| 'license': 'AGPL-3', | ||
| 'installable': True, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,198 @@ | ||
| # Translation of Odoo Server. | ||
| # This file contains the translation of the following modules: | ||
| # * base_custom_info | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 8.0\n" | ||
| "Report-Msgid-Bugs-To: \n" | ||
| "POT-Creation-Date: 2015-12-15 17:10+0100\n" | ||
| "PO-Revision-Date: 2015-12-15 17:12+0100\n" | ||
| "Last-Translator: \n" | ||
| "Language-Team: \n" | ||
| "Language: es\n" | ||
| "MIME-Version: 1.0\n" | ||
| "Content-Type: text/plain; charset=UTF-8\n" | ||
| "Content-Transfer-Encoding: 8bit\n" | ||
| "Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
| "X-Generator: Poedit 1.8.5\n" | ||
|
|
||
| #. module: base_custom_info | ||
| #: model:ir.actions.act_window,help:base_custom_info.custom_info_template_action | ||
| msgid "" | ||
| "<p class=\"oe_view_nocontent_create\">\n" | ||
| " Click to define a new custom info template.\n" | ||
| " </p><p>\n" | ||
| " You must define a custom info template for each\n" | ||
| " product properties group.\n" | ||
| " </p>\n" | ||
| " " | ||
| msgstr "" | ||
| "<p class=\"oe_view_nocontent_create\">\n" | ||
| "Pulsa para definir una nueva plantilla de información personalizada.\n" | ||
| "</p><p>\n" | ||
| "Debe definir una plantilla de información personalizada para cada diferente grupo de propiedades.\n" | ||
| "</p>" | ||
|
|
||
| #. module: base_custom_info | ||
| #: sql_constraint:custom.info.value:0 | ||
| msgid "Another property with that name exists for that resource." | ||
| msgstr "Ya existe otra propiedad con ese nombre para ese recurso." | ||
|
|
||
| #. module: base_custom_info | ||
| #: sql_constraint:custom.info.property:0 | ||
| msgid "Another property with that name exists for that template." | ||
| msgstr "Ya existe otra propiedad con ese nombre en esa plantilla." | ||
|
|
||
| #. module: base_custom_info | ||
| #: sql_constraint:custom.info.template:0 | ||
| msgid "Another template with that name exists for that model." | ||
| msgstr "Ya existe otra plantilla con ese nombre para ese modelo." | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.property,create_uid:0 | ||
| #: field:custom.info.template,create_uid:0 | ||
| #: field:custom.info.value,create_uid:0 | ||
| msgid "Created by" | ||
| msgstr "Creado por" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.property,create_date:0 | ||
| #: field:custom.info.template,create_date:0 | ||
| #: field:custom.info.value,create_date:0 | ||
| msgid "Created on" | ||
| msgstr "Creado el" | ||
|
|
||
| #. module: base_custom_info | ||
| #: model:ir.ui.menu,name:base_custom_info.menu_base_custom_info | ||
| msgid "Custom Info" | ||
| msgstr "Información personalizada" | ||
|
|
||
| #. module: base_custom_info | ||
| #: view:custom.info.template:base_custom_info.base_custom_info_template_form | ||
| msgid "Custom Info Template" | ||
| msgstr "Plantilla de información personalizada" | ||
|
|
||
| #. module: base_custom_info | ||
| #: view:custom.info.property:base_custom_info.base_custom_info_template_line_form | ||
| msgid "Custom Info Template Properties" | ||
| msgstr "Propiedades de la plantilla de información personalizada" | ||
|
|
||
| #. module: base_custom_info | ||
| #: view:custom.info.property:base_custom_info.base_custom_info_template_line_tree | ||
| #: view:custom.info.template:base_custom_info.base_custom_info_template_tree | ||
| msgid "Custom Info Templates" | ||
| msgstr "Plantillas de información personalizada" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info,custom_info_template_id:0 | ||
| msgid "Custom Information Template" | ||
| msgstr "Plantilla de información personalizada" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info,custom_info_ids:0 | ||
| msgid "Custom Properties" | ||
| msgstr "Propiedades personalizadas" | ||
|
|
||
| #. module: base_custom_info | ||
| #: view:custom.info.value:base_custom_info.base_custom_info_value_tree | ||
| msgid "Custom Property Values" | ||
| msgstr "Valores de las propiedades personalizadas" | ||
|
|
||
| #. module: base_custom_info | ||
| #: model:ir.model,name:base_custom_info.model_custom_info_property | ||
| msgid "Custom information property" | ||
| msgstr "Propiedad de información personalizada" | ||
|
|
||
| #. module: base_custom_info | ||
| #: model:ir.model,name:base_custom_info.model_custom_info_template | ||
| msgid "Custom information template" | ||
| msgstr "Plantilla de información personalizada" | ||
|
|
||
| #. module: base_custom_info | ||
| #: model:ir.model,name:base_custom_info.model_custom_info_value | ||
| msgid "Custom information value" | ||
| msgstr "Valor de información personalizada" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info,id:0 field:custom.info.property,id:0 | ||
| #: field:custom.info.template,id:0 field:custom.info.value,id:0 | ||
| msgid "ID" | ||
| msgstr "ID" | ||
|
|
||
| #. module: base_custom_info | ||
| #: view:custom.info.template:base_custom_info.base_custom_info_template_form | ||
| msgid "Info Lines" | ||
| msgstr "Líneas de información" | ||
|
|
||
| #. module: base_custom_info | ||
| #: model:ir.model,name:base_custom_info.model_custom_info | ||
| msgid "Inheritable abstract model to add custom info in any model" | ||
| msgstr "Modelo abstracto que se puede heredar para añadir información personalizada a cualquier modelo" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.property,write_uid:0 | ||
| #: field:custom.info.template,write_uid:0 field:custom.info.value,write_uid:0 | ||
| msgid "Last Updated by" | ||
| msgstr "Última actualización por" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.property,write_date:0 | ||
| #: field:custom.info.template,write_date:0 | ||
| #: field:custom.info.value,write_date:0 | ||
| msgid "Last Updated on" | ||
| msgstr "Última actualización el" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.template,model_id:0 field:custom.info.value,model:0 | ||
| msgid "Model" | ||
| msgstr "Modelo" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.property,name:0 field:custom.info.template,name:0 | ||
| msgid "Name" | ||
| msgstr "Nombre" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.template,info_ids:0 | ||
| #: model:ir.actions.act_window,name:base_custom_info.custom_info_template_line_action | ||
| #: model:ir.ui.menu,name:base_custom_info.menu_base_custom_info_template_line | ||
| msgid "Properties" | ||
| msgstr "Propiedades" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.value,property_id:0 | ||
| msgid "Property" | ||
| msgstr "Propiedad" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.property,info_value_ids:0 | ||
| msgid "Property Values" | ||
| msgstr "Valor de la propiedad" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.value,res_id:0 | ||
| msgid "Resource ID" | ||
| msgstr "ID del recurso" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.property,template_id:0 | ||
| msgid "Template" | ||
| msgstr "Plantilla" | ||
|
|
||
| #. module: base_custom_info | ||
| #: model:ir.actions.act_window,name:base_custom_info.custom_info_template_action | ||
| #: model:ir.ui.menu,name:base_custom_info.menu_base_custom_info_template | ||
| msgid "Templates" | ||
| msgstr "Plantillas" | ||
|
|
||
| #. module: base_custom_info | ||
| #: field:custom.info.value,value:0 | ||
| msgid "Value" | ||
| msgstr "Valor" | ||
|
|
||
| #. module: base_custom_info | ||
| #: model:ir.actions.act_window,name:base_custom_info.custom_info_value_action | ||
| #: model:ir.ui.menu,name:base_custom_info.menu_base_custom_info_value | ||
| msgid "Values" | ||
| msgstr "Valores" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # © 2015 Antiun Ingeniería S.L. - Sergio Teruel | ||
| # © 2015 Antiun Ingeniería S.L. - Carlos Dauden | ||
| # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
|
||
| from . import custom_info |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a sub category of usage no?
usage single highlight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a different one. Developing on a module is not the same as using it.