diff --git a/data_nature_importer/README.rst b/data_nature_importer/README.rst index ac6d593..1adf31f 100644 --- a/data_nature_importer/README.rst +++ b/data_nature_importer/README.rst @@ -40,6 +40,7 @@ Changelog - 16.0.1.0.0: Initial module. - 16.0.1.0.1: Catch empty metadata response in _get_dn_metadata +- 16.0.1.1.0: Add Queue Job support and move to server action Bug Tracker =========== diff --git a/data_nature_importer/__manifest__.py b/data_nature_importer/__manifest__.py index 047704b..beddded 100644 --- a/data_nature_importer/__manifest__.py +++ b/data_nature_importer/__manifest__.py @@ -5,7 +5,7 @@ "website": "https://www.bakeup.org", "category": "product", "version": "16.0.1.0.1", - "depends": ["product"], + "depends": ["product", "queue_job"], "data": [ "security/ir.model.access.csv", "views/product_template_views.xml", diff --git a/data_nature_importer/models/product_template.py b/data_nature_importer/models/product_template.py index e1605b4..4b0c1a7 100644 --- a/data_nature_importer/models/product_template.py +++ b/data_nature_importer/models/product_template.py @@ -8,9 +8,7 @@ class ProductTemplate(models.Model): def action_sync_datanature_image(self): for product in self: - image_data = product._get_dn_image() - if image_data: - product.image_1920 = image_data + product.with_delay()._sync_datanature_image() def _get_dn_metadata(self): self.ensure_one() @@ -31,3 +29,9 @@ class ProductTemplate(models.Model): if image_data: return image_data return False + + def _sync_datanature_image(self): + self.ensure_one() + image_data = self._get_dn_image() + if image_data: + self.image_1920 = image_data diff --git a/data_nature_importer/readme/HISTORY.rst b/data_nature_importer/readme/HISTORY.rst index 3af418f..2244b12 100644 --- a/data_nature_importer/readme/HISTORY.rst +++ b/data_nature_importer/readme/HISTORY.rst @@ -1,2 +1,3 @@ - 16.0.1.0.0: Initial module. - 16.0.1.0.1: Catch empty metadata response in _get_dn_metadata +- 16.0.1.1.0: Add Queue Job support and move to server action diff --git a/data_nature_importer/static/description/index.html b/data_nature_importer/static/description/index.html index d6909bc..76ffedc 100644 --- a/data_nature_importer/static/description/index.html +++ b/data_nature_importer/static/description/index.html @@ -383,6 +383,7 @@ ul.auto-toc {
diff --git a/data_nature_importer/views/product_template_views.xml b/data_nature_importer/views/product_template_views.xml index c5997da..cac1ffa 100644 --- a/data_nature_importer/views/product_template_views.xml +++ b/data_nature_importer/views/product_template_views.xml @@ -1,18 +1,13 @@ - - - product.template.action.menu - product.template - - - -