From 14c7c9ae50300ac8b34605c240924364abd4bf75 Mon Sep 17 00:00:00 2001 From: Anthony Martinet Date: Thu, 15 Feb 2024 17:23:39 +0100 Subject: [PATCH] fix(exportable): v17 fields are sometimes non exportable --- odoorpc/env.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/odoorpc/env.py b/odoorpc/env.py index 536dbd4..fa70fd1 100644 --- a/odoorpc/env.py +++ b/odoorpc/env.py @@ -322,6 +322,8 @@ def _create_model_class(self, model): fields_get = self._odoo.execute(model, 'fields_get') for field_name, field_data in fields_get.items(): if field_name not in FIELDS_RESERVED: + if 'exportable' in field_data and not field_data['exportable']: + continue Field = fields.generate_field(field_name, field_data) attrs['_columns'][field_name] = Field attrs[field_name] = Field