[IMP]: directly to openerp open form view, accept and decline open calender view
bzr revid: aja@tinyerp.com-20130703065354-v5kt8symd44n648a
This commit is contained in:
@@ -177,9 +177,9 @@
|
||||
<td colspan="3"><div style = " font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 10px" > You, %(organizer)s <span style= "color:#A9A9A9; ont-size: 9px">- Organizer </br></span>%(attendees)s</div> </td> </tr>
|
||||
</table></td></tr>
|
||||
<tr >
|
||||
<td><div style = " font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 10px" ><span style= "margin-top: 50px; margin-left: 200px;" ><a href="%(url)s&status=accepted">Accept</a> | <a href="%(url)s&status=declined">Decline</a></span></div> </td>
|
||||
<td><div style = " font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 10px" ><span style= "margin-top: 50px; margin-left: 200px;" ><a href="%(url)s&view_type=calendar&status=accepted">Accept</a> | <a href="%(url)s&view_type=calendar&status=declined">Decline</a></span></div> </td>
|
||||
<tr>
|
||||
<td><div > -- </br> Sent by %(responsible)s from %(company)s.View this meeting detail <a href="%(url)s">directly in OpenERP</a></div> </td>
|
||||
<td><div > -- </br> Sent by %(responsible)s from %(company)s.View this meeting detail <a href="%(url)s&view_type=form&status=">directly in OpenERP</a></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import openerp.addons.web.controllers.main as webmain
|
||||
class crm_meetting_importstatus(http.Controller):
|
||||
|
||||
@http.route('/meeting/meeting_invitation', type='http', auth="none")
|
||||
def meeting_invitation(self, db, token, action, status):
|
||||
def meeting_invitation(self, db, token, action, view_type, status):
|
||||
js = "\n ".join('<script type="text/javascript" src="%s"></script>' % i for i in webmain.manifest_list('js', db=db))
|
||||
css = "\n ".join('<link rel="stylesheet" href="%s">' % i for i in webmain.manifest_list('css',db=db))
|
||||
|
||||
@@ -15,7 +15,7 @@ class crm_meetting_importstatus(http.Controller):
|
||||
'js': js,
|
||||
'css': css,
|
||||
'modules': simplejson.dumps(webmain.module_boot(db)),
|
||||
'init': 's.base_calendar.do_accept("%s","%s", "%s", "%s");'% (db,token,action,status),
|
||||
'init': 's.base_calendar.do_accept("%s", "%s", "%s", "%s", "%s");'% (db, token, action, view_type, status),
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,12 +4,13 @@ instance.base_calendar = {}
|
||||
|
||||
instance.base_calendar.DoAccept = instance.web.Widget.extend({
|
||||
|
||||
init: function(parent,db,token,action,status) {
|
||||
init: function(parent,db,token,action,view_type,status) {
|
||||
this._super();
|
||||
this.db = db;
|
||||
this.token = token;
|
||||
this.status = status;
|
||||
this.action = action;
|
||||
this.view_type = view_type;
|
||||
this.ds_attendee = new instance.web.DataSetSearch(this, 'calendar.attendee');
|
||||
},
|
||||
start: function() {
|
||||
@@ -48,7 +49,7 @@ instance.base_calendar = {}
|
||||
var self = this;
|
||||
if(self.status === 'accepted'){att_status = "do_accept";}
|
||||
return this.ds_attendee.call(att_status,[[parseInt(this.token)]]).done(function(res){
|
||||
location.replace(_.str.sprintf('/?db=%s&debug=#view_type=calendar&model=crm.meeting&action=%s',self.db,self.action));
|
||||
location.replace(_.str.sprintf('/?db=%s&debug=#view_type=%s&model=crm.meeting&action=%s&active_id=%s',self.db,self.view_type,self.action,self.token));
|
||||
});
|
||||
},
|
||||
});
|
||||
@@ -60,9 +61,9 @@ instance.base_calendar = {}
|
||||
});
|
||||
}
|
||||
});
|
||||
instance.base_calendar.do_accept = function (db, token, action, status) {
|
||||
instance.base_calendar.do_accept = function (db, token, action, view_type, status) {
|
||||
instance.session.session_bind(instance.session.origin).done(function () {
|
||||
new instance.base_calendar.DoAccept(null,db,token,action,status).appendTo($("body").addClass('openerp'));
|
||||
new instance.base_calendar.DoAccept(null,db,token,action,view_type,status).appendTo($("body").addClass('openerp'));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user