Make ModelView.parse_view public

issue10073
review333851028
This commit is contained in:
Cédric Krier committed 2021-02-14 15:56:18 +01:00
1 parent 770ebacb6e
commit f069770df2
1 file changed
+2 -3
+2 -3
View File
@@ -27,10 +27,9 @@ class InvoiceLine(metaclass=PoolMeta):
__name__ = 'account.invoice.line'
@classmethod
def _view_look_dom_arch(cls, tree, type, field_children=None, level=0):
def parse_view(cls, tree, type, *args, **kwargs):
if type == 'form' and Transaction().context.get('standalone'):
tree_root = tree.getroottree().getroot()
if tree_root.get('cursor') == 'product':
tree_root.set('cursor', 'party')
return super(InvoiceLine, cls)._view_look_dom_arch(tree, type,
field_children=field_children, level=level)
return super().parse_view(tree, type, *args, **kwargs)