logo
  • 教程列表
  • SO官方文檔
  • 為模型建立自動化函式
    • 首先,你需要為 make 函式呼叫建立 xml 檔案
    • 對應的 Python 檔案
  1. StackOverflow 文件
  2. odoo-8 教程
  3. 為模型建立自動化函式
  4. 對應的 Python 檔案

對應的 Python 檔案

Created: November-22, 2018

class *model_name*(models.Model):
    _name = *model_name*

    @api.model
    def _configure_sales(self):
        # Do the configuration here

每次安裝模組時,此功能都將執行。

注意:如果從 xml 中刪除 noupdate,函式也將在升級時執行。

  • 首先,你需要為 make 函式呼叫建立 xml 檔案

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明