Skip to content
  • Categories
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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

  • Default (Flatly)
  • No Skin
Collapse

Odoo 中文社区

  1. Home
  2. Categories
  3. Odoo 开发与实施交流
  4. 新手求助,在网页修改模型添加字段和py文件有没有同步?

新手求助,在网页修改模型添加字段和py文件有没有同步?

Scheduled Pinned Locked Moved Odoo 开发与实施交流
5 Posts 3 Posters 2.8k Views 3 Watching
  • 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.
  • K Offline
    K Offline
    kakabu
    wrote on last edited by
    #1

    听说在页面上添加字段是存储在数据库里,可看py源文件没有同步更新,如果需要改功能就要更改py文件,那谁最新的问题?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Kowky
      wrote on last edited by
      #2

      两个概念 页面添加字段只是加载了,不会触发底层的py文件变化,还是在后台写代码吧

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kakabu
        wrote on last edited by
        #3

        感谢高手大大解惑
        然后我在文件里写,总报错
        例如我在sale.py文件里加个字段

        x_total_t =fields.Float(string='Total',compute='_amount_all',store=True,digits=(12, 1),readonly=True)
        

        系统服务都启动不了

        JoshuaJ 1 Reply Last reply
        0
        • K Offline
          K Offline
          Kowky
          wrote on last edited by
          #4

          计算字段?知道这些属性的意义是啥吗?还有继承了你需要追加字段的模块了吗?

          1 Reply Last reply
          0
          • K kakabu

            感谢高手大大解惑
            然后我在文件里写,总报错
            例如我在sale.py文件里加个字段

            x_total_t =fields.Float(string='Total',compute='_amount_all',store=True,digits=(12, 1),readonly=True)
            

            系统服务都启动不了

            JoshuaJ Offline
            JoshuaJ Offline
            Joshua
            管理员
            wrote on last edited by
            #5

            @kakabu 如果服务启动不了,可以通过查看服务器日志文件定位出错原因。

            【上海先安科技】(joshua AT openerp.cn),欢迎关注公众号:openerp_cn

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Tags
            • Popular
            • Users
            • Groups