Odoo 中文社区

    • 注册
    • 登录
    • 搜索
    • 版块
    • 标签
    • 热门
    • 用户
    • 群组

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

    由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

    本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

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

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

    请教openerp web controllers的参数问题

    Odoo 新手求助
    2
    3
    3626
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • B
      baialaps 最后由 编辑

      openerp 的web中,有代码如下:

      <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 />
      


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

      1 条回复 最后回复 回复 引用 0
      • K
        klm2242 最后由 编辑

        不知是否為您所要~~以下網址可以參考~

        GET & POST區別
        http://www.wibibi.com/info.php?tid=235

        1 条回复 最后回复 回复 引用 0
        • First post
          Last post