diff options
| author | Hiral Bhavsar <hbh@odoo.com> | 2016-12-05 12:07:29 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-01-09 10:38:53 +0100 |
| commit | 3a5341506b6bbfbfa4df354829dd6ab263b49277 (patch) | |
| tree | afb52abbd5b5849113b6a0e0bbe3c8066c30bf0f /addons | |
| parent | 0741e64e5bbe6cfd1474207b7375e5bc9da803c4 (diff) | |
[IMP] note: add an editable tree view for tags
Also:
- Don't display "Active -> True" when we create a note
- Allow to create tags on the fly on a note form view
When user create a new Note or click on 'Tick' option in kanban view, remove the message 'Active->True' & 'True->False' and Make the creation of 'Tags' inline mode.
[IMP] note: 'Tags' should be created from note's form view.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/note/models/note.py | 2 | ||||
| -rw-r--r-- | addons/note/views/note_views.xml | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/addons/note/models/note.py b/addons/note/models/note.py index 639a5675ef1..2861bb9d0ff 100644 --- a/addons/note/models/note.py +++ b/addons/note/models/note.py @@ -48,7 +48,7 @@ class Note(models.Model): inverse='_inverse_stage_id', string='Stage') stage_ids = fields.Many2many('note.stage', 'note_stage_rel', 'note_id', 'stage_id', string='Stages of Users', default=_get_default_stage_id) - open = fields.Boolean(string='Active', track_visibility='onchange', default=True) + open = fields.Boolean(string='Active', default=True) date_done = fields.Date('Date done') color = fields.Integer(string='Color Index') tag_ids = fields.Many2many('note.tag', 'note_tags_rel', 'note_id', 'tag_id', string='Tags') diff --git a/addons/note/views/note_views.xml b/addons/note/views/note_views.xml index 487856aa311..cc94f3df83f 100644 --- a/addons/note/views/note_views.xml +++ b/addons/note/views/note_views.xml @@ -49,11 +49,23 @@ </field> </record> + <!-- note Tag Tree View --> + <record id="note_tag_view_tree" model="ir.ui.view"> + <field name="name">note.tag.tree</field> + <field name="model">note.tag</field> + <field name="arch" type="xml"> + <tree string="Tags" editable="bottom"> + <field name="name"/> + </tree> + </field> + </record> + <!-- note Tag Action --> <record id="note_tag_action" model="ir.actions.act_window"> <field name="name">Tags</field> <field name="res_model">note.tag</field> <field name="view_type">form</field> + <field name="view_mode">tree,form</field> <field name="help" type="html"> <p class="oe_view_nocontent_create"> Click to add a new tag. @@ -139,7 +151,7 @@ <field name="stage_id" domain="[('user_id','=',uid)]" widget="statusbar" clickable="1"/> </header> <sheet> - <field name="tag_ids" widget="many2many_tags" placeholder="Tags" options="{'no_create_edit': True}"/> + <field name="tag_ids" widget="many2many_tags" placeholder="Tags"/> <field name="memo" widget="html" class="oe_memo" editor_height="450px" /> </sheet> <div class="oe_chatter"> |
