From 2437a92d1b40eb4476cc9156491aca5396f2ee99 Mon Sep 17 00:00:00 2001 From: Adrian Resua Vidal Date: Wed, 26 Jun 2024 15:14:34 +0200 Subject: [PATCH] [IMP] website_sale_product_attachment: pre-commit auto fixes --- website_sale_product_attachment/README.rst | 108 +++++++++--------- .../pyproject.toml | 3 + .../readme/CONFIGURE.md | 27 +++++ .../readme/CONFIGURE.rst | 28 ----- .../readme/CONTRIBUTORS.md | 5 + .../readme/CONTRIBUTORS.rst | 9 -- .../{DESCRIPTION.rst => DESCRIPTION.md} | 4 +- .../readme/ROADMAP.md | 2 + .../readme/ROADMAP.rst | 2 - .../readme/USAGE.md | 21 ++++ .../readme/USAGE.rst | 21 ---- 11 files changed, 116 insertions(+), 114 deletions(-) create mode 100644 website_sale_product_attachment/pyproject.toml create mode 100644 website_sale_product_attachment/readme/CONFIGURE.md delete mode 100644 website_sale_product_attachment/readme/CONFIGURE.rst create mode 100644 website_sale_product_attachment/readme/CONTRIBUTORS.md delete mode 100644 website_sale_product_attachment/readme/CONTRIBUTORS.rst rename website_sale_product_attachment/readme/{DESCRIPTION.rst => DESCRIPTION.md} (70%) create mode 100644 website_sale_product_attachment/readme/ROADMAP.md delete mode 100644 website_sale_product_attachment/readme/ROADMAP.rst create mode 100644 website_sale_product_attachment/readme/USAGE.md delete mode 100644 website_sale_product_attachment/readme/USAGE.rst diff --git a/website_sale_product_attachment/README.rst b/website_sale_product_attachment/README.rst index 9352aa4127..5ff49bbbaf 100644 --- a/website_sale_product_attachment/README.rst +++ b/website_sale_product_attachment/README.rst @@ -17,21 +17,21 @@ eCommerce product attachments :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/16.0/website_sale_product_attachment + :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-16-0/e-commerce-16-0-website_sale_product_attachment + :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=16.0 + :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. +This is useful if you want to publish firmwares, manuals, specs, +warranties, or whatever document related to the product. **Table of contents** @@ -41,65 +41,70 @@ or whatever document related to the product. Configuration ============= -Instead of configuring attachments per product, to configure products per attachment: +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. +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. -.. figure:: https://raw.githubusercontent.com/OCA/e-commerce/16.0/website_sale_product_attachment/static/description/backend-attachment.png - :alt: Attachments view in backend +|image1| 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 +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: -#. Go to any product in your eCommerce. -#. Toggle *Customize > Product downloads > Download icons*. +1. Go to any product in your eCommerce. +2. Toggle *Customize > Product downloads > Download icons*. -.. figure:: https://raw.githubusercontent.com/OCA/e-commerce/16.0/website_sale_product_attachment/static/description/frontend-icons.png - :alt: Toggle icons in frontend +|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: -#. 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. +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| -.. figure:: https://raw.githubusercontent.com/OCA/e-commerce/16.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: -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. -#. 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. +|image2| -.. figure:: https://raw.githubusercontent.com/OCA/e-commerce/16.0/website_sale_product_attachment/static/description/frontend-download.gif - :alt: Attachments view in backend +.. |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. +- 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 =========== @@ -107,7 +112,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -115,25 +120,24 @@ Credits ======= Authors -~~~~~~~ +------- * Tecnativa Contributors -~~~~~~~~~~~~ - -* `Tecnativa `_: +------------ - * Jairo Llopis - * Víctor Martínez +- `Tecnativa `__: + - Jairo Llopis + - Víctor Martínez -* `Sygel `_: +- `Sygel `__: - * Ángel García de la Chica Herrera + - Ángel García de la Chica Herrera Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -153,6 +157,6 @@ Current `maintainer `__: |maintainer-Yajo| -This module is part of the `OCA/e-commerce `_ project on GitHub. +This module is part of the `OCA/e-commerce `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/website_sale_product_attachment/pyproject.toml b/website_sale_product_attachment/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/website_sale_product_attachment/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/website_sale_product_attachment/readme/CONFIGURE.md b/website_sale_product_attachment/readme/CONFIGURE.md new file mode 100644 index 0000000000..e333dc2b6c --- /dev/null +++ b/website_sale_product_attachment/readme/CONFIGURE.md @@ -0,0 +1,27 @@ +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. + +![](../static/description/backend-attachment.png) + +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*. + +![](../static/description/frontend-icons.png) diff --git a/website_sale_product_attachment/readme/CONFIGURE.rst b/website_sale_product_attachment/readme/CONFIGURE.rst deleted file mode 100644 index 97cd5321e3..0000000000 --- a/website_sale_product_attachment/readme/CONFIGURE.rst +++ /dev/null @@ -1,28 +0,0 @@ -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:: ../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:: ../static/description/frontend-icons.png - :alt: Toggle icons in frontend diff --git a/website_sale_product_attachment/readme/CONTRIBUTORS.md b/website_sale_product_attachment/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..01a8d11c04 --- /dev/null +++ b/website_sale_product_attachment/readme/CONTRIBUTORS.md @@ -0,0 +1,5 @@ +- [Tecnativa](https://www.tecnativa.com): + - Jairo Llopis + - Víctor Martínez +- [Sygel](https://www.sygel.es): + - Ángel García de la Chica Herrera diff --git a/website_sale_product_attachment/readme/CONTRIBUTORS.rst b/website_sale_product_attachment/readme/CONTRIBUTORS.rst deleted file mode 100644 index 905a6b37d0..0000000000 --- a/website_sale_product_attachment/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,9 +0,0 @@ -* `Tecnativa `_: - - * Jairo Llopis - * Víctor Martínez - - -* `Sygel `_: - - * Ángel García de la Chica Herrera diff --git a/website_sale_product_attachment/readme/DESCRIPTION.rst b/website_sale_product_attachment/readme/DESCRIPTION.md similarity index 70% rename from website_sale_product_attachment/readme/DESCRIPTION.rst rename to website_sale_product_attachment/readme/DESCRIPTION.md index c0970b5997..3fd288d8f8 100644 --- a/website_sale_product_attachment/readme/DESCRIPTION.rst +++ b/website_sale_product_attachment/readme/DESCRIPTION.md @@ -1,4 +1,4 @@ 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. +This is useful if you want to publish firmwares, manuals, specs, +warranties, or whatever document related to the product. diff --git a/website_sale_product_attachment/readme/ROADMAP.md b/website_sale_product_attachment/readme/ROADMAP.md new file mode 100644 index 0000000000..6a0824f021 --- /dev/null +++ b/website_sale_product_attachment/readme/ROADMAP.md @@ -0,0 +1,2 @@ +- Make translatable the name of the attachment in the e-commerce. This + will mean to deal with the sorting of the translated terms. diff --git a/website_sale_product_attachment/readme/ROADMAP.rst b/website_sale_product_attachment/readme/ROADMAP.rst deleted file mode 100644 index d780dc913d..0000000000 --- a/website_sale_product_attachment/readme/ROADMAP.rst +++ /dev/null @@ -1,2 +0,0 @@ -- Make translatable the name of the attachment in the e-commerce. This will - mean to deal with the sorting of the translated terms. diff --git a/website_sale_product_attachment/readme/USAGE.md b/website_sale_product_attachment/readme/USAGE.md new file mode 100644 index 0000000000..e37a120722 --- /dev/null +++ b/website_sale_product_attachment/readme/USAGE.md @@ -0,0 +1,21 @@ +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. + +![](../static/description/backend-product.png) + +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. + +![](../static/description/frontend-download.gif) diff --git a/website_sale_product_attachment/readme/USAGE.rst b/website_sale_product_attachment/readme/USAGE.rst deleted file mode 100644 index b18c229e7b..0000000000 --- a/website_sale_product_attachment/readme/USAGE.rst +++ /dev/null @@ -1,21 +0,0 @@ -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:: ../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:: ../static/description/frontend-download.gif - :alt: Attachments view in backend