Odoo Help

Nabeen Najeeb
On 3/14/18, 6:45 AM

Just return the field names that your computed fields depends on as a list of strings. 

Quoting From your example 

pname = fields.Char(compute='_compute_pname')

@api.depends(lambda self: self.my_function())
def _compute_pname(self):
    if self.partner_id.is_company:
        self.pname = (self.partner_id.name or "").upper()
        self.pname = self.partner_id.namedef my_function(self):
def my_function(self):
    return ['partner_id.name']

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/17/15, 11:26 AM
Seen: 1490 times
Last updated: 3/14/18, 6:45 AM