diff --git a/setup/website_sale_product_external_link/odoo/addons/website_sale_product_external_link b/setup/website_sale_product_external_link/odoo/addons/website_sale_product_external_link new file mode 120000 index 0000000000..f750b645b0 --- /dev/null +++ b/setup/website_sale_product_external_link/odoo/addons/website_sale_product_external_link @@ -0,0 +1 @@ +../../../../website_sale_product_external_link \ No newline at end of file diff --git a/setup/website_sale_product_external_link/setup.py b/setup/website_sale_product_external_link/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/website_sale_product_external_link/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/website_sale_product_external_link/README.rst b/website_sale_product_external_link/README.rst new file mode 100644 index 0000000000..1636e17f65 --- /dev/null +++ b/website_sale_product_external_link/README.rst @@ -0,0 +1,41 @@ + +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +================================== +Website Sale Product External Link +================================== + +Add external link field to products and display it on the product page. + +Description +----------- + +This module adds an external link field to products in the backend, allowing you to enter a external page link. This link is displayed on the product page in the webshop. + +Usage +----- + +- Add a link to an external page in the product form view under the "Website Link" field. +- The link will be displayed on the product page in the webshop, allowing customers to visit an external page. + +License +------- + +This module is licensed under the AGPL-3 License. See `License Information `_. + +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 smash it by providing detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ +* Ana Juaristi +* Unai Beristain + +Do not contact contributors directly about support or help with technical issues. diff --git a/website_sale_product_external_link/__init__.py b/website_sale_product_external_link/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/website_sale_product_external_link/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/website_sale_product_external_link/__manifest__.py b/website_sale_product_external_link/__manifest__.py new file mode 100644 index 0000000000..b9eb05b586 --- /dev/null +++ b/website_sale_product_external_link/__manifest__.py @@ -0,0 +1,16 @@ +{ + "name": "Website Sale Product External Link", + "version": "16.0.1.0.0", + "summary": "Add external link field to products and display it on the product page", + "category": "Website", + "author": "Avanzosc", + "website": "https://github.com/avanzosc/odoo-addons", + "license": "AGPL-3", + "depends": ["website_sale"], + "data": [ + "views/product_template_views.xml", + "views/website_sale_templates.xml", + ], + "installable": True, + "auto_install": False, +} diff --git a/website_sale_product_external_link/i18n/es.po b/website_sale_product_external_link/i18n/es.po new file mode 100644 index 0000000000..ee5b2b794b --- /dev/null +++ b/website_sale_product_external_link/i18n/es.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_product_external_link +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-29 15:48+0000\n" +"PO-Revision-Date: 2024-07-29 15:48+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: website_sale_product_external_link +#: model_terms:ir.ui.view,arch_db:website_sale_product_external_link.product_detail +#: model_terms:ir.ui.view,arch_db:website_sale_product_external_link.product_detail_item +msgid "A short description that will also appear on documents." +msgstr "Una breve descripción que aparecerás en los documentos." + +#. module: website_sale_product_external_link +#: model:ir.model.fields,help:website_sale_product_external_link.field_product_product__website_link +#: model:ir.model.fields,help:website_sale_product_external_link.field_product_template__website_link +msgid "Website page. Example: http://www.example.com" +msgstr "Página web. Ejemplo: http://www.ejemplo.com" + +#. module: website_sale_product_external_link +#: model:ir.model,name:website_sale_product_external_link.model_product_template +msgid "Product" +msgstr "Producto" + +#. module: website_sale_product_external_link +#: model:ir.model.fields,field_description:website_sale_product_external_link.field_product_product__website_link +#: model:ir.model.fields,field_description:website_sale_product_external_link.field_product_template__website_link +msgid "Website Link" +msgstr "Enlace Web" diff --git a/website_sale_product_external_link/i18n/eu_ES.po b/website_sale_product_external_link/i18n/eu_ES.po new file mode 100644 index 0000000000..b0a4a2f71a --- /dev/null +++ b/website_sale_product_external_link/i18n/eu_ES.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_product_external_link +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-29 15:49+0000\n" +"PO-Revision-Date: 2024-07-29 15:49+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: website_sale_product_external_link +#: model_terms:ir.ui.view,arch_db:website_sale_product_external_link.product_detail +#: model_terms:ir.ui.view,arch_db:website_sale_product_external_link.product_detail_item +msgid "A short description that will also appear on documents." +msgstr "" + +#. module: website_sale_product_external_link +#: model:ir.model.fields,help:website_sale_product_external_link.field_product_product__website_link +#: model:ir.model.fields,help:website_sale_product_external_link.field_product_template__website_link +msgid "Website page. Example: http://www.example.com" +msgstr "Web orrialdea. Adibidez: http://www.example.com" + +#. module: website_sale_product_external_link +#: model:ir.model,name:website_sale_product_external_link.model_product_template +msgid "Product" +msgstr "Produktua" + +#. module: website_sale_product_external_link +#: model:ir.model.fields,field_description:website_sale_product_external_link.field_product_product__website_link +#: model:ir.model.fields,field_description:website_sale_product_external_link.field_product_template__website_link +msgid "Website Link" +msgstr "Web orrialdearen lotura" + diff --git a/website_sale_product_external_link/i18n/website_sale_product_external_link.pot b/website_sale_product_external_link/i18n/website_sale_product_external_link.pot new file mode 100644 index 0000000000..0e53f4e418 --- /dev/null +++ b/website_sale_product_external_link/i18n/website_sale_product_external_link.pot @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_product_external_link +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-29 15:47+0000\n" +"PO-Revision-Date: 2024-07-29 15:47+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: website_sale_product_external_link +#: model_terms:ir.ui.view,arch_db:website_sale_product_external_link.product_detail +#: model_terms:ir.ui.view,arch_db:website_sale_product_external_link.product_detail_item +msgid "A short description that will also appear on documents." +msgstr "" + +#. module: website_sale_product_external_link +#: model:ir.model.fields,help:website_sale_product_external_link.field_product_product__website_link +#: model:ir.model.fields,help:website_sale_product_external_link.field_product_template__website_link +msgid "Website page. Example: http://www.example.com" +msgstr "" + +#. module: website_sale_product_external_link +#: model:ir.model,name:website_sale_product_external_link.model_product_template +msgid "Product" +msgstr "" + +#. module: website_sale_product_external_link +#: model:ir.model.fields,field_description:website_sale_product_external_link.field_product_product__website_link +#: model:ir.model.fields,field_description:website_sale_product_external_link.field_product_template__website_link +msgid "Website Link" +msgstr "" diff --git a/website_sale_product_external_link/models/__init__.py b/website_sale_product_external_link/models/__init__.py new file mode 100644 index 0000000000..e8fa8f6bf1 --- /dev/null +++ b/website_sale_product_external_link/models/__init__.py @@ -0,0 +1 @@ +from . import product_template diff --git a/website_sale_product_external_link/models/product_template.py b/website_sale_product_external_link/models/product_template.py new file mode 100644 index 0000000000..5240f73f73 --- /dev/null +++ b/website_sale_product_external_link/models/product_template.py @@ -0,0 +1,9 @@ +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + website_link = fields.Char( + help="Website page. Example: http://www.example.com", + ) diff --git a/website_sale_product_external_link/views/product_template_views.xml b/website_sale_product_external_link/views/product_template_views.xml new file mode 100644 index 0000000000..ec10b956a6 --- /dev/null +++ b/website_sale_product_external_link/views/product_template_views.xml @@ -0,0 +1,15 @@ + + + + product.template.form.inherit.external.link + product.template + + + + + + + + + + diff --git a/website_sale_product_external_link/views/website_sale_templates.xml b/website_sale_product_external_link/views/website_sale_templates.xml new file mode 100644 index 0000000000..98046d80bd --- /dev/null +++ b/website_sale_product_external_link/views/website_sale_templates.xml @@ -0,0 +1,43 @@ + + + + +