跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Flatly)
  • 不使用皮肤
折叠

Odoo 中文社区

Y

youring

@youring
关于
帖子
66
主题
18
群组
0
粉丝
0
关注
0

帖子

最新 最佳 有争议的

  • 一个Odoo14服务频繁崩溃的案例
    Y youring

    FOR THE RECORD
    --limit-time-real=0
    https://github.com/odoo/odoo/issues/28808


  • 关于继承视图中<data>的使用
    Y youring

    [size=18pt]结论: 7.0/8.0版本在继承视图中没必要加入<data>标签来嵌套多处字段修改了[/size]

    源引:<br / [检测到链接无效,已移除] br />
    Multiple Changes
    To make changes in more than one location, wrap the fields in a data element.
    一个视图下涉及多处继承修改,要将被修改的字段嵌套在<data>标签里

    &lt;record model=&quot;ir.ui.view&quot; id=&quot;view_partner_form5&quot;&gt;<br />&nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;res.partner.form.inherit5&lt;/field&gt;<br />&nbsp; &nbsp; &lt;field name=&quot;model&quot;&gt;res.partner&lt;/field&gt;<br />&nbsp; &nbsp; &lt;field name=&quot;inherit_id&quot; ref=&quot;base.view_partner_form&quot;/&gt;<br />&nbsp; &nbsp; &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;data&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;lang&quot; position=&quot;replace&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;website&quot; position=&quot;after&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;lang&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/data&gt;<br />&nbsp; &nbsp; &lt;/field&gt;<br />&lt;/record&gt;
    


    但我在7.0/8.0中视图中发现不用data也可以,遂产生疑问

    经上海-开阖Jeff指点:
    这是6.1之前版本存在的问题:一次继承只能写一个 <field position> 标签,后面的全忽略。
    7.0和8.0都没这个问题了。
    之前的版本如果用xpath也不存在此问题。

    注:<br / https://www.odoo.com/documentation/8.0/reference/views.html#inheritance br />新的8.0文档中已经没有以上表述。
    7.0的文档是之前版本复制过来的,部分只适用于老版本,故令人费解。


  • OE8尝鲜之中文字体
    Y youring

    原因在于ttc格式识别不了
    将文泉驿字体后缀改成ttf即可,如
    sudo mv wqy-microhei.ttc wqy-microhei.ttf
    常规设置页面 reload fonts即可


    [quote author=matrowang link=topic=16201.msg27658#msg27658 date=1395104398]
    楼主哪里修改啊?我在OpenerpV8 ubuntu 12.04下面,文泉驿中文出不来,
    nano ./opt/OpenERP-wms/openerp/addons/base/res/res_font.py
    里面有句
      found_fonts.append((font.familyName, font.name, font_path, font.styleName))
    我改成:
      found_fonts.append((font.familyName, font.name, font_path, font.styleName.lower()))
    无效呢。
    [/quote]


  • Odoo8.0打印保存为PDF0字节
    Y youring

    可以试试这个patch<br / https://github.com/odoo/odoo/pull/1273/files br />

    附件为patch过的,直接替换:
    addons\report\models\report.py
    注意更名!

    经Windows下GreenOdoo测试 打印pdf正常


  • [分享]树形列表导出模块(Form View可用,支持8.0RC版本)
    Y youring

    赞!
    此模块可以取代卓忆的分享了,更方便适用
    [quote]分享个小的使用心得,把OpenERP中的报价单做到excel里面<br / [检测到链接无效,已移除] [/quote]

    查了下res_partner下的'child_ids'也是一个one2many, 类似order_line, 不过在partner form下好像没法导出contacts。
    试着将kanban view改成tree后试了下,还是不行...
    如果能导出当前 partner 的 contacts 就完美了...


  • GreenOdoo with Aeroo report enabled on Windows
    Y youring

    测试环境:Win7, GreenOdoo 7.0
    Q1:为啥要用Windows?
    A1:!@#¥%……&*
    Q2:8.0都快出了,为啥还要用7.0?
    A2:稳定!当然8.0版的Aeroo也有,请自行参照折腾。

    正文:
    [b]下载GreenOdoo[/b]<br / http://nchc.dl.sourceforge.net/project/greenopenerp/GreenOdoo-7.0-win32.zip or<br / [检测到链接无效,已移除] br />解压到 c:\go7

    [b]安装Apache OpenOffice[/b],目前版本4.1.0 @2014.7.7<br / http://www.openoffice.org/download/index.html br />鉴于Aeroo Report和OpenOffice相关中文资料匮乏,建议下载英文版,方便看鸟语教程时对照!

    用nssm[b]将OpenOffice安装为服务[/b](这里服务名定为 AOOUno )
    nssm在buke的绿色包里已经有了。
    命令行:

    C:\go7\runtime\bin&gt;nssm install AOOUno
    


    弹出窗口,选择OpenOffice安装路径
    path:  C:\Program Files (x86)\OpenOffice 4\program\soffice.exe
    Argument:  -nologo -nofirststartwizard -headless -norestore -accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;

    关于以上参数的解释:<br / http://wiki.openoffice.org/wiki/Framework/Article/Command_Line_Arguments br / http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Opening_a_Connection br / http://wiki.openoffice.org/wiki/Uno/Remote/Specifications/Uno_Remote_Protocol br />
    启动服务:

    C:\go7\runtime\bin&gt;nssm start aoouno<br />AOOUno: START: 操作成功完成。
    



    验证8100端口是否被监听:

    C:\go7\runtime\bin&gt;netstat -ano | findstr :8100<br />&nbsp; TCP&nbsp; &nbsp; 127.0.0.1:8100&nbsp; &nbsp; &nbsp; &nbsp;  0.0.0.0:0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LISTENING&nbsp; &nbsp; &nbsp;  8260
    


    进入任务管理器查看进程,PID 8260对应的正是OpenOffice

    [b]改装GreenOdoo[/b]
    命令行进入AOO安装目录,运行python,输出两个变量 URE_BOOTSTRAP 和 UNO_PATH ,以备后用。

    C:\Program Files (x86)\OpenOffice 4\program&gt;python<br />Python 2.7.6 (default, Apr 15 2014, 10:34:35) [MSC v.1500 32 bit (Intel)] on win32<br />Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br />&gt;&gt;&gt; import os<br />&gt;&gt;&gt; print(os.environ&#91;&#039;URE_BOOTSTRAP&#039;])<br />vnd.sun.star.pathname:C:\Program Files (x86)\OpenOffice 4\program\fundamental.ini<br />&gt;&gt;&gt; print(os.environ&#91;&#039;UNO_PATH&#039;])<br />C:\Program Files (x86)\OpenOffice 4\program\<br />&gt;&gt;&gt;
    



    创建C:\go7\runtime\python\Lib\site-packages\uno.pth 文本文档,内容:

    c:\\Program Files (x86)\\OpenOffice 4\\program
    



    进入go7文件夹,复制start.bat

    C:\go7&gt;copy start.bat start-aeroo.bat<br />已复制&nbsp; &nbsp; &nbsp; &nbsp;  1 个文件。
    


    修改start-aeroo.bat,即在PATH添加AOO启动路径,并将以上获得的两个参数添加进来:

    SET URE_BOOTSTRAP=vnd.sun.star.pathname:C:\Program Files (x86)\OpenOffice 4\program\fundamental.ini<br />SET UNO_PATH=C:\Program Files (x86)\OpenOffice 4\program\<br />SET PATH=%CD%\runtime\pgsql\bin;%CD%\runtime\python;%CD%\runtime\win32\wkhtmltopdf;C:\Program Files (x86)\OpenOffice 4\program;%PATH%.
    



    GreenOdoo运行Aeroo还需要额外的2个模块<br / http://ftp.edgewall.com/pub/genshi/Genshi-0.6.1.zip br />注:必须使用0.6.1版,最新的0.7版会报错!
    解压后进入Genshi-0.6.1\,将里面的genshi文件夹复制到c:\go7\runtime\python\Lib\site-packages<br /><br / https://launchpad.net/aeroolib/trunk/1.0.0/+download/aeroolib.tar.gz br />解压后进入aeroolib\,将里面的aeroolib文件夹复制到c:\go7\runtime\python\Lib\site-packages<br />
    至此Aeroo Report在Windows下运行环境已搭建完毕!
    运行start-aeroo.bat
    现在就去aeroo官网下模块折腾word、excel报表去吧<br / http://www.alistek.com/en/component/content/article/110-aeroo-reports-for-openerp-v70x.html br />
    小结:
    OpenOffice没有绿化是一大遗憾,暂且将就用吧。
    期待后续能整合OpenOffice Portable版。


    参考链接
    1.  http://blog.csdn.net/rongatyantai/article/details/23994965 br />2.  [检测到链接无效,已移除] br />3.  [检测到链接无效,已移除] br />


  • 分享:新建产品,转订单报错
    Y youring

    如果装了delivery模块, kg 这个重量基准单位貌似是必须的,要按重量计算价格。
    如果删除,新建一个重量基准单位,应该不会报错


  • 能否给快速创建产品设置权限?
    Y youring

    曲线解决办法:
    <br / https://www.openerp.com/apps/7.0/base_optional_quick_create/ br />
    This module allows to avoid to 'quick create' new records, through many2one fields, for a specific model. You can configure which models should allow 'quick create'. When specified, the 'quick create' option will always open the standard create form.

    安装后,设置--技术--数据库结构--模型:
    product.product
    product.template
    都勾选一下  Avoid quick create



  • 步科绿色版数据库密码是什么
    Y youring

    GreenOpenERP-7.0-latest\pgsql\data\pg_hba.conf
    host    all            all            127.0.0.1/32            trust
    本地用户使用 local "trust" authentication,登陆密码为空
    如果要远程密码登陆,先本地登陆更改postgres/openerp用户密码
    再将trust改为md5,重启postgreSQL。
    改密码可以图形界面登陆 GreenOpenERP-7.0-latest\pgsql\bin\pgAdmin3.exe
    [attachimg=1]


  • 通过CSS修改视图column的默认最小宽度以适应本地化视觉习惯
    Y youring

    [attachimg=1]
    使用中文界面是不是觉得标签(label)和字段离得太远?
    忍受不了有强迫症的可以简单修改下:
    C:\GreenOE\GreenOpenERP-7.0-latest\openerp\addons\web\static\src\css\base.css

    .openerp .oe_form td.oe_form_group_cell_label label {<br />&nbsp; line-height: 18px;<br />&nbsp; display: block;<br />&nbsp; min-width: 140px; /* 建议此处改为80px,强烈缓解中文用户视神经压力;) */<br />}
    

  • Web界面备份数据库文件名时差问题--侧面了解OpenERP时间机制
    Y youring

    datetime.datetime.now() 和
    datetime.datetime.utcnow() 一个效果

    +8还是必须的吧?


  • Web界面备份数据库文件名时差问题--侧面了解OpenERP时间机制
    Y youring

    导读:
    [检测到链接无效,已移除]
    http://stackoverflow.com/questions/9919706/openerp-strange-date-time-issue
    [quote]There is one golden rule for datetime fields in 6.1 addons code: "ALWAYS work in UTC - compute in UTC - save in UTC" The UTC values will be properly converted to local time when the result is diplayed in a client-side form.[/quote]
    从v6.1开始,OpenERP服务器的时间(新手注:这里指的不是操作系统Windows或Linux服务器设定的时间)从设计上统一规定为UTC,即GMT。
    在web界面,用户只要设置了自己的时区,web端显示的时间会自动转换为本地时间,中国即 UTC + 8小时。

    而在备份数据库时,自动生成的文件名中的时间,显示的仍然是UTC。因为这个时间戳没有通过web客户端转换,而是直接取OpenERP服务器设定的UTC。代码追溯:openerp\addons\web\controllers\main.py

    &nbsp; &nbsp; def backup(self, req, backup_db, backup_pwd, token):<br />&nbsp; &nbsp; &nbsp; &nbsp; try:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_dump = base64.b64decode(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.session.proxy(&quot;db&quot;).dump(backup_pwd, backup_db))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filename = &quot;%(db)s_%(timestamp)s.dump&quot; % {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;db&#039;: backup_db,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;timestamp&#039;: datetime.datetime.utcnow().strftime(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;%Y-%m-%d_%H-%M-%SZ&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
    



    经群里Jeff大神指点,像这种备份操作结果不在web端显示,而是直接取server端的时间生成文件名,就没办法按用户时区生成文件名了!
    不过作为中国用户,可以直接写死+8是不是?

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;timestamp&#039;: (datetime.datetime.utcnow() + datetime.timedelta(hours = 8)).strftime(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;%Y-%m-%d_%H-%M-%SZ&quot;)
    


    重启Openerp Server生效。
    //完




  • 分享一本新书
    Y youring

    http://www.packtpub.com/working-with-openerp/book
    <br / [检测到链接无效,已移除] br />解压密码:Greg Moss



  • Pycharm 联合调试OpenERP服务端和客户端
    Y youring

    辛苦了!

    鼓掌三分钟!


  • OpenERP 报价单转订单时出错
    Y youring

    今天遇到同样的问题...留个脚印
    如果之前没安装过delivery模块,删除重量基本单位后,再安装delivery模块会报同样的错误。

    报错的原因在这里 openerp\addons\delivery\stock.py

    class stock_move(osv.osv):<br />...<br />&nbsp; &nbsp; def _get_default_uom(self,cr,uid,c):<br />&nbsp; &nbsp; &nbsp; &nbsp; uom_categ, uom_categ_id = self.pool.get(&#039;ir.model.data&#039;).get_object_reference(cr, uid, &#039;product&#039;, &#039;product_uom_categ_kgm&#039;)<br />&nbsp; &nbsp; &nbsp; &nbsp; return self.pool.get(&#039;product.uom&#039;).search(cr, uid, [(&#039;category_id&#039;, &#039;=&#039;, uom_categ_id),(&#039;factor&#039;,&#039;=&#039;,1)])[0]<br />&nbsp; &nbsp; 
    



    不知道这算不算安装上的一个bug
    最好是不管系统原来有没有,安装delivery时,强制写入一条record,再次声明重量的默认单位


    另外,自认为简单的解决办法(可能会覆盖一些你做过的修改):
    将 addons\product\product_data.xml 中的
    <data noupdate="1"> 改为
    <data noupdate="0">
    升级product模块,再安装delivery。


  • 解决销售人员在销售订单中无法填写期望发货日期的问题
    Y youring

    问题不对还是答案不对?

    楼主是不是想以弹出窗口的方式来编辑订单行?
    给相应的组加上以下这个视图即可


  • 询价单能否自动取上一张PO的单价(已解决)
    Y youring

    https://www.openerp.com/apps/7.0/last_purchase_price_product/


  • Web_m2o_enhance模块(屏蔽“创建并编辑”功能)支持Many2many
    Y youring

    https://github.com/0k/web_m2o_enhanced
    **New: support many2manytags widget ! **
    在issue里提了个feature request,一天时间,作者就加上了...赞效率


  • 销售员无法创建客户的问题(建立规则“只能看自己的客户”之后)
    Y youring

    把其他user对应的partner的user_id字段即销售员删除试试
    <br / [检测到链接无效,已移除] br />user_id 默认值取 none,
    但之前建立的用户对应的partner的user_id需要手工去除


  • 哈……不知道有人动了什么,界面现在变成这个样子了
    Y youring

    之前同样碰到过,自定义视图 record id重复可能会导致情况

  • 登录

  • 没有帐号? 注册

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组