Skip to content

Commit

Permalink
Merge PR #829 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Sep 6, 2023
2 parents f0616e1 + 6ac6c6f commit 627b7b1
Show file tree
Hide file tree
Showing 30 changed files with 1,497 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/website_sale_product_attachment/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
155 changes: 155 additions & 0 deletions website_sale_product_attachment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
=============================
eCommerce product attachments
=============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/15.0/website_sale_product_attachment
:alt: OCA/e-commerce
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_product_attachment
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/113/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module lets you publish downloadable attachments in a product page.

This is useful if you want to publish firmwares, manuals, specs, warranties,
or whatever document related to the product.

**Table of contents**

.. contents::
:local:

Configuration
=============

Instead of configuring attachments per product, to configure products per attachment:

#. You need permissions to access system settings.
#. Go to *Settings > Dashboard > Activate the developer mode*.
#. Go to *Settings > Technical > Database Structure > Attachments*.
#. Pick or create one.
#. Enable *Attached To > Is public document*.
#. Use the field *Attached in products* to choose the products.

.. figure:: https://raw.githubusercontent.com/OCA/e-commerce/15.0/website_sale_product_attachment/static/description/backend-attachment.png
:alt: Attachments view in backend

To be able to filter attachments per website:

#. Go to *Website > Configuration > Settings > Website*.
#. Create more than one.
#. Go to *Settings > Technical > Database Structure > Attachments*
#. Pick or create one.
#. Select a website.
#. Save

To toggle attachment icons in the website:

#. Go to any product in your eCommerce.
#. Toggle *Customize > Product downloads > Download icons*.

.. figure:: https://raw.githubusercontent.com/OCA/e-commerce/15.0/website_sale_product_attachment/static/description/frontend-icons.png
:alt: Toggle icons in frontend

Usage
=====

To add publicly downloadable attachments to a product template:

#. Go to a *Website > Products > Products* in backend.
#. Pick or create one.
#. Go to the *eCommerce* tab > *Website Attachments*.
#. Add any downloadable attachments you want there. They can exist before or be new.
They must be public.
#. Save.

.. figure:: https://raw.githubusercontent.com/OCA/e-commerce/15.0/website_sale_product_attachment/static/description/backend-product.png
:alt: Products view in backend

Once you set up the product attachments, public users will be able to download them:

#. Go to the product eCommerce page.
#. Below the product price and description, you will find a dropdown labeled as *Product downloads*. Click it.
#. Users will download those attachments from there.
#. Attachments will appear in name order.

.. figure:: https://raw.githubusercontent.com/OCA/e-commerce/15.0/website_sale_product_attachment/static/description/frontend-download.gif
:alt: Attachments view in backend

Known issues / Roadmap
======================

- Make translatable the name of the attachment in the e-commerce. This will
mean to deal with the sorting of the translated terms.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_product_attachment%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_:

* Jairo Llopis
* Víctor Martínez


* `Sygel <https://www.sygel.es>`_:

* Ángel García de la Chica Herrera

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-Yajo| image:: https://github.com/Yajo.png?size=40px
:target: https://github.com/Yajo
:alt: Yajo

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-Yajo|

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/15.0/website_sale_product_attachment>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions website_sale_product_attachment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
27 changes: 27 additions & 0 deletions website_sale_product_attachment/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2020 Tecnativa - Jairo Llopis
# Copyright 2021 Tecnativa - Víctor Martínez
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "eCommerce product attachments",
"summary": "Let visitors download attachments from a product page",
"version": "16.0.1.0.0",
"development_status": "Beta",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["Yajo"],
"license": "LGPL-3",
"installable": True,
"depends": ["website_sale"],
"data": [
"templates/product_template.xml",
"views/ir_attachment.xml",
"views/product_template.xml",
],
"assets": {
"web.assets_tests": [
"website_sale_product_attachment/static/tests/tours/website_tour.js",
]
},
}
105 changes: 105 additions & 0 deletions website_sale_product_attachment/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_attachment
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-03-02 12:17+0000\n"
"Last-Translator: Noel estudillo <[email protected]>\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: website_sale_product_attachment
#: model_terms:ir.ui.view,arch_db:website_sale_product_attachment.product_attachments
msgid ""
"<i class=\"fa fa-download\"/>\n"
" Product downloads"
msgstr ""
"<i class=\"fa fa-download\"/>\n"
" Descàrregues de productes"

#. module: website_sale_product_attachment
#: model_terms:ir.ui.view,arch_db:website_sale_product_attachment.product_template_form_view
msgid ""
"<i class=\"fa fa-info-circle\"/>\n"
" Only public attachments can be used or created "
"here.\n"
" Removing one attachment from this list does not "
"delete\n"
" or unpublish it from your database."
msgstr ""
"<i class = \"fa fa-info-circle\" />\n"
" Aquí només es poden utilitzar o crear fitxers "
"adjunts públics.\n"
" L'eliminació d'un fitxer adjunt d'aquesta llista no "
"se suprimeix\n"
" o anul·leu la publicació de la vostra base de dades."

#. module: website_sale_product_attachment
#: model:ir.model.fields,field_description:website_sale_product_attachment.field_ir_attachment__attached_in_product_tmpl_ids
msgid "Attached in products"
msgstr "Adjunt als productes"

#. module: website_sale_product_attachment
#: model:ir.model,name:website_sale_product_attachment.model_ir_attachment
msgid "Attachment"
msgstr "Adjunts"

#. module: website_sale_product_attachment
#: model:ir.model.fields,help:website_sale_product_attachment.field_ir_attachment__attached_in_product_tmpl_ids
msgid ""
"Attachment publicly downladable from eCommerce pages in these product "
"templates."
msgstr ""
"Adjunt que es pot baixar públicament de pàgines de comerç electrònic en "
"aquestes plantilles de producte."

#. module: website_sale_product_attachment
#: model_terms:ir.ui.view,arch_db:website_sale_product_attachment.product_template_form_view
msgid "File Name"
msgstr "Nom del 'arxiu"

#. module: website_sale_product_attachment
#: model:ir.model.fields,help:website_sale_product_attachment.field_product_product__website_attachment_ids
#: model:ir.model.fields,help:website_sale_product_attachment.field_product_template__website_attachment_ids
msgid "Files publicly downloadable from the product eCommerce page."
msgstr ""
"Adjunt que es pot baixar públicament de pàgines de comerç electrònic en "
"aquestes plantilles de producte."

#. module: website_sale_product_attachment
#: model:ir.model.fields,field_description:website_sale_product_attachment.field_ir_attachment__website_name
msgid "Name in e-commerce"
msgstr "Nom al comerç electrònic"

#. module: website_sale_product_attachment
#: model:ir.model,name:website_sale_product_attachment.model_product_template
msgid "Product Template"
msgstr "Plantilla de producte"

#. module: website_sale_product_attachment
#: model:ir.model.fields,help:website_sale_product_attachment.field_ir_attachment__website_name
msgid ""
"The name of the download that will be displayed on the e-commerce product "
"page. If not filled, the filename will be shown by default."
msgstr ""
"El nom de la descàrrega que es mostrarà a la pàgina del producte de comerç "
"electrònic. Si no s'omple, el nom del fitxer es mostrarà per defecte."

#. module: website_sale_product_attachment
#: model_terms:ir.ui.view,arch_db:website_sale_product_attachment.product_template_form_view
msgid "Website Attachments"
msgstr "Adjunts del lloc web"

#. module: website_sale_product_attachment
#: model:ir.model.fields,field_description:website_sale_product_attachment.field_product_product__website_attachment_ids
#: model:ir.model.fields,field_description:website_sale_product_attachment.field_product_template__website_attachment_ids
msgid "Website attachments"
msgstr "Adjunts del lloc web"
Loading

0 comments on commit 627b7b1

Please sign in to comment.