Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
cafbf071
Commit
cafbf071
authored
10 years ago
by
Jeremy Kersten
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] website_blog: Add menu, form view and tree view to manage tags.
parent
abcba53a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/website_blog/models/website_blog.py
+3
-0
3 additions, 0 deletions
addons/website_blog/models/website_blog.py
addons/website_blog/views/website_blog_views.xml
+36
-0
36 additions, 0 deletions
addons/website_blog/views/website_blog_views.xml
with
39 additions
and
0 deletions
addons/website_blog/models/website_blog.py
+
3
−
0
View file @
cafbf071
...
...
@@ -30,6 +30,9 @@ class BlogTag(osv.Model):
_order
=
'
name
'
_columns
=
{
'
name
'
:
fields
.
char
(
'
Name
'
,
required
=
True
),
'
post_ids
'
:
fields
.
many2many
(
'
blog.post
'
,
string
=
'
Posts
'
,
),
}
...
...
This diff is collapsed.
Click to expand it.
addons/website_blog/views/website_blog_views.xml
+
36
−
0
View file @
cafbf071
...
...
@@ -161,5 +161,41 @@
res_model=
"blog.post.history"
src_model=
"blog.post"
/>
<record
model=
"ir.ui.view"
id=
"blog_tag_tree"
>
<field
name=
"name"
>
blog_tag_tree
</field>
<field
name=
"model"
>
blog.tag
</field>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"Tag List"
create=
"false"
>
<field
name=
"name"
/>
<field
name=
"post_ids"
/>
</tree>
</field>
</record>
<record
model=
"ir.ui.view"
id=
"blog_tag_form"
>
<field
name=
"name"
>
blog_tag_form
</field>
<field
name=
"model"
>
blog.tag
</field>
<field
name=
"arch"
type=
"xml"
>
<form
string=
"Tag Form"
>
<sheet>
<group>
<field
name=
"name"
/>
</group>
<label
for=
"post_ids"
string=
"Used in: "
/>
<field
name=
"post_ids"
/>
</sheet>
</form>
</field>
</record>
<record
model=
"ir.actions.act_window"
id=
"action_tags"
>
<field
name=
"name"
>
Blog Tags
</field>
<field
name=
"res_model"
>
blog.tag
</field>
<field
name=
"view_type"
>
form
</field>
<field
name=
"view_mode"
>
tree,form,graph
</field>
<field
name=
"view_id"
ref=
"blog_tag_tree"
/>
</record>
<menuitem
id=
"menu_blog_tag"
parent=
"menu_wiki"
name=
"Blog Tags"
action=
"action_tags"
sequence=
"40"
/>
</data>
</openerp>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment