mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-21 03:32:05 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
|
|
@ -642,7 +642,7 @@ class Properties(Field):
|
|||
raise ValueError(f"Missing property name for {self}")
|
||||
|
||||
def get_property(record):
|
||||
property_value = self.__get__(record)
|
||||
property_value = self.__get__(record.with_context(property_selection_get_key=True))
|
||||
value = property_value.get(property_name)
|
||||
if value:
|
||||
return value
|
||||
|
|
@ -828,6 +828,8 @@ class Property(abc.Mapping):
|
|||
return self.record.env[prop.get('comodel')].browse(prop.get('value'))
|
||||
|
||||
if prop.get('type') == 'selection' and prop.get('value'):
|
||||
if self.record.env.context.get('property_selection_get_key'):
|
||||
return next((sel[0] for sel in prop.get('selection') if sel[0] == prop['value']), False)
|
||||
return next((sel[1] for sel in prop.get('selection') if sel[0] == prop['value']), False)
|
||||
|
||||
if prop.get('type') == 'tags' and prop.get('value'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue