Skip to content

Commit

Permalink
[FIX] calendar_resource: Fix models and views.
Browse files Browse the repository at this point in the history
* Remove display field from resource model
* Remove image field from resource model
* Improve readme description
* Fix model definitions and file names
* Add laslabs and oca to authors in manifest
  • Loading branch information
Brett Wood committed Feb 28, 2017
1 parent e38240a commit 1c21d69
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 30 deletions.
13 changes: 3 additions & 10 deletions calendar_resource/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,9 @@ Calendar Resource

This module adds new features to facilitate resource management with meetings:

* Improvement in resource.resource native object (image, note and boolean choice for using it in your calendars)
* Add a link between calendars and resources,
* Switch easily your calendar's views with attendees and resources,
* Add a new menu entry to display event by resources in several views (calendar, list and form)

Note that the customer don't expect for this step :
- any constraint between resources reservations in calendar,
- any interface with calendar_google for the 'resource' object.

To edit a resource, go to `Settings`, `Resource`, `Resources`.
* To attach resources to a meeting, go to `Calendar` => Click on a meeting => `Edit` =>
`Edit` => add any related resources.
* To edit or add a resource, go to `Settings` => `Resource` => `Resources`.

Usage
=====
Expand Down
2 changes: 1 addition & 1 deletion calendar_resource/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"version": "10.0.1.0.0",
"category": "CRM",
"website": "http://www.savoirfairelinux.com",
"author": "Savoir-faire Linux",
"author": "Savoir-faire Linux, Laslabs, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
Expand Down
4 changes: 2 additions & 2 deletions calendar_resource/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Copyright 2014 Therp BV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import calendar
from . import resource
from . import calendar_event
from . import resource_resource
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from odoo import fields, models


class calendar_event(models.Model):
class CalendarEvent(models.Model):

_inherit = 'calendar.event'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ class ResourceResource(models.Model):

_inherit = 'resource.resource'

image = fields.Binary(
string='Resource Image',
help='Avatar/icon for resource.',
)
display = fields.Boolean(
string='Display in Calendar',
help="Check if you want this resources' icon "
"to display in the main calendar view when added."
)
note = fields.Text(
string='Resource Notes',
)
7 changes: 0 additions & 7 deletions calendar_resource/views/resource_resource_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<field name="arch" type="xml">
<field name="name" position="replace" />
<xpath expr="//group[group[field[@name='user_id']]]" position="before">
<field name="image"
widget="image"
class="oe_avatar"
options="{'preview_image': 'image_medium'}" />
<div class="oe_title">
<h1>
<field name="name"
Expand All @@ -21,9 +17,6 @@
</h1>
</div>
</xpath>
<xpath expr="//field[@name='active']" position="after">
<field name="display" />
</xpath>
<xpath expr="//form/group" position="inside">
<field name="note" />
</xpath>
Expand Down

0 comments on commit 1c21d69

Please sign in to comment.