Odoo中文社区可以通过以下三个域名访问:shine-it.net , odoocn.org,odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

请教openerp web controllers的参数问题



  • openerp 的web中,有代码如下:<br />

    <br />class Home(openerpweb.Controller):<br />&nbsp; &nbsp; _cp_path = &#039;/&#039;<br /><br />&nbsp; &nbsp; @openerpweb.httprequest<br />&nbsp; &nbsp; def index(self, req, s_action=None, db=None, **kw):<br />&nbsp; &nbsp; &nbsp; &nbsp; db, redir = db_monodb_redirect(req)<br />&nbsp; &nbsp; &nbsp; &nbsp; if redir:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return redirect_with_hash(req, redir)<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; js = &quot;\n&nbsp; &nbsp; &nbsp; &nbsp; &quot;.join(&#039;&lt;script type=&quot;text/javascript&quot; src=&quot;%s&quot;&gt;&lt;/script&gt;&#039; % i for i in manifest_list(req, &#039;js&#039;, db=db))<br />&nbsp; &nbsp; &nbsp; &nbsp; css = &quot;\n&nbsp; &nbsp; &nbsp; &nbsp; &quot;.join(&#039;&lt;link rel=&quot;stylesheet&quot; href=&quot;%s&quot;&gt;&#039; % i for i in manifest_list(req, &#039;css&#039;, db=db))<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; r = html_template % {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;js&#039;: js,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;css&#039;: css,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;modules&#039;: simplejson.dumps(module_boot(req, db=db)),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;init&#039;: &#039;var wc = new s.web.WebClient();wc.appendTo($(document.body));&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; return r<br /><br />&nbsp; &nbsp; @openerpweb.httprequest<br />&nbsp; &nbsp; def login(self, req, db, login, key):<br />&nbsp; &nbsp; &nbsp; &nbsp; return login_and_redirect(req, db, login, key)<br /><br />
    

    <br />请问要如何得到req中的数据?<br />get和post中有什么区别?要如何获取?<br />我使用mac没有能成功安装调试工具,麻烦有安装的童鞋帮一下忙,谢谢



  • 不知是否為您所要~~以下網址可以參考~<br /><br />GET & POST區別<br />http://www.wibibi.com/info.php?tid=235