Public release from ruodoo-project: 19.0 - 2026-05-10 21:19:01 UTC
This commit is contained in:
13
web_debranding/models/ir_model.py
Normal file
13
web_debranding/models/ir_model.py
Normal file
@ -0,0 +1,13 @@
|
||||
# Copyright 2020,2022 Ivan Yelizariev
|
||||
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps).
|
||||
from odoo import models
|
||||
|
||||
from .ir_translation import debrand
|
||||
|
||||
|
||||
class IrModelSelection(models.Model):
|
||||
_inherit = "ir.model.fields.selection"
|
||||
|
||||
def _get_selection_data(self, *args, **kwargs):
|
||||
data = super(IrModelSelection, self)._get_selection_data(*args, **kwargs)
|
||||
return [(value, debrand(self.env, name)) for value, name in data]
|
||||
Reference in New Issue
Block a user