Hello guys, in my model "Prospect.py" i have this:
num_prospect = fields.Char(string='Prospect',compute='_compute_prospect')
@api.depends('num_prospect')
def_compute_prospect(self):
for record in self:
record.num_prospect[0] = record.num_prospect[0] + 1
return record.num_prospect[0]
This is suppose to adding plus one to the value on prospect every time i create a new prospect,(eg. the first prospect it's gonna be "1", when i create a new prospect, automatacally
add 1 to that value for the value of the second prospect be "2") but these keep me giving this error: "TypeError: 'bool' object is not subscriptable", anyone can help me, pls?
But the only place i have the "num_prospect" declared is in the first line, where the type of num_prospect is char...