Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] website_sale_product_attachment #945

Open
wants to merge 30 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4800aae
[ADD] website_sale_product_attachment: add attachments to products in…
Jun 11, 2020
1120734
[FIX] website_sale_product_attachment: autogenerate index.html
Jun 12, 2020
4263bb1
[FIX] website_sale_product_attachment: role warning
chienandalu Jun 17, 2020
f64811f
website_sale_product_attachment 12.0.1.1.0
OCA-git-bot Jun 17, 2020
de16c50
[FIX] website_sale_product_attachment: sort attachments, support long…
Jun 22, 2020
3993c5f
Translated using Weblate (Spanish)
Jun 22, 2020
da398d9
Added translation using Weblate (French)
kh-badep Aug 19, 2020
e13fb4a
Translated using Weblate (French)
kh-badep Aug 19, 2020
aeb4a22
Translated using Weblate (French)
ypapouin Nov 23, 2020
7fbd8ba
Added translation using Weblate (Dutch)
bosd Dec 15, 2020
030798d
Translated using Weblate (Dutch)
bosd Dec 15, 2020
d37fcb2
Added translation using Weblate (Catalan)
claudiagn Jan 20, 2021
ae87f15
Translated using Weblate (Catalan)
claudiagn Jan 20, 2021
839b8d3
[IMP] website_sale_product_attachment: black, isort, prettier
victoralmau Feb 25, 2021
c6742cb
[MIG] website_sale_product_attachment: Migration to 13.0
victoralmau Feb 25, 2021
16d0682
[FIX] website_sale_product_attachment: Read attachment metadata with …
pedrobaeza Sep 17, 2021
a279a75
[IMP] website_sale_product_attachment: Introduce website name
pedrobaeza Sep 24, 2021
79bc9c5
Translated using Weblate (Catalan)
Noel000 Mar 2, 2022
f38d800
[MIG] website_sale_product_attachment: Migration to 16.0
ernesto-garcia-tecnativa Aug 21, 2023
0f989b6
[UPD] Update website_sale_product_attachment.pot
Sep 6, 2023
f6c023e
[UPD] README.rst
OCA-git-bot Sep 6, 2023
86b96cf
Update translation files
weblate Oct 9, 2023
6199b49
Translated using Weblate (Spanish)
Ivorra78 Oct 12, 2023
86aab2c
Added translation using Weblate (Italian)
mymage May 8, 2024
ad21e0e
[IMP] update dotfiles
OCA-git-bot Jul 6, 2024
40b4f75
Translated using Weblate (Italian)
mymage May 8, 2024
14cdd5f
[16.0][FIX] website_sale_product_attachment: product template view ad…
miguelcb2003 Jun 19, 2024
3c67185
[IMP] website_sale_product_attachment: pre-commit auto fixes
adriresu Jun 26, 2024
cdc6985
[MIG] website_sale_product_attachment: Migration to 17.0
adriresu Jun 27, 2024
7974e6f
[FIX] Test
Anxo82 Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.22
_commit: v1.24
_src_path: gh:oca/oca-addons-repo-template
additional_ruff_rules: []
ci: GitHub
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ var/
*.egg
*.eggs

# Debian packages
*.deb

# Redhat packages
*.rpm

# MacOS packages
*.dmg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
hooks:
- id: whool-init
- repo: https://github.com/oca/maintainer-tools
rev: 9a170331575a265c092ee6b24b845ec508e8ef75
rev: d5fab7ee87fceee858a3d01048c78a548974d935
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
Expand Down
162 changes: 162 additions & 0 deletions website_sale_product_attachment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
=============================
eCommerce product attachments
=============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:fce91d1fd7ce1e8d6453585605b5807b844470a247a80848571c78ec2d573cef
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/17.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-17-0/e-commerce-17-0-website_sale_product_attachment
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/e-commerce&target_branch=17.0
:alt: Try me on Runboat

|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:

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

|image1|

To be able to filter attachments per website:

1. Go to *Website > Configuration > Settings > Website*.
2. Create more than one.
3. Go to *Settings > Technical > Database Structure > Attachments*
4. Pick or create one.
5. Select a website.
6. Save

To toggle attachment icons in the website:

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

|image2|

.. |image1| image:: https://raw.githubusercontent.com/OCA/e-commerce/17.0/website_sale_product_attachment/static/description/backend-attachment.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/e-commerce/17.0/website_sale_product_attachment/static/description/frontend-icons.png

Usage
=====

To add publicly downloadable attachments to a product template:

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

|image1|

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

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

|image2|

.. |image1| image:: https://raw.githubusercontent.com/OCA/e-commerce/17.0/website_sale_product_attachment/static/description/backend-product.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/e-commerce/17.0/website_sale_product_attachment/static/description/frontend-download.gif

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_product_attachment%0Aversion:%2017.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/17.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": "17.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",
]
},
}
108 changes: 108 additions & 0 deletions website_sale_product_attachment/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# 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 <noelestudilloviera@gmail.com>\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"
msgstr ""

#. 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"

#~ msgid "Product Template"
#~ msgstr "Plantilla de producte"
Loading
Loading