首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从其他类odoo 9调用函数

从其他类odoo 9调用函数
EN

Stack Overflow用户
提问于 2016-12-20 23:15:05
回答 0查看 2K关注 0票数 2

在自定义模块中,我有两个类。@api.one中的类test如何在单击按钮时调用test2_func

我应该在def call_test2_func(self)中放什么?

例如:

代码语言:javascript
复制
class test(models.Model):
    _name = "test.class"
    _description = "TEST"
@api.one
    def call_test2_func(self):
  """call test2_func here"""

class test2(models.Model):
    _name = "test2.class"
    _description = "TEST 2"

@api.one
    def test2_func(self):
        print("TEST 2")
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41245572

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档