Merge lp:~openerp-dev/openerp-web/trunk-calendar-favorite-meeting-ptr into lp:~openerp-dev/openerp-web/trunk-calendar-favorite-meeting-psa

Proposed by Pariket Trivedi(OpenERP)
Status: Merged
Merged at revision: 3956
Proposed branch: lp:~openerp-dev/openerp-web/trunk-calendar-favorite-meeting-ptr
Merge into: lp:~openerp-dev/openerp-web/trunk-calendar-favorite-meeting-psa
Diff against target: 59 lines (+30/-10)
2 files modified
addons/web_calendar/static/src/js/web_calendar.js (+27/-7)
addons/web_calendar/static/src/xml/web_fullcalendar.xml (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/trunk-calendar-favorite-meeting-ptr
Reviewer Review Type Date Requested Status
Pariket Trivedi(OpenERP) Needs Resubmitting
Paramjit Singh Sahota(OpenERP) Needs Fixing
Review via email: mp+210605@code.launchpad.net

Description of the change

hello sir,

i hanve add new input text autocomplete use partner_id in calendar view.
and add new partner in Add Employee's Meeting in calendar.

thank you,
ptr

To post a comment you must log in.
Revision history for this message
Paramjit Singh Sahota(OpenERP) (psa-openerp) wrote :

Hello ptr,
1/. In your diff, on line no. 11 & 12, Why are you using the context in search when you are not getting the value in context??
2/. In your diff, on line no. 21 & 22, Why are you using the DOM object here??

review: Needs Fixing
3956. By Pariket Trivedi(OpenERP)

[IMP]: autocomplete input field change position in template.

3957. By Pariket Trivedi(OpenERP)

 [MEREG]: lp:~openerp-dev/openerp-web/trunk-calendar-favorite-meeting-psa.

Revision history for this message
Pariket Trivedi(OpenERP) (pariket.trivedi-openerp) :
review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/web_calendar/static/src/js/web_calendar.js'
--- addons/web_calendar/static/src/js/web_calendar.js 2014-03-13 11:36:34 +0000
+++ addons/web_calendar/static/src/js/web_calendar.js 2014-03-13 11:40:52 +0000
@@ -1363,13 +1363,33 @@
1363 },1363 },
1364 addUpdateButton: function() {1364 addUpdateButton: function() {
1365 var self=this;1365 var self=this;
1366 this.$('div.oe_calendar_all_responsibles').append(QWeb.render('CalendarView.sidebar.button_add_contact'));1366 this.$('div.oe_calendar_all_responsibles').prepend(QWeb.render('CalendarView.sidebar.button_add_contact'));
1367 this.$(".add_contacts_link_btn").on('click', function() {1367 var name = new Array();
1368 self.rpc("/web/action/load", {1368 var id = new Array();
1369 action_id: "calendar.action_calendar_contacts"1369 partner_obj = new instance.web.Model('res.partner')
1370 }).then( function(result) { return self.do_action(result); });1370 partner_obj.call("search", [[ ]]).then(function (record_ids) {
1371 });1371 partner_obj.call("read", [record_ids, ['name', 'user_ids']]).then(function (record_data) {
1372 1372 record_data.map(function(i) {
1373 if (i.user_ids[0] != self.session.uid){
1374 name.push(i.name);
1375 id.push(i.id);
1376 }
1377 });
1378 $('input[name=add_partner]').autocomplete({source: name});
1379 });
1380 });
1381 this.$("#add_meeting").on('focusout', function(){
1382 partner_id = id[name.indexOf($("#add_meeting").val())];
1383 $("#add_meeting").val("");
1384 if (partner_id){
1385 new instance.web.Model("calendar.contacts").call('search', [[['partner_id', '=', partner_id]]]).then(function(calendar_data){
1386 if (calendar_data.length == 0){
1387 new instance.web.Model("calendar.contacts").call("create", [{'partner_id': partner_id}]).then(function (result){
1388 });
1389 }
1390 });
1391 }
1392 });
1373 },1393 },
1374 destroy_filter: function(e) {1394 destroy_filter: function(e) {
1375 var self= this;1395 var self= this;
13761396
=== modified file 'addons/web_calendar/static/src/xml/web_fullcalendar.xml'
--- addons/web_calendar/static/src/xml/web_fullcalendar.xml 2014-03-13 11:36:34 +0000
+++ addons/web_calendar/static/src/xml/web_fullcalendar.xml 2014-03-13 11:40:52 +0000
@@ -58,9 +58,9 @@
58 </div>58 </div>
59 59
60 <div t-name="CalendarView.sidebar.button_add_contact" class="oe_calendar_buttons_add_contact">60 <div t-name="CalendarView.sidebar.button_add_contact" class="oe_calendar_buttons_add_contact">
61 <button class='oe_button oe_form_button oe_link add_contacts_link_btn' style='margin-top:10px'>61 <div class="form-group">
62 <span class='add_contacts_link'>See Employee's Meeting</span>62 <input id="add_meeting" type="text" name="add_partner" class="form-control" t-att-value="add_partner" placeholder="Add Employee's Meeting"/>
63 </button>63 </div>
64 </div>64 </div>
6565
6666

Subscribers

People subscribed via source and target branches

to all changes: