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

L

lipeng260

@lipeng260
关于
帖子
40
主题
12
群组
0
粉丝
0
关注
0

帖子

最新 最佳 有争议的

  • Odoo 中调用 action, js 和python 中写法不统一的坑
    L lipeng260

    坑过


  • 关于设置自动化动作
    L lipeng260

    审批流直接出发按钮事件


  • Odoo9中website翻译存在问题
    L lipeng260

    翻译中</em>写成了</ em>,只要是结束标签,/后面都加入了空格,导致网页编辑无法使用,解决2个小时才发现问题,记录一下。


  • Odoo中重置密码BUG
    L lipeng260

    开启重置密码功能后提示'NoneType' object has no attribute 'get' ,调试代码发现

    def action_reset_password(self, cr, uid, ids, context=None):<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;&quot; create signup token for each user, and send their signup url by email &quot;&quot;&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; # prepare reset password signup<br />&nbsp; &nbsp; &nbsp; &nbsp; create_mode = bool(context.get(&#039;create_user&#039;))<br />&nbsp; &nbsp; &nbsp; &nbsp; res_partner = self.pool.get(&#039;res.partner&#039;)<br />&nbsp; &nbsp; &nbsp; &nbsp; partner_ids = [user.partner_id.id for user in self.browse(cr, uid, ids, context)]<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; # no time limit for initial invitation, only for reset password<br />&nbsp; &nbsp; &nbsp; &nbsp; expiration = False if create_mode else now(days=+1)<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; res_partner.signup_prepare(cr, uid, partner_ids, signup_type=&quot;reset&quot;, expiration=expiration, context=context)<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; if not context:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; context = {}
    


    context为空造成的,把这个代码放前面就可以了。

    if not context:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; context = {}
    

  • _inherit困惑??
    L lipeng260

    调试也是B,再到A,再到原生,如果是在不同的模块中继承了同一个方法,这个又是一个什么样的效果,会不会混乱,如何避免产生混乱?


  • _inherit困惑??
    L lipeng260

    直接上代码了

    class ResPartnerA(models.Model):<br />&nbsp; &nbsp; _inherit = &#039;res.partner&#039;<br /><br />&nbsp; &nbsp; @api.model<br />&nbsp; &nbsp; def im_search(self, name, limit=20):<br />&nbsp; &nbsp; &nbsp; &nbsp; return super(ResPartnerA, self).im_search(name, limit=limit)<br />class ResPartnerB(models.Model):<br />&nbsp; &nbsp; _inherit = &#039;res.partner&#039;<br /><br />&nbsp; &nbsp; @api.model<br />&nbsp; &nbsp; def im_search(self, name, limit=20):<br />&nbsp; &nbsp; &nbsp; &nbsp; return super(ResPartnerB, self).im_search(name, limit=limit)
    


    这个继承的先后顺序谁来决定的?super指向哪个?求解释。


  • 求助:formview中如何写domain=&quot;[('groups_id','child_of','ref('group_bs_supplier')')]&quot;语句
    L lipeng260

    学习了,谢谢。


  • 求助:formview中如何写domain=&quot;[('groups_id','child_of','ref('group_bs_supplier')')]&quot;语句
    L lipeng260

    无意间发现可以这样写。。。context="{'default_groups_ref': ['base.group_bs_commentator']}"。

    然而发现这样设置并没有什么卵用。。


  • 求助:formview中如何写domain=&quot;[('groups_id','child_of','ref('group_bs_supplier')')]&quot;语句
    L lipeng260

    没有找到好方法,自己重写了res.users的name_search函数,有更好的方法吗?


  • 求助:formview中如何写domain=&quot;[('groups_id','child_of','ref('group_bs_supplier')')]&quot;语句
    L lipeng260

    在formview中写入了domain="[('groups_id','child_of','ref('group_bs_supplier')')]"这样的条件,客户端JS中没有ref方法,求助该如何写?


  • 求助:odoo8自动化- &gt;安排的动作,设置好后代码无法执行
    L lipeng260

    找到原因了,GeventServer PreforkServer ThreadedServer,我一直用的GeventServer,查看代码,这个是不执行cron的,改用后两个就可以了,不知道这三个那个性能差距。


  • 在listview的web视图上增加一个按钮的问题
    L lipeng260

    静静的方法学习了。。


  • 求助:odoo8自动化- &gt;安排的动作,设置好后代码无法执行
    L lipeng260

    发现addons/base_action_rule有这样一个模块,正在看,有了解过的,给点思路。


  • 求助:odoo8自动化- &gt;安排的动作,设置好后代码无法执行
    L lipeng260

    如题,网上有人说多线程后cron线程会停止,不知道说的是不是这个东西?

    想实现字段中有一个时间,如果当前时间大于这个时间,则改变工作流状态。


  • 求助:工作流迁移中加入迁移条件,当条件为假时如何提示消息??
    L lipeng260

    静静是女的,谁说是男的了,我见过的


  • 求助:工作流迁移中加入迁移条件,当条件为假时如何提示消息??
    L lipeng260

    我现在做一个招投标的项目,自己写了一个模块,很多写法感觉都有问题,方便的话发你,帮我找找问题。


  • 求助:工作流迁移中加入迁移条件,当条件为假时如何提示消息??
    L lipeng260

    工作流我还是一知半解,现在很多不直接使用工作流迁移按钮,而改用object按钮,做相应判断后,再用self.signal_workflow方法触发迁移,python中之写write({'state':'done'}),这样的,请教。


  • 关于many2one关系中 下拉框的问题
    L lipeng260

    静静正解。


  • 关于自定义模块开发,小弟有一事相问
    L lipeng260

    [quote author=开阖-静静 link=topic=17342.msg31385#msg31385 date=1447300164]
            return {
                'type' : 'ir.actions.client',
                'name' : 'Point of Sale Menu',
                'tag' : 'reload',
                'params' : {'menu_id': obj},
            }
    系统里有很多这种return 写法的感觉可以用这个。你可以试试
    [/quote]

    这种写法是需要在服务器端返回写的吗?服务端写一个循环?不太理解。


  • 请教,@api.multi def write(self, vals): 返回{'warning': warning},无效??
    L lipeng260

    谢谢

  • 登录

  • 没有帐号? 注册

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