Skip to content

Commit

Permalink
[14.0][FIX] Fixed issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Freni-OSI authored and AmmarOfficewalaSerpentCS committed Jul 15, 2021
1 parent 9e592a5 commit 38eaa57
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions brand/models/res_brand_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def _onchange_brand_id(self):
if rec.brand_id and rec.brand_id.company_id:
rec.company_id = rec.brand_id.company_id

def setup_modifiers(self, node, field=None, context=None, in_tree_view=False):
def setup_modifiers(self, node, field=None, context=None, current_node_path=None):
modifiers = {}
if field is not None:
ir_ui_view.transfer_field_to_modifiers(field, modifiers)
ir_ui_view.transfer_node_to_modifiers(
node, modifiers, context=context, in_tree_view=in_tree_view
node, modifiers, context=context, current_node_path=current_node_path
)
ir_ui_view.transfer_modifiers_to_node(modifiers, node)

Expand All @@ -83,7 +83,10 @@ def fields_view_get(
)
field = result["fields"]["brand_use_level"]
self.setup_modifiers(
elem, field=field, context=self._context, in_tree_view=in_tree_view
elem,
field=field,
context=self._context,
current_node_path=in_tree_view,
)
node.addprevious(elem)
node.set(
Expand All @@ -99,7 +102,10 @@ def fields_view_get(
)
field = result["fields"]["brand_id"]
self.setup_modifiers(
node, field=field, context=self._context, in_tree_view=in_tree_view
node,
field=field,
context=self._context,
current_node_path=in_tree_view,
)
result["arch"] = etree.tostring(doc, encoding="unicode")
return result

0 comments on commit 38eaa57

Please sign in to comment.