Odoo 中文社区

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. lipeng260

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

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

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

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

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

    L
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 40
    • Best 0
    • Controversial 0
    • Groups 0

    lipeng260

    @lipeng260

    0
    Reputation
    373
    Profile views
    40
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    lipeng260 Unfollow Follow

    Latest posts made by lipeng260

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

      坑过

      posted in Odoo 开发与实施交流
      L
      lipeng260
    • RE: 关于设置自动化动作

      审批流直接出发按钮事件

      posted in Odoo 开发与实施交流
      L
      lipeng260
    • Odoo9中website翻译存在问题

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

      posted in Odoo 开发与实施交流
      L
      lipeng260
    • Odoo中重置密码BUG

      开启重置密码功能后提示'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 = {}
      
      posted in Odoo 开发与实施交流
      L
      lipeng260
    • RE: _inherit困惑??

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

      posted in Odoo 开发与实施交流
      L
      lipeng260
    • _inherit困惑??

      直接上代码了

      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指向哪个?求解释。

      posted in Odoo 开发与实施交流
      L
      lipeng260
    • RE: 求助:formview中如何写domain=&quot;[('groups_id','child_of','ref('group_bs_supplier')')]&quot;语句

      学习了,谢谢。

      posted in Odoo 开发与实施交流
      L
      lipeng260
    • RE: 求助:formview中如何写domain=&quot;[('groups_id','child_of','ref('group_bs_supplier')')]&quot;语句

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

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

      posted in Odoo 开发与实施交流
      L
      lipeng260
    • RE: 求助:formview中如何写domain=&quot;[('groups_id','child_of','ref('group_bs_supplier')')]&quot;语句

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

      posted in Odoo 开发与实施交流
      L
      lipeng260
    • 求助:formview中如何写domain=&quot;[('groups_id','child_of','ref('group_bs_supplier')')]&quot;语句

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

      posted in Odoo 开发与实施交流
      L
      lipeng260