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

H

hifly

@hifly
关于
帖子
28
主题
3
群组
0
粉丝
0
关注
0

帖子

最新 最佳 有争议的

  • 涉及多库位的一个容易遇到的坑
    H hifly

    平级库位相互调拨也不会反映出来的.
    原因就是视图定义把内部调拨单忽略了.


  • [分享]一次失败的小合作
    H hifly

    3个月了,才看到.
    以后还是要签署合同,界定标准阿.


  • 正确的核销方法 (客户余额支付订单的情况)
    H hifly

    谢谢分享, 我想加tag的,不被允许.
    不过回帖,可以加tag.


  • Openerp7.0如何实现仓库月报表(或者叫库存明细账)?
    H hifly

    自主开发一个叻,加油!


  • [分享]关于如何确认哪些模块继承修改过某对象的方法
    H hifly

    恭喜,总监又突破了!


  • OpenERP7.0 单据上方的状态条显示顺序依赖该selection字段的定义顺序
    H hifly

    单据上方的状态条显示顺序依赖该selection字段的定义顺序.

    字段原来定义:
    'state': fields.selection([('draft','New'),('in_progress','Sent to Suppliers'),('cancel','Cancelled'),('done','Purchase Done'),],
                'Status', track_visibility='onchange', required=True)


    这样添加新的状态后:
    'state': fields.selection([('draft','New'),('in_progress','Sent to Suppliers'),('cancel','Cancelled'),('done','Purchase Done')
                                      ,('confirmed', 'Department Approval'),('approved', 'Company Approval')
                                    ,],
                'Status', track_visibility='onchange', required=True)
    界面状态条不是期望的结果。

    修改一下状态定义:
    'state': fields.selection([('draft','New'),('confirmed', 'Department Approval'),('approved', 'Company Approval')
                                    ,('in_progress','Sent to Suppliers'),('cancel','Cancelled'),('done','Purchase Done'),],
                'Status', track_visibility='onchange', required=True)
    就是需要的显示顺序。

    感谢 MrShelly 的神猜 ! 😄
    不会上传图片,需要看效果的,访问开发群 2013/08/12的聊天记录。


  • OpenERP的MRP运算的核心对象--Procurement Order
    H hifly

    校长出手,都是精品。
    讲的非常好,鼓掌中。。。
    有了OpenERP中文版本,演示界面是中文的就更好了。 🙂


  • 监控postgresql操作
    H hifly

    支持一下,顺便问个问题:
    请教 如何开启pg的慢日志功能?谢谢


  • OpenERP的短信(SMS)接口
    H hifly

    谢谢shelly的回复  🙂


  • OpenERP的短信(SMS)接口
    H hifly

    if p.match(res):  #send OK!
    res是什么啊?


  • Many2many字段的搜索
    H hifly

    sale.order.line对象有一个many2many字段options,可以这样来搜索:

    oids = self.pool.get('custom.option').search(cr, uid, [('name', 'ilike', 'to-search-name')])
    soids = self.pool.get('sale.order.line').search(cr, uid, [('id', '=', line.id),('options', 'in', oids)])

    感谢达人Mrshelly!


  • [代码分析] 财务报表中的部分变量是如何定义和赋值的?
    H hifly

    是的。
    被wizard窗口中的过滤字段误导了。
    大致过程应该是这样的:
    account\account.py

    <br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;balance&#039;: fields.function(__compute, digits_compute=dp.get_precision(&#039;Account&#039;), method=True, string=&#039;Balance&#039;, multi=&#039;balance&#039;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;credit&#039;: fields.function(__compute, digits_compute=dp.get_precision(&#039;Account&#039;), method=True, string=&#039;Credit&#039;, multi=&#039;balance&#039;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;debit&#039;: fields.function(__compute, digits_compute=dp.get_precision(&#039;Account&#039;), method=True, string=&#039;Debit&#039;, multi=&#039;balance&#039;),<br />
    


    在这个方法__compute里,层层调用才刚刚开始,多少明白一点了。
    谢谢Shelly, Jeff,继续往下看。。。


  • [代码分析] 财务报表中的部分变量是如何定义和赋值的?
    H hifly

    Shelly, 你说的这个class的确查询到了上面提到的3个变量。

    但 同一目录下的account_profit_loss.py中

    <br />import time<br />import pooler<br />from report import report_sxw<br />from common_report_header import common_report_header<br />from tools.translate import _<br /><br />class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):<br /><br />&nbsp; &nbsp; def __init__(self, cr, uid, name, context=None):<br />&nbsp; &nbsp; &nbsp; &nbsp; super(report_pl_account_horizontal, self).__init__(cr, uid, name, context=context)<br />&nbsp; &nbsp; &nbsp; &nbsp; self.result_sum_dr = 0.0<br />&nbsp; &nbsp; &nbsp; &nbsp; self.result_sum_cr = 0.0<br />&nbsp; &nbsp; &nbsp; &nbsp; self.res_pl = {}<br />&nbsp; &nbsp; &nbsp; &nbsp; self.result = {}<br />&nbsp; &nbsp; &nbsp; &nbsp; self.result_temp = &#91;]<br />&nbsp; &nbsp; &nbsp; &nbsp; self.localcontext.update( {<br />
    


    和同一目录下的 account_balance_sheet.py中

    <br />import time<br />import pooler<br />from report import report_sxw<br />from account.report import account_profit_loss<br />from common_report_header import common_report_header<br />from tools.translate import _<br /><br />class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header):<br />&nbsp; &nbsp; def __init__(self, cr, uid, name, context=None):<br />&nbsp; &nbsp; &nbsp; &nbsp; super(report_balancesheet_horizontal, self).__init__(cr, uid, name, context=context)<br />&nbsp; &nbsp; &nbsp; &nbsp; self.obj_pl = account_profit_loss.report_pl_account_horizontal(cr, uid, name, context=context)<br />&nbsp; &nbsp; &nbsp; &nbsp; self.result_sum_dr = 0.0<br />&nbsp; &nbsp; &nbsp; &nbsp; self.result_sum_cr = 0.0<br />&nbsp; &nbsp; &nbsp; &nbsp; self.result = {}<br />&nbsp; &nbsp; &nbsp; &nbsp; self.res_bl = {}<br />&nbsp; &nbsp; &nbsp; &nbsp; self.result_temp = &#91;]<br />&nbsp; &nbsp; &nbsp; &nbsp; self.localcontext.update({<br />
    


    都没有查询到,不知道是怎么关联起来的。


  • 分享OE的数据库字典网页版
    H hifly

    很好的资料啊


  • [代码分析] 财务报表中的部分变量是如何定义和赋值的?
    H hifly

    [color=blue][u][size=10pt]account\report\common_report_header.py[/size][/u][/color]

    <br />import pooler<br />from tools.translate import _<br /><br />class common_report_header(object):<br /><br />&nbsp; &nbsp; def _sum_debit(self, period_id=False, journal_id=False):<br />&nbsp; &nbsp; &nbsp; &nbsp; if journal_id and isinstance(journal_id, int):<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; journal_id = [journal_id]<br />&nbsp; &nbsp; &nbsp; &nbsp; if period_id and isinstance(period_id, int):<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; period_id = [period_id]<br />&nbsp; &nbsp; &nbsp; &nbsp; if not journal_id:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; journal_id = self.journal_ids<br />&nbsp; &nbsp; &nbsp; &nbsp; if not period_id:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; period_id = self.period_ids<br />&nbsp; &nbsp; &nbsp; &nbsp; if not (period_id and journal_id):<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 0.0<br />&nbsp; &nbsp; &nbsp; &nbsp; self.cr.execute(&#039;SELECT SUM(debit) FROM account_move_line l &#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;WHERE period_id IN %s AND journal_id IN %s &#039; + self.query_get_clause + &#039; &#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (tuple(period_id), tuple(journal_id)))<br />&nbsp; &nbsp; &nbsp; &nbsp; return self.cr.fetchone()[0] or 0.0<br />
    


    找了半天,不知道 [color=red][b]self.journal_ids,self.period_ids,self.query_get_clause[/b][/color]这几个变量在哪里定义,其值从何而来。其子类,比如[color=blue][size=10pt][u]account_balance_sheet.py[/u][/size][/color]也没有找到定义。

    请大家帮忙分析一下,谢谢!


  • Web client 的 addons 样例模块...
    H hifly

    赞!感谢shelly分享


  • 理解OpenERP的BoM表的Properties
    H hifly

    精辟,谢谢老肖!


  • 找不到 DAV 模块
    H hifly

    在 Shelly的帮助下,
    1 将dav文件夹复制到 C:\Python25\Lib\site-packages  目录中后,
    2 再将 .pyo 改成 .pyc
    问题解决。

    NO PROBLEM
    Thanks Shelly


  • 找不到 DAV 模块
    H hifly

    遇到同样问题,求解中


  • GTK, Tree view, Group By 中文字变成方框的问题
    H hifly

    测试通过,问题解决,感谢楼上诸位努力

    官方的进度还没有啊...

  • 登录

  • 没有帐号? 注册

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