'Return an architecture and a description of all the fields.
The field description combines the result of fields_get() and
postprocess().
:param node: the architecture as as an etree
:return: a tuple (arch, fields) where arch is the given node as a
string and fields is the description of all the fields.'

@api.model
def postprocess_and_fields(self, model, node, view_id):

    fields = {}
    if (model not in self.env):
        self.raise_view_error((_('Model    not    found:    %(model)s') % dict(model=model)), view_id)
    Model = self.env[model]
    is_base_model = (self.env.context.get('base_model_name', model) == model)
    if (node.tag == 'diagram'):
        if (node.getchildren()[0].tag == 'node'):
            node_model = self.env[node.getchildren()[0].get('object')]
            node_fields = node_model.fields_get(None)
            fields.update(node_fields)
            if (((not node.get('create')) and (not node_model.check_access_rights('create', raise_exception=False))) or ((not self._context.get('create', True)) and is_base_model)):
                node.set('create', 'false')
        if (node.getchildren()[1].tag == 'arrow'):
            arrow_fields = self.env[node.getchildren()[1].get('object')].fields_get(None)
            fields.update(arrow_fields)
    else:
        fields = Model.fields_get(None)
    node = self.add_on_change(model, node)
    fields_def = self.postprocess(model, node, view_id, False, fields)
    node = self._disable_workflow_buttons(model, node)
    if (node.tag in ('kanban', 'tree', 'form', 'gantt')):
        for (action, operation) in (('create', 'create'), ('delete', 'unlink'), ('edit', 'write')):
            if (((not node.get(action)) and (not Model.check_access_rights(operation, raise_exception=False))) or ((not self._context.get(action, True)) and is_base_model)):
                node.set(action, 'false')
    if (node.tag in ('kanban',)):
        group_by_name = node.get('default_group_by')
        if (group_by_name in Model._fields):
            group_by_field = Model._fields[group_by_name]
            if (group_by_field.type == 'many2one'):
                group_by_model = Model.env[group_by_field.comodel_name]
                for (action, operation) in (('group_create', 'create'), ('group_delete', 'unlink'), ('group_edit', 'write')):
                    if (((not node.get(action)) and (not group_by_model.check_access_rights(operation, raise_exception=False))) or ((not self._context.get(action, True)) and is_base_model)):
                        node.set(action, 'false')
    arch = etree.tostring(node, encoding='utf-8').replace(' DCTB ', '')
    for k in fields.keys():
        if (k not in fields_def):
            del fields[k]
    for field in fields_def:
        if (field in fields):
            fields[field].update(fields_def[field])
        else:
            message = (_('Field    `%(field_name)s`    does    not    exist') % dict(field_name=field))
            self.raise_view_error(message, view_id)
    return (arch, fields)
