diff --git a/addons/web_calendar/contacts.py b/addons/web_calendar/contacts.py index 854e1e7fc58..32ab6df3b83 100644 --- a/addons/web_calendar/contacts.py +++ b/addons/web_calendar/contacts.py @@ -5,7 +5,7 @@ class web_calendar_contacts(osv.osv): _columns = { 'user_id': fields.many2one('res.users','Me'), - 'partner_id': fields.many2one('res.partner','Contact',required=True), + 'partner_id': fields.many2one('res.partner','Employee',required=True, domain=[('customer','=',True)]), 'active':fields.boolean('active'), } _defaults = { diff --git a/addons/web_calendar/contacts_view.xml b/addons/web_calendar/contacts_view.xml index e168ba08fe1..05642944d21 100644 --- a/addons/web_calendar/contacts_view.xml +++ b/addons/web_calendar/contacts_view.xml @@ -19,10 +19,9 @@

- Click to add your first contact. + Click on "create" to select colleagues you want to see meetings.

- Add your contacts here to see the events which are created by them.
- Each contact will have it own color on calendar, to see easily who is busy... + Your colleagues will appear in the right list to see them in the calendar view. You will easily manage collaboration and meeting with them.

diff --git a/addons/web_calendar/security/ir.model.access.csv b/addons/web_calendar/security/ir.model.access.csv index d616183a6cf..ea1b4050949 100644 --- a/addons/web_calendar/security/ir.model.access.csv +++ b/addons/web_calendar/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_web_calendar_contacts_all,access_web_calendar_contacts_all,model_web_calendar_contacts,,1,0,0,0 +access_web_calendar_contacts_all,access_web_calendar_contacts_all,model_web_calendar_contacts,,1,1,1,1 access_web_calendar_contacts,access_web_calendar_contacts,model_web_calendar_contacts,base.group_system,1,1,1,1 diff --git a/addons/web_calendar/static/src/js/fullcalendar.js b/addons/web_calendar/static/src/js/fullcalendar.js index ce03c8c63b1..946b6cf0a96 100644 --- a/addons/web_calendar/static/src/js/fullcalendar.js +++ b/addons/web_calendar/static/src/js/fullcalendar.js @@ -144,6 +144,7 @@ openerp.web_calendar = function(instance) { else this.colorIsAttendee = true; +/* if (isNull(attrs.avatar_model)) { this.avatar_model = 'res.partner'; } @@ -154,7 +155,15 @@ openerp.web_calendar = function(instance) { else { this.avatar_model = attrs.avatar_model; } + } +*/ + if (isNull(attrs.avatar_model)) { + this.avatar_model = null; } + else { + this.avatar_model = attrs.avatar_model; + } + if (isNull(attrs.avatar_title)) { this.avatar_title = this.avatar_model; @@ -310,13 +319,15 @@ openerp.web_calendar = function(instance) { var filter_item = { value: filter_value, label: result.partner_id[1] + " [Me]", - color: self.get_color(filter_value) + color: self.get_color(filter_value), + avatar_model: self.avatar_model }; sidebar_items[filter_value] = filter_item ; filter_item = { value: -1, label: "All...", - color: self.get_color(-1) + color: self.get_color(-1), + avatar_model: self.avatar_model }; sidebar_items[-1] = filter_item ; @@ -326,7 +337,8 @@ openerp.web_calendar = function(instance) { filter_item = { value: filter_value, label: item.partner_id[1], - color: self.get_color(filter_value) + color: self.get_color(filter_value), + avatar_model: self.avatar_model }; sidebar_items[filter_value] = filter_item ; }); @@ -349,7 +361,6 @@ openerp.web_calendar = function(instance) { return $.when(); }, extraSideBar: function() { - console.log("In extra Side bar from fullcalendar"); }, open_quick_create: function(data_template) { @@ -713,7 +724,8 @@ openerp.web_calendar = function(instance) { filter_item = { value: filter_value, label: e[self.color_field][1], - color: self.get_color(filter_value) + color: self.get_color(filter_value), + avatar_model: self.avatar_model }; if (!now_filters[e[self.color_field][0]]) now_filters[e[self.color_field][0]] = filter_item; @@ -1493,9 +1505,9 @@ openerp.web_calendar = function(instance) { }, addUpdateButton: function() { var self=this; - var button = ""; + var button = ""; this.$('div.oe_calendar_all_responsibles').append(button); - this.$(".add_contacts_link").on('click', function() { + this.$(".add_contacts_link_btn").on('click', function() { self.rpc("/web/action/load", { action_id: "web_calendar.action_calendar_contacts" }).then( function(result) { return self.do_action(result); }); diff --git a/addons/web_calendar/static/src/xml/web_fullcalendar.xml b/addons/web_calendar/static/src/xml/web_fullcalendar.xml index d0c156b0133..4102113ebaa 100644 --- a/addons/web_calendar/static/src/xml/web_fullcalendar.xml +++ b/addons/web_calendar/static/src/xml/web_fullcalendar.xml @@ -26,16 +26,17 @@
-
- - - +
+ + + + + + + + + - - - - -