Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom tags can be added to artists, albums and tracks.
- Loading branch information
1 parent
5078bfd
commit 7e7ba12
Showing
13 changed files
with
131 additions
and
28 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
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,13 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class MusicTag(models.Model): | ||
_name = "oomusic.tag" | ||
_description = "Custom Tags" | ||
|
||
name = fields.Char(required=True) | ||
color = fields.Integer(string="Color Index") | ||
|
||
_sql_constraints = [("name_uniq", "unique (name)", "Tag name already exists!")] |
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
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,46 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="oomusic_tag_view_form" model="ir.ui.view"> | ||
<field name="name">oomusic.tag.form</field> | ||
<field name="model">oomusic.tag</field> | ||
<field name="arch" type="xml"> | ||
<form string="Tag" create="0"> | ||
<sheet> | ||
<group> | ||
<group> | ||
<field name="name"/> | ||
<field name="color"/> | ||
</group> | ||
</group> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="oomusic_tag_view_tree" model="ir.ui.view"> | ||
<field name="name">oomusic.tag.tree</field> | ||
<field name="model">oomusic.tag</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Tags" create="0" editable="bottom"> | ||
<field name="name"/> | ||
<field name="color"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="action_tag" model="ir.actions.act_window"> | ||
<field name="name">Tags</field> | ||
<field name="res_model">oomusic.tag</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="help" type="html"> | ||
<p> | ||
You will find here all your tags. | ||
</p> | ||
</field> | ||
</record> | ||
|
||
<!-- Third Level Menu --> | ||
<menuitem id="menu_action_tag" parent="menu_oomusic_config" action="action_tag" sequence="40" groups="base.group_no_one"/> | ||
</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