[FIX] when adapting a view, also postprocess it

This commit is contained in:
Holger Brunn
2020-04-20 16:26:38 +02:00
parent 5b886ca78c
commit c48616fbe1

View File

@@ -132,5 +132,8 @@ class AccountMoveLine(models.Model):
doc.remove(elem)
for elem in doc.xpath("//field[@name='credit']"):
doc.remove(elem)
result['arch'] = etree.tostring(doc)
arch, fields = self.env['ir.ui.view'].postprocess_and_fields(
self._name, doc, view_id,
)
result.update(arch=arch, fields=fields)
return result