diff --git a/website_sale_product_document/models/product_document.py b/website_sale_product_document/models/product_document.py index fa3c8ddf7..933853ceb 100644 --- a/website_sale_product_document/models/product_document.py +++ b/website_sale_product_document/models/product_document.py @@ -38,7 +38,6 @@ def _compute_attachment_id(self): ) if not attachment: raise ValidationError(_("No attachment found")) - elif len(attachment) > 1: + if len(attachment) > 1: raise ValidationError(_("More than one attachment found")) - else: - rec.attachment_id = attachment[0] + rec.attachment_id = attachment[0] diff --git a/website_sale_product_document/views/product_template_views.xml b/website_sale_product_document/views/product_template_views.xml index 1e525a60c..2f76ccc9c 100644 --- a/website_sale_product_document/views/product_template_views.xml +++ b/website_sale_product_document/views/product_template_views.xml @@ -1,6 +1,8 @@ + - +