In a custom module I have two classes. How can class test
in @api.one
call test2_func
on a button click?
What should I put in def call_test2_func(self)
?
For example:
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")
self.env["model_name"].myfunction
– yorodm