[FIX] link_tracker: Filter by tracked URL code is not working

When trying to filter links by a tracked URL code, the following warning
is shown:

    WARNING dbname odoo.models: Cannot execute name_search, no _rec_name
	defined on link.tracker.code

and the applied filter gives all records.

closes odoo/odoo#71398

X-original-commit: 3687dabbc373e57e24ca4596c18ef1dacfde8273
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
This commit is contained in:
Luis González
2021-05-28 11:30:45 +00:00
committed by Andrea Grazioso (agr-odoo)
parent abdd0bc257
commit e852a10aa6
@@ -240,6 +240,7 @@ class LinkTracker(models.Model):
class LinkTrackerCode(models.Model):
_name = "link.tracker.code"
_description = "Link Tracker Code"
_rec_name = 'code'
code = fields.Char(string='Short URL Code', required=True, store=True)
link_id = fields.Many2one('link.tracker', 'Link', required=True, ondelete='cascade')