Odoo 中文社区

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

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

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

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

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

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

    我自定义了一个新的模块,为什么在模块列表里无法找到???求大神解惑!

    Odoo 新手求助
    2
    4
    1646
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 9
      923485750 last edited by

      我在source--addons定义了一个包--mymodule:根据网上的自定义模块教程定义了三个文件:init.py  openerp.py  main.py
      其中_init_.py  中的代码:import main
          openerp.py中的代码:

      # *  coding: utf-8 _*__


      {
          'name' : "Mymodule",
          'summary' : """
                                              我的第一个模块 
                      """,         
          'description' : """
                                                          我的第一个模块,用于学习自定义模块。
                          """,             
          'author' : "shanglin",
          'website' : "http://www.yourcompany.com",
         
          # Categories can be used to filter modules in modules listing
          # Check [检测到链接无效,已移除] br />    # for the full list
         
          'category' : "Test",
          'version' : "1.11",
         
          # any module necessary for this one to work correctly
         
          'depends' : ['base'],
         
          # always loaded
         
          'data' : [
      #              'security/ir.model.access.csv',
      #              'views/mymodule_templates.xml',
      #              'demo.xml',
                   
                    ],
         
          # only loaded in demonstration mode
         
          'demo' : [
                    'demo.xml',
                   
                    ],


      }


      main.py中的代码:
      '''
      Created on 2015年11月20日

      @author: shanglin
      '''


      三个文件定义完后,重启了Odoo服务器,并且更新了模块列表,为什么还是找不到模块啊?是缺少文件还是代码出错了?

      1 Reply Last reply Reply Quote 0
      • 9
        923485750 last edited by

        问题解决了,init.py  和 openerp.py 应该是 init.py  和  openerp.py  居然是两条下划线,没注意啊......

        1 Reply Last reply Reply Quote 0
        • mrshelly
          mrshelly last edited by

          嗯...

          是两道下划线....

          1 Reply Last reply Reply Quote 0
          • First post
            Last post