hello, I just start coding with odoo13, and I have a comput field in the module and I want to show it on the tree view but ValueError: Expected singleton appear
In odoo 9, I used @api.one decorator, but for odoo 13 I make same reaserch to resolve this error but I cannot resolve it.
This is the fonction of the comput field:
@api.depends('num_cour', 'num_b','num_da', 'abr_sect')
def _get_name(self):self.num_cour = ' N° '+ (self.num_b or '') + '/' + (self.num_da or '') + '/' + (self.abr_sect or '')
num_cour = fields.Char(string='N cr', compute='_get_name', readonly=True)
See how to fix single ton error and its reasons: https://www.youtube.com/watch?v=Rv44nFVn_5U&list=PLqRRLx0cl0homY1elJbSoWfeQbRKJ-oPO&index=30