Skip to content

Commit

Permalink
Merge PR #94 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by sbejaoui
  • Loading branch information
OCA-git-bot committed Mar 14, 2022
2 parents b2f3327 + d5b4b31 commit f530f28
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions brand/models/res_brand_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,13 @@ def fields_view_get(

if view_type in ['tree', 'form']:
doc = etree.XML(result['arch'])
modifiers = self.fields_get(['brand_use_level'])['brand_use_level']
result['fields']['brand_use_level'] = modifiers
elem = etree.Element(
'field', {'name': 'brand_use_level', 'invisible': 'True'}
)
orm.setup_modifiers(elem, modifiers)
for node in doc.xpath("//field[@name='brand_id']"):
elem = etree.Element(
'field', {'name': 'brand_use_level', 'invisible': 'True'}
)
orm.setup_modifiers(
elem,
self.fields_get(['brand_use_level'])['brand_use_level'],
)
node.addprevious(elem)
node.set(
'attrs',
Expand Down

0 comments on commit f530f28

Please sign in to comment.