-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TA#41071 add show_appearance_type (#141)
* T#008768 - PO18000211 - #41071 - Gestion du type d'affiche * Adjust description image * Apply 1 suggestion(s) to 1 file(s) * Update fr.po * Update project_project.py * Add module to dockerfile Co-authored-by: cuong.nmtm <[email protected]> Co-authored-by: David Dufresne <[email protected]>
- Loading branch information
1 parent
39e8163
commit 179c7a3
Showing
18 changed files
with
271 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 @@ | ||
Show Appearance Type | ||
========================= | ||
|
||
Description | ||
----------- | ||
|
||
The Appearance Types menu item is available to members of the group ``Project / Manager`` | ||
through the ``Project / Configuration`` menu. | ||
|
||
It shows the list of Appearance Types. | ||
|
||
.. image:: static/description/show_appearance_type_list.png | ||
|
||
By clicking on a Appearance Types, the form view is opened. | ||
|
||
.. image:: static/description/show_appearance_type_form.png | ||
|
||
On project form view, a new field Appearance Type is showed | ||
|
||
.. image:: static/description/project_show_appearance_type.png | ||
|
||
Configuration | ||
------------- | ||
|
||
No configuration required apart from module installation. | ||
|
||
Contributors | ||
------------ | ||
* Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
* Komit (https://komit-consulting.com) | ||
|
||
More information | ||
---------------- | ||
* Meet us at https://bit.ly/numigi-com |
This file contains 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,4 @@ | ||
# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from . import models |
This file contains 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,18 @@ | ||
# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
{ | ||
"name": "Show Appearance Type", | ||
"summary": "Add new object Show Appearance Type and new field Appearance Type on Project", | ||
"version": "1.0.0", | ||
"website": "https://bit.ly/numigi-com", | ||
"author": "Numigi", | ||
"maintainer": "Numigi", | ||
"license": "LGPL-3", | ||
"installable": True, | ||
"depends": ["show_project"], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"views/project_project.xml", | ||
"views/show_appearance_type.xml", | ||
], | ||
} |
This file contains 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,87 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * show_appearance_type | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2021-12-29 19:09+0000\n" | ||
"PO-Revision-Date: 2021-12-29 19:09+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: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__active | ||
msgid "Active" | ||
msgstr "Actif" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_project_project__show_appearance_type_id | ||
msgid "Appearance Type" | ||
msgstr "Type d’affiche" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.actions.act_window,name:show_appearance_type.show_appearance_type_action | ||
#: model:ir.ui.menu,name:show_appearance_type.show_appearance_type_menu | ||
msgid "Appearance Types" | ||
msgstr "Types d’affiche" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__create_uid | ||
msgid "Created by" | ||
msgstr "Créé par" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__create_date | ||
msgid "Created on" | ||
msgstr "Créé le" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__description | ||
msgid "Description" | ||
msgstr "Description" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__display_name | ||
msgid "Display Name" | ||
msgstr "Nom affiché" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__id | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type____last_update | ||
msgid "Last Modified on" | ||
msgstr "Dernière modification le" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__write_uid | ||
msgid "Last Updated by" | ||
msgstr "Dernière mise à jour par" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__write_date | ||
msgid "Last Updated on" | ||
msgstr "Dernière mise à jour le" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__name | ||
msgid "Name" | ||
msgstr "Nom" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model,name:show_appearance_type.model_project_project | ||
msgid "Project" | ||
msgstr "Projet" | ||
|
||
#. module: show_appearance_type | ||
#: model:ir.model,name:show_appearance_type.model_show_appearance_type | ||
msgid "Show Appearance Type" | ||
msgstr "Afficher le type d'affiche" |
This file contains 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,5 @@ | ||
# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from . import project_project | ||
from . import show_appearance_type |
This file contains 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,14 @@ | ||
# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ProjectProject(models.Model): | ||
_inherit = "project.project" | ||
|
||
show_appearance_type_id = fields.Many2one( | ||
"show.appearance.type", | ||
"Appearance Type", | ||
ondelete="restrict", | ||
) |
This file contains 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,13 @@ | ||
# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ShowAppearanceType(models.Model): | ||
_name = "show.appearance.type" | ||
_description = "Show Appearance Type" | ||
|
||
name = fields.Char(required=True) | ||
description = fields.Text() | ||
active = fields.Boolean(default=True) |
This file contains 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,3 @@ | ||
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink | ||
access_show_appearance_type_user,name_show_appearance_type_user,model_show_appearance_type,project.group_project_user,1,0,0,0 | ||
access_show_appearance_type_manager,name_show_appearance_type_manager,model_show_appearance_type,project.group_project_manager,1,1,1,1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+63 KB
show_appearance_type/static/description/project_show_appearance_type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.6 KB
show_appearance_type/static/description/show_appearance_type_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.6 KB
show_appearance_type/static/description/show_appearance_type_list.png
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 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,4 @@ | ||
# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from . import test_show_appearance_type |
This file contains 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,13 @@ | ||
# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo.tests.common import SavepointCase | ||
|
||
|
||
class TestShowProject(SavepointCase): | ||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
|
||
def test_create_appearance_type(self): | ||
self.env["show.appearance.type"].create({"name": "Test", "description": "Test"}) |
This file contains 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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
|
||
<record id="project_form" model="ir.ui.view"> | ||
<field name="name">show.appearance.type.project.form</field> | ||
<field name="model">project.project</field> | ||
<field name="inherit_id" ref="show_project.project_form"/> | ||
<field name="priority">10</field> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='showcase']" position="after"> | ||
<field name="show_appearance_type_id" attrs="{'invisible': [('show_type', '!=', 'show')]}"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
This file contains 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,58 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
|
||
<record id="show_appearance_type_view_search" model="ir.ui.view"> | ||
<field name="name">show.appearance.type.view.search</field> | ||
<field name="model">show.appearance.type</field> | ||
<field name="arch" type="xml"> | ||
<search> | ||
<field name="name"/> | ||
<field name="description"/> | ||
</search> | ||
</field> | ||
</record> | ||
|
||
<record id="show_appearance_type_view_tree" model="ir.ui.view"> | ||
<field name="name">show.appearance.type.view.tree</field> | ||
<field name="model">show.appearance.type</field> | ||
<field name="arch" type="xml"> | ||
<tree> | ||
<field name="name"/> | ||
<field name="active"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="show_appearance_type_view_form" model="ir.ui.view"> | ||
<field name="name">show.appearance.type.view.tree</field> | ||
<field name="model">show.appearance.type</field> | ||
<field name="arch" type="xml"> | ||
<form> | ||
<sheet> | ||
<group> | ||
<group> | ||
<field name="name"/> | ||
<field name="description"/> | ||
<field name="active"/> | ||
</group> | ||
</group> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="show_appearance_type_action" model="ir.actions.act_window"> | ||
<field name="name">Appearance Types</field> | ||
<field name="res_model">show.appearance.type</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
</record> | ||
|
||
<menuitem id="show_appearance_type_menu" | ||
name="Appearance Types" | ||
action="show_appearance_type_action" | ||
parent="project.menu_project_config" | ||
sequence="15" | ||
/> | ||
|
||
</odoo> |