跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • 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 中文社区

Z

zhong_163

@zhong_163
关于
帖子
59
主题
27
群组
0
粉丝
0
关注
0

帖子

最新 最佳 有争议的

  • 原创:Odoo中不安装jit即时生产时的控制自动生成生产单及采购询价单的流程
    Z zhong_163

    值得收藏一下


  • 定制假期审批流程后导致 修改法定剩余假期,需要审核
    Z zhong_163

    情景:admin 修改员工 法定剩余假期  正常,
      hr(人力资源/经理) 修改  法定剩余假期  数字不生效,而是生成了一条 待审核的续假申请
      查看代码 有一段
    for sig in ('confirm', 'validate', 'second_validate'):
                holiday_obj.signal_workflow(cr, uid, [leave_id], sig)

      执行了工作流  ,
    貌似 木有权限 木有 成功

    原因:定制开发了 请假审批 工作流,每一级单独授权。。。


    给 hR 相应的审批权限,,

    修改  法定剩余假期  正常工作


  • Odoo 人力资源 雇员只能看自己关联的员工
    Z zhong_163

    本贴给 初学者 带来了两个坑
    1、 如此设置后,非admin 的 hr manager 账户,也只能看到自己, 解决方法 ,设置  一 个全局的 [(1,'=',1)] 对 group_hr_manager 账户

    2、 费用报销中,如果职员 设置了 部门经理,则 无法提交给经理
    技术上有个流程,就是 提交时 发消息给他的经理,让他审批;员工只看只看自己职员,那么无法访问他的经理,消息无法发成功

    这个需要在实施中做取舍

    顺便  贴一下达到上述目的 代码, 
    下面代码 可以 实现部门经理,培训讲师  看 下属员工,和自己看自己对应的员工

    <br />&nbsp; &nbsp; &lt;record id=&quot;property_rule_employee_manager&quot; model=&quot;ir.rule&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;Manager Employee&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;model_id&quot; ref=&quot;hr.model_hr_employee&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;domain_force&quot;&gt;[(1,&#039;=&#039;,1)]&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;groups&quot; eval=&quot;[(4,ref(&#039;base.group_hr_manager&#039;)), (4,ref(&#039;base.group_hr_user&#039;))]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;record id=&quot;property_rule_employee_employee&quot; model=&quot;ir.rule&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;Employee Owner&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;model_id&quot; ref=&quot;hr.model_hr_employee&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;domain_force&quot;&gt;&#91;&#039;|&#039;,&#039;|&#039;,(&#039;user_id&#039;,&#039;=&#039;,user.id),(&#039;parent_id.user_id&#039;,&#039;=&#039;,user.id),(&#039;coach_id.user_id&#039;,&#039;=&#039;,user.id)]&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;groups&quot; eval=&quot;[(4,ref(&#039;base.group_user&#039;))]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br /><br /><br />
    

  • Odoo 人力资源 雇员只能看自己关联的员工
    Z zhong_163

    人力资源中,普通员工 只看自己关联的员工

    设置->技术->安全设定->记录规则 [attachimg=1]


    复杂的 规则  参照 http://cn.openerp.cn/record_rule/


  • 利用费用报销模块处理员工 借款和报销数据
    Z zhong_163

    多谢 提醒,楼上思路可行,实际操作下来,也可以,真实使用时,res_partner  tree 视图 加上  “应付款合计” ,“应付款合计”, 可以一目了然 借款情况


  • 利用费用报销模块处理员工 借款和报销数据
    Z zhong_163

    bbs 原帖<br / [检测到链接无效,已移除] br />
    一般需求, 员工出差,找公司借款,回来报销,冲抵借款。。
    按原帖 各回复人提示
    总监提示"
    你可以用辅助核算来处理.

    建个 XX员工借款

    在你的发票生成的凭证行上,  引用这个辅助核算项.
    然后 对应报销时生成的凭证上, 也引用这个辅助核算项.
    这两个借贷方向不一致就OK了

    然后 辅助核算项余额就是员工借款
    "


    实际操作如下:

    借款流程:【人力资源】->【费用】->【费用】

    借款时,金额输入 负数  ,添加辅助核算项
    [attachimg=1]

    报销时  金额正常

    [attachimg=2]



    查看 核算 即 借款余额


    [attachimg=3]



    看上去 一切正常


    生成的 会计凭证


    [attachimg=4]


    中间 多了一个 税。。。。。  不知道怎么解释,还是我 操作错误,或者有更好的解决方法?


  • 分享:视频Odoo项目管理及项目管理开票的使用,包含开启客户门户,辅助核算
    Z zhong_163

    系统集成商 ,很关心,我签的合同,采购了哪些材料,报销了多少费用,费了多少人工, 在一个界面反映出来。。。

    解决方案,项目/合同  做辅助核算, 收支分析

    插曲:项目中,总有 送货的 材料和 SO 里输入的材料不一致的地方。。
    原因有很多种:主要原因,和客户谈单的时候,定的某型号,走完流程,款到,开始采购的时候。。这个型号 木有了,,,按这个型号交不了货。。。
    所有 实际交货和 SO 有不一致的地方,这不一致的 货就 无法采购 ,自然无法出库,,,
    所以根据 实际出库来统计 成本,是不准确的。。。。


    遗憾点:只能查看付款后的 单子
    要是改进下,能查看付款前的 就完美了


  • 数据导入乱码解决方案
    Z zhong_163

    😞 用的wps 


  • 数据导入乱码解决方案
    Z zhong_163

    系统期初数据初始化时,难免有大量基础数据需要导入,例如 供应商 客户 ,产品,特别以前有其他 系统,转换使用Openerp 中。。 对导入需求特别明显。

    解决方法 1。从openerp  导出 必要的数据 格式,
    [attachimg=1][attachimg=2]

    2、选择 必要的数据
    [attachimg=3]


    3、从其他系统 导出 数据 ,依次复制到 已经 1  ,2, 步整理好的 csv 文件中


    4、常规设置,导入/导出  “允许导入CSV 数据”
    [attachimg=4] 

    5、 客户  菜单处 点【导入】

    [attachimg=5]


    6、问题来了,不能导入
    [attachimg=6]


    7、在windows 下处理的文件 一般都不是utf-8 换 GBK

    [attachimg=7]


    8、终于 修成 正果

    [attachimg=8]

    9、点击导入


    点评:

      1、导入后发现数据错误肿么办?删掉,整理数据 再来!
      2、肿么一次全删?[attachimg=9]  默认 80  点下 
          然后  全选  ,删除

    插曲:

        一开始,整理好文件 放在 模块里 安装,进行导入,哇塞,数据进去了,,全不认识,杯具了

    [attachimg=10]

      逛了下神奇的论坛,,发现走错路了。。。,手动似乎更方便!


  • OE中员工费用报销流程
    Z zhong_163

    如果加入了辅助 核算项,点击 生成会计凭证分录的时候就会出现  “您必须定义这 '采购账簿' 的辅助核算分录! ”[attachimg=1]



  • 【分享-oe嵌入qweb】用js读取数据库数据,用类似html语言重写web报表
    Z zhong_163

    结合 上面几篇文章  掉坑了,然后 找老刘 要了 样例  bzr branch lp:~niv-openerp/+junk/oepetstore -r 1

    然后从坑里 爬了出来

    安装 这个  教程 [检测到链接无效,已移除] br />
    看 楼主的 顺序 ,没理解前都会copy  看看 能不能运行。。  js  ,xml 写了,然后掉坑里了

    1、出菜单 ,贴代码

    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />&lt;openerp&gt;<br />&nbsp; &nbsp; &lt;data&gt;<br />&nbsp; &nbsp; &nbsp; &lt;!-- Top menu item --&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;menuitem name=&quot;Test&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id=&quot;menu_test_root&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sequence=&quot;30&quot;/&gt;<br />&nbsp; &nbsp;  &lt;record model=&quot;ir.actions.client&quot; id=&quot;action_client_example&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;Example Client Action&lt;/field&gt;<br />&nbsp;  &lt;!-- 此处 name&nbsp; 修改了 浏览器 title&nbsp; &nbsp; --&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;tag&quot;&gt;petstore.homepage&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp;  &lt;!-- 此处 tag 内容 要对应&nbsp; js&nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp;  instance.web.client_actions.add(&#039;petstore.homepage&#039;, &#039;instance.oepetstore.HomePage&#039;);<br /><br />这个 阿狸木有 解释,或者不解释 。<br /><br />济南-stone&nbsp; 提示 过 , “找action.tag是否写对”&nbsp; 结果不得要领<br />看了样例才知道<br />&nbsp; &nbsp; &nbsp; &nbsp;  --&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br /> &lt;!-- 此处 tag 内容 要对应&nbsp; js&nbsp; &nbsp;  这个 阿狸木有 解释,或者不解释 。<br />&nbsp; --&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;menuitem id=&quot;test_qweb_menu&quot; name=&quot;test qweb&quot; sequence=&quot;20&quot; parent=&quot;menu_test_root&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;menuitem action=&quot;action_client_example&quot; id=&quot;menu_client_example&quot; parent=&quot;test_qweb_menu&quot; name=&quot;test report qweb&quot;/&gt;<br />&nbsp; &nbsp; &lt;/data&gt;<br />&lt;/openerp&gt;
    






    2 、js 代码


    <br />openerp.oepetstore = function(instance) {<br />&nbsp; &nbsp; var _t = instance.web._t,<br />&nbsp; &nbsp; &nbsp; &nbsp; _lt = instance.web._lt;<br />&nbsp; &nbsp; var QWeb = instance.web.qweb;<br /><br />&nbsp; &nbsp; instance.oepetstore = {};<br /><br /> /*&nbsp;  instance.oepetstore.HomePage = instance.web.Widget.extend({<br />&nbsp; &nbsp; &nbsp; &nbsp; start: function() {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console.log(&quot;pet store home page loaded&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; });<br />&nbsp; &nbsp; */<br />&nbsp; &nbsp; instance.oepetstore.HomePage = instance.web.Widget.extend({<br />&nbsp; &nbsp; &nbsp; &nbsp; start: function() {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var self = this;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var model = new instance.web.Model(&quot;message_of_the_day&quot;);<br />//message_of_the_day&nbsp;  是py 定义了一个 类&nbsp; <br />//下面的 my_method&nbsp; 在py 类message_of_the_day&nbsp; &nbsp; 里有定义<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; model.call(&quot;my_method&quot;, &#91;], {context: new instance.web.CompoundContext()}).then(function(result) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.$el.append(&quot;&lt;div&gt;Hello &quot; + result[&quot;hello&quot;] + &quot;&lt;/div&gt;&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // will show &quot;Hello world&quot; to the user<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });<br />&nbsp; &nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; });<br />// instance.oepetstore.btn_start&nbsp; 是 copy 梦菇的 代码 ,木有 调用<br />&nbsp; &nbsp; instance.oepetstore.btn_start = function() {<br />&nbsp; &nbsp; &nbsp; &nbsp; var self = this;<br />&nbsp; &nbsp; &nbsp; &nbsp; alert(&#039;test&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; return false;<br />&nbsp; &nbsp; };<br />&nbsp; &nbsp; <br />&nbsp;  <br />&nbsp; &nbsp; function aaa(){<br />&nbsp; &nbsp; &nbsp; &nbsp; alert(123);<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; // 这里 定义了 ,然后&nbsp; xml 里 才能调用&nbsp; &nbsp; &nbsp;  &lt;field name=&quot;tag&quot;&gt;petstore.homepage&lt;/field&gt;<br />&nbsp; &nbsp; instance.web.client_actions.add(&#039;petstore.homepage&#039;, &#039;instance.oepetstore.HomePage&#039;);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; instance.web.client_actions.add(&#039;bt_start&#039;, &#039;instance.oepetstore.btn_start&#039;);<br /><br /><br />}<br />
    




    3、贴下 py 代码

    <br />from openerp.osv import osv, fields<br /># 通过 js&nbsp; <br /># var model = new instance.web.Model(&quot;message_of_the_day&quot;);<br /># 调用 该类 <br />class message_of_the_day(osv.osv):<br />&nbsp; &nbsp; _name = &quot;message_of_the_day&quot;<br /><br />#通过&nbsp; js <br />#&nbsp; model.call(&quot;my_method&quot;, &#91;], {context: new instance.web.CompoundContext()}).then(function(result) {<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.$el.append(&quot;&lt;div&gt;Hello &quot; + result[&quot;hello&quot;] + &quot;&lt;/div&gt;&quot;);<br /># 调用&nbsp; 下面 方法&nbsp; 通过 model.call (&quot;my_method&quot;, ....<br />&nbsp; &nbsp; def my_method(self, cr, uid, context=None):<br />&nbsp; &nbsp; &nbsp; &nbsp; return {&quot;hello&quot;: &quot;world&quot;}<br /><br />&nbsp; &nbsp; _columns = {<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;message&#039;: fields.text(string=&quot;Message&quot;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;color&#039;: fields.char(string=&quot;Color&quot;, size=20),<br />&nbsp; &nbsp; }<br />
    



    这样 界面可以出  hello  world


  • 讨论:是否有人 开发过 销售(采购)订单 退货 状态的模块
    Z zhong_163

    http://shine-it.net/index.php/topic,12691.msg23013.html#msg23013

    2013年10月份干过 🙂


  • 入库退货,退货单Cancel 后 原入库单无法再次退货
    Z zhong_163

    问题发现:
      采购入库单,确认收货后,发现 入错库,对入库单做退货处理,退货过程中,将生成的退货单Cancel 后,
      原入库单无法再次退货了
    [attachimg=1]
    问题判断:系统检查已经退货数字是,将Cancel 的单据也 统计进去了

    问题疑似解决 :stock/wizard/stock_return_picking.py
    class stock_return_picking(osv.osv_memory):
    下 def get_return_history(self, cr, uid, pick_id, context=None
    原判断语句
                        if rec.location_dest_id.id == m.location_id.id <br />                        and rec.location_id.id == m.location_dest_id.id :
    加上 and rec.state == 'done'
    变为:
                        if rec.location_dest_id.id == m.location_id.id <br />                        and rec.location_id.id == m.location_dest_id.id and rec.state == 'done':


  • Xpath 增加 on_change 响应事件 分享及求指点
    Z zhong_163

    学习了!尝试一下!


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

    autobackup 设置界面再弄个 参数 ,时区差异  ?


  • 汉字zip 文件导致 web模块异常
    Z zhong_163

    有人 报错  Couldn't load module web

    2014-01-16 06:55:22,284 1052 CRITICAL ? openerp.modules.module: 'ascii' codec can't decode byte 0xe6 in position 4: ordinal not in range(128)
    2014-01-16 06:55:22,285 1052 ERROR ? openerp.service: Failed to load server-wide module web.
    The web module is provided by the addons found in the openerp-web project.
    Maybe you forgot to add those addons in your addons_path configuration.
    Traceback (most recent call last):
      File "/Users/huzh/Documents/work/openerp7/openerp/service/init.py", line 60, in load_server_wide_modules
        openerp.modules.module.load_openerp_module(m)
      File "/Users/huzh/Documents/work/openerp7/openerp/modules/module.py", line 415, in load_openerp_module
        getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
      File "/Users/huzh/Documents/work/openerp7/openerp/addons/web/http.py", line 628, in wsgi_postload
        openerp.wsgi.register_wsgi_handler(Root())
      File "/Users/huzh/Documents/work/openerp7/openerp/addons/web/http.py", line 517, in init
        self.load_addons()
      File "/Users/huzh/Documents/work/openerp7/openerp/addons/web/http.py", line 573, in load_addons
        manifest_path = os.path.join(addons_path, module, 'openerp.py')
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 71, in join
        path += '/' + b
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 4: ordinal not in range(128)
    2014-01-16 06:55:22,326 1052 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2014-01-16 06:55:22,327 1052 INFO ? openerp: OpenERP server is running, waiting for connections...



    之前 没注意啥问题,,有次,不小心在addons 目录弄个 带汉字的zip 文件 如“abc汉字.zip”  源码运行  就报上述错误,

    删除 该 文件,,系统正常

    提示:有时候提示,,会走入误区,,,想想之前干了啥,看提示,web 模块错误,再看前一段,,, 'ascii' codec can't decode byte 0xe6 in position 4: o


    解决了问题,再重现问题,发现,人家提示也是对的,,,编码错误。。。导致web模块错误!


  • 中英对照,卓忆整理简单翻译及验证:在Macos安装Odoo及配置开发环境
    Z zhong_163

    参照 mac 部分


    http://blog.sina.com.cn/s/blog_512cf13a0101fc5l.html


  • Openerp android端源码试用分享
    Z zhong_163

    openerp 官方出了android 端的代码,目前只有简单的收件箱、消息等模块
    1、手机端 官方代码地址
    <br / https://code.launchpad.net/~openerp-dev/openerp-mobile/trunk br />
    现在方法  bzr branch lp:openerp-mobile

    2、android 开发环境
    <br / http://developer.android.com/sdk/index.html#download

    直接在这个地址下载  省去自己配置 安装了 ADT  SDK 了

    解压后 有  sdk 和eclipse 目录
    [attachimg=1]

    解压即用,,,没有jdk 可能需要弄jdk 


    3、启动运行
    直接点击eclipse 目录下的 Eclipse

    启动 Eclipse

    配置Android Preferences  让Eclipse 在啥目录找sdk

    [attachimg=2]


    目录选择 上面解压的sdk 目录

    点右下角[Apply]

    4、导入源码


    常规 Eclipse 导入项目 方法

    [attachimg=3]


    结果
    [attachimg=4]


    后来[attachimg=5]

    就ok 了


    5、创建模拟机

    [attachimg=6]



    6、模拟机运行

    选中项目  debug as  或者run as


    注意事项:

    1、该工程生成的apk 需要android 4.4,  4.4 以下机器,,,安装时提示,,[解析错误]【解析包时出现错误】 o 我的手机又要升级了。。。。
    感谢 最开始 冰之星辰 提供apk 体验
    2、SDK 没有升级到4.4  工程没法导入  这项 折腾了我一段时间。。。。。

    其他的看android 开发的水平了



  • Ubuntu 13.10 安装openERP 7.0 具体实现方案
    Z zhong_163

    班门弄下斧 

    从上下文看 sudo adduser --system --home=/opt/openerp --group opener

    是少了p

    更改权限:
    sudo chown -R openerp: *
    这句就是解决解决权限问题


    至于为啥 不放home 目录,,, 个人习惯问题,,,

    放/opt 目录,有点类似于 windows程序喜欢放在program files    习惯性 到这个地方去找




  • Openerp 7.0设置产品退货操作权限
    Z zhong_163

    学习!

  • 登录

  • 没有帐号? 注册

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