Odoo 中文社区

    • 注册
    • 登录
    • 搜索
    • 版块
    • 标签
    • 热门
    • 用户
    • 群组
    1. 主页
    2. d_yang

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

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

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

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

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

    D
    • 资料
    • 关注 0
    • 粉丝 0
    • 主题 14
    • 帖子 64
    • 最佳 0
    • 有争议的 0
    • 群组 0

    d_yang

    @d_yang

    0
    声望
    853
    资料浏览
    64
    帖子
    0
    粉丝
    0
    关注
    注册时间 最后登录

    d_yang 取消关注 关注

    d_yang 发布的最新帖子

    • RE: Oe7.0在windows 上安装,经常会停掉服务!是什么问题?

      我也有一个windows平台下的(apache+mod_python),供大家参考吧。

      # -*- coding: utf-8 -*-<br /><br />import os, sys, time<br />from datetime import datetime<br />import requests, logging<br /><br />logging.captureWarnings(True)<br /><br />def _go():<br />&nbsp; &nbsp; os.system(&quot;sc stop Apache2.4&quot;)<br />&nbsp; &nbsp; os.system(&quot;sc start Apache2.4&quot;)<br />&nbsp; &nbsp; time.sleep(5)<br />&nbsp; &nbsp; print &#039;start Apache2 at %s&#039; % datetime.now()<br /><br />print &#039;Apache2 monitor started...&#039;<br /><br />while True:<br />&nbsp; &nbsp; time.sleep(30)<br />&nbsp; &nbsp; try:<br />&nbsp; &nbsp; &nbsp; &nbsp; print &#039;pinging web server at %s.&#039; % datetime.now()<br />&nbsp; &nbsp; &nbsp; &nbsp; r = requests.get(&#039;https://xxxxxxxxxxx&#039;, verify=False, timeout=5) #place a real url here.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; if r.status_code != requests.codes.ok:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &#039;server is dead at %s. restart it.&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _go()<br />&nbsp; &nbsp; &nbsp; &nbsp; else:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &#039;Nothing new. Go on.&#039;<br />&nbsp; &nbsp; except Exception, e:<br />&nbsp; &nbsp; &nbsp; &nbsp; print &#039;Exception at %s, message is %s&#039; % ( datetime.now(), e.message)<br />&nbsp; &nbsp; &nbsp; &nbsp; print &#039;try to start Apache2.&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; _go()<br /><br />print &#039;Apache2 monitor ended...&#039;
      
      发布在 Odoo 开发与实施交流
      D
      d_yang
    • RE: 源代码安装的OE7.0为什么打印不了pdf报表?

      把werkzeug降低版本,到0.9.6试试

      发布在 Odoo 开发与实施交流
      D
      d_yang
    • RE: 【分享】excel表格上传处理与生成下载

      上传的excel文件在内存里就能打开操作。

      <br /><br />for wiz in self.browse(cr,uid,ids):<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if not wiz.excel: continue<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excel = xlrd.open_workbook(file_contents=base64.decodestring(wiz.excel))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sh = excel.sheet_by_index(0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for rx in range(sh.nrows):<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &#039;processing line &#039;, rx<br />...<br /><br />
      



      如果想生成excel文件并下载(参考下载翻译那个wizard一样,两个state: choose, get, 然后利用binary field,提供给用户下载的连接出来):

      <br /><br />#.....从数据库取数据,计算,blahblah<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; book = xlwt.Workbook(encoding=&#039;utf-8&#039;)<br />&nbsp; &nbsp; &nbsp; &nbsp; sheet = book.add_sheet(u&#039;统计&#039;)<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; buf=cStringIO.StringIO()<br />&nbsp; &nbsp; &nbsp; &nbsp; book.save(buf)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; out=base64.encodestring(buf.getvalue())<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; self.write(cr, uid, ids, {&#039;state&#039;:&#039;get&#039;, &#039;data&#039;:out, &#039;name&#039;:this.name }, context=context)<br /><br /><br />
      
      发布在 Odoo 开发与实施交流
      D
      d_yang
    • RE: [分享]view xml 中的 button 调用web客户端事件

      我是在wizard执行的最后一步来执行client action的。
      client action return false, wizard不会关闭的。

      可以

      <br /> return {&#039;type&#039;: &#039;ir.actions.act_window_close&#039;};<br />
      


      problem solved.

      发布在 Odoo 开发与实施交流
      D
      d_yang
    • RE: OE界面增删改SQLSERVER数据库数据

      可以的。

      发布在 Odoo 开发与实施交流
      D
      d_yang
    • RE: [bug] Editable List脚本异常

      [quote author=ccdos link=topic=14559.msg25138#msg25138 date=1383902560]
      不明觉历
      [/quote]

      😮

      发布在 Odoo 开发与实施交流
      D
      d_yang
    • [bug] Editable List脚本异常

      浏览器: 版本 30.0.1599.101 m / IE 11.0.9600
      OE版本:runbot里7.0最新版 (http://runbot.openerp.com/),但应该存在于所有7.0以后的版本。

      用户 admin
      密码 admin
      [hr]

      重现条件:
      (任何一个含有inline editing单据都会包含)
      模块 Accounting
      编辑 Customer Invoices 下任何一个draft状态的单据。

      1. 添加一个Invoice Line.
      2. 在必填项中填入任意有效内容。
      3. 将鼠标移动至最后一个可输入的输入框。
      4. 按 Tab。

      异常出现。

      <br />Uncaught TypeError: Cannot read property &#039;id&#039; of null<br / [检测到链接无效,已移除] br />
      



      [s]初步分析和Chrome的版本有关。(调试了一下,和cancel_edition方法有关,可能是浏览器事件机制的问题)
      尚未想到解决办法。[/s]

      修复:

      <br />=== modified file &#039;addons/web/static/src/js/view_form.js&#039;<br />--- addons/web/static/src/js/view_form.js	2013-10-10 09:11:25 +0000<br />+++ addons/web/static/src/js/view_form.js	2013-10-30 03:37:56 +0000<br />@@ -3826,7 +3826,6 @@<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  GroupsType: instance.web.form.One2ManyGroups,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ListType: instance.web.form.One2ManyList<br />&nbsp; &nbsp; &nbsp; &nbsp;  }));<br />-&nbsp; &nbsp; &nbsp; &nbsp; this.on(&#039;edit:before&#039;, this, this.proxy(&#039;_before_edit&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp;  this.on(&#039;edit:after&#039;, this, this.proxy(&#039;_after_edit&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp;  this.on(&#039;save:before cancel:before&#039;, this, this.proxy(&#039;_before_unedit&#039;));<br /> <br />@@ -3947,11 +3946,11 @@<br />&nbsp; &nbsp; &nbsp; &nbsp;  });<br />&nbsp; &nbsp;  },<br /> <br />-&nbsp; &nbsp; _before_edit: function () {<br />+&nbsp; &nbsp; _after_edit: function () {<br />+&nbsp; &nbsp; &nbsp; &nbsp; // fixbug [检测到链接无效,已移除] move the blurred listener in edit:after<br />&nbsp; &nbsp; &nbsp; &nbsp;  this.__ignore_blur = false;<br />&nbsp; &nbsp; &nbsp; &nbsp;  this.editor.form.on(&#039;blurred&#039;, this, this._on_form_blur);<br />-&nbsp; &nbsp; },<br />-&nbsp; &nbsp; _after_edit: function () {<br />+&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp;  // The form&#039;s blur thing may be jiggered during the edition setup,<br />&nbsp; &nbsp; &nbsp; &nbsp;  // potentially leading to the o2m instasaving the row. Cancel any<br />&nbsp; &nbsp; &nbsp; &nbsp;  // blurring triggered the edition startup here<br /><br />
      



      via https://launchpadlibrarian.net/155367789/openerp-web_bug1182101_one2many_list_cancel_issue.patch

      发布在 Odoo 开发与实施交流
      D
      d_yang
    • RE: 根据下拉框选项,显示不同的form 在同一个页面上

      多不同的form?

      发布在 Odoo 新手求助
      D
      d_yang
    • RE: 如何在 search view 指定默认 filter

      magic code.

      发布在 Odoo 开发与实施交流
      D
      d_yang
    • RE: (解决)导入!导入!导入!导入产品数据的过程已经要把我逼疯了!!

      我是看出不做技术的人玩不转OE。

      发布在 Odoo 新手求助
      D
      d_yang