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

[18.0][MIG] website_sale_product_reference_displayed: Migration to 18.0 #988

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e45b372
[ADD][11.0] website_sale_product_reference_displayed: New module
chienandalu Jan 8, 2020
cd4e2fc
[MIG] website_sale_product_reference_displayed: Migration to 12.0
chienandalu Jun 25, 2020
b469ce9
Added translation using Weblate (Spanish)
claudiagn Nov 3, 2020
722f87e
Added translation using Weblate (French)
ypapouin Nov 23, 2020
d6d8d58
Added translation using Weblate (Catalan)
claudiagn Jan 20, 2021
ec2c355
[IMP] website_sale_product_reference_displayed: black, isort
CarlosRoca13 Apr 9, 2021
e181a44
[MIG] website_sale_product_reference_displayed: Migration to v13.0
CarlosRoca13 Apr 9, 2021
47b335d
[UPD] Update website_sale_product_reference_displayed.pot
oca-travis Apr 12, 2021
9bb6f5d
[UPD] README.rst
OCA-git-bot Apr 12, 2021
b03b46f
[MIG] website_sale_product_reference_displayed: Migration to 15.0
willytal Jul 15, 2022
a4a5fd3
[UPD] Update website_sale_product_reference_displayed.pot
Jul 24, 2022
66c8cc2
[UPD] README.rst
OCA-git-bot Jul 24, 2022
f3c5c98
[MIG] website_sale_product_reference_displayed: Migration to 16.0
bvanjeelharia Dec 21, 2022
5b94389
[UPD] Update website_sale_product_reference_displayed.pot
Dec 21, 2022
edf5764
[UPD] README.rst
OCA-git-bot Dec 21, 2022
3a784c5
Update translation files
weblate Dec 21, 2022
09179dc
Adding contributor in README.rst
bvanjeelharia Jan 2, 2023
0c1e115
[UPD] README.rst
OCA-git-bot Jan 2, 2023
12f09e4
website_sale_product_reference_displayed 16.0.1.0.1
OCA-git-bot Jan 2, 2023
745bc4d
Adding contributors in readme.rst
bvanjeelharia Jan 2, 2023
410842a
[UPD] README.rst
OCA-git-bot Jan 6, 2023
7b921d9
website_sale_product_reference_displayed 16.0.1.0.2
OCA-git-bot Jan 6, 2023
a764434
Translated using Weblate (Spanish)
Ivorra78 Aug 3, 2023
267ed4b
[UPD] README.rst
OCA-git-bot Sep 3, 2023
748c88a
Added translation using Weblate (Italian)
mymage May 8, 2024
f43790d
Translated using Weblate (Italian)
mymage May 8, 2024
1eca394
[IMP] website_sale_product_reference_displayed: pre-commit execution
jdidderen-nsi May 30, 2024
2222c7e
[MIG] website_sale_product_reference_displayed: Migration to 17.0
jdidderen-nsi May 30, 2024
ece9e58
[UPD] Update website_sale_product_reference_displayed.pot
Oct 24, 2024
9ca401d
[BOT] post-merge updates
OCA-git-bot Oct 24, 2024
1cd1e11
[MIG] website_sale_product_reference_displayed: Migration to 18.0
kobros-tech Nov 26, 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
102 changes: 102 additions & 0 deletions website_sale_product_reference_displayed/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
=======================================
Display product reference in e-commerce
=======================================

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

.. |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-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/18.0/website_sale_product_reference_displayed
: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-18-0/e-commerce-18-0-website_sale_product_reference_displayed
: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=18.0
:alt: Try me on Runboat

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

This module extends the ``website_sale`` views to display the product's
full display name, with its product reference included.

**Table of contents**

.. contents::
:local:

Usage
=====

Just install and the products will be shown with their full display
name.

You can enable or disable for each template and website in the
*Customize* frontend menu setting the *Display product reference* option
on or off.

|image1|

.. |image1| image:: https://raw.githubusercontent.com/OCA/e-commerce/18.0/website_sale_product_reference_displayed/static/description/enable-product-reference.png

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_reference_displayed%0Aversion:%2018.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>`__:

- David Vidal
- Carlos Roca

- `Onestein <https://www.onestein.nl>`__:

- Anjeel Haria

- `Kencove <https://www.kencove.com/>`__:

- Mohamed Alkobrosli

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.

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/18.0/website_sale_product_reference_displayed>`_ 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_reference_displayed/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions website_sale_product_reference_displayed/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Display product reference in e-commerce",
"version": "18.0.1.0.0",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["website_sale"],
"data": ["data/snippet_filter_data.xml", "views/website_sale_views.xml"],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="website_sale.dynamic_snippet_newest_products_filter" model="ir.filters">
<field
name="context"
>{'display_default_code': True, 'add2cart_rerender': False}</field>
</record>
</odoo>
19 changes: 19 additions & 0 deletions website_sale_product_reference_displayed/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\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"

#. module: website_sale_product_reference_displayed
#: model:ir.model,name:website_sale_product_reference_displayed.model_website_snippet_filter
msgid "Website Snippet Filter"
msgstr ""
21 changes: 21 additions & 0 deletions website_sale_product_reference_displayed/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-08-03 20:09+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\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.17\n"

#. module: website_sale_product_reference_displayed
#: model:ir.model,name:website_sale_product_reference_displayed.model_website_snippet_filter
msgid "Website Snippet Filter"
msgstr "Filtro de fragmentos de página web"
19 changes: 19 additions & 0 deletions website_sale_product_reference_displayed/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: fr\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"

#. module: website_sale_product_reference_displayed
#: model:ir.model,name:website_sale_product_reference_displayed.model_website_snippet_filter
msgid "Website Snippet Filter"
msgstr ""
22 changes: 22 additions & 0 deletions website_sale_product_reference_displayed/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_reference_displayed
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-05-08 07:46+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\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.17\n"

#. module: website_sale_product_reference_displayed
#: model:ir.model,name:website_sale_product_reference_displayed.model_website_snippet_filter
msgid "Website Snippet Filter"
msgstr "Filtro esempio sito web"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_reference_displayed
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \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_reference_displayed
#: model:ir.model,name:website_sale_product_reference_displayed.model_website_snippet_filter
msgid "Website Snippet Filter"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import website_snippet_filter
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from odoo import models


class WebsiteSnippetFilter(models.Model):
_inherit = "website.snippet.filter"

def _get_products_latest_sold(self, website, limit, domain, context):
products = super()._get_products_latest_sold(website, limit, domain, context)

Check warning on line 8 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L8

Added line #L8 was not covered by tests
if products:
return products.with_context(display_default_code=True)

Check warning on line 10 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L10

Added line #L10 was not covered by tests
else:
return products

Check warning on line 12 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L12

Added line #L12 was not covered by tests

def _get_products_latest_viewed(self, website, limit, domain, context):
products = super()._get_products_latest_viewed(website, limit, domain, context)

Check warning on line 15 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L15

Added line #L15 was not covered by tests
if products:
return products.with_context(display_default_code=True)

Check warning on line 17 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L17

Added line #L17 was not covered by tests
else:
return products

Check warning on line 19 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L19

Added line #L19 was not covered by tests

def _get_products_recently_sold_with(self, website, limit, domain, context):
products = super()._get_products_recently_sold_with(

Check warning on line 22 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L22

Added line #L22 was not covered by tests
website, limit, domain, context
)
if products:
return products.with_context(display_default_code=True)

Check warning on line 26 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L26

Added line #L26 was not covered by tests
else:
return products

Check warning on line 28 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L28

Added line #L28 was not covered by tests

def _get_products_accessories(self, website, limit, domain, context):
products = super()._get_products_accessories(website, limit, domain, context)

Check warning on line 31 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L31

Added line #L31 was not covered by tests
if products:
return products.with_context(display_default_code=True)

Check warning on line 33 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L33

Added line #L33 was not covered by tests
else:
return products

Check warning on line 35 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L35

Added line #L35 was not covered by tests

def _get_products_alternative_products(self, website, limit, domain, context):
products = super()._get_products_alternative_products(

Check warning on line 38 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L38

Added line #L38 was not covered by tests
website, limit, domain, context
)
if products:
return products.with_context(display_default_code=True)

Check warning on line 42 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L42

Added line #L42 was not covered by tests
else:
return products

Check warning on line 44 in website_sale_product_reference_displayed/models/website_snippet_filter.py

View check run for this annotation

Codecov / codecov/patch

website_sale_product_reference_displayed/models/website_snippet_filter.py#L44

Added line #L44 was not covered by tests
3 changes: 3 additions & 0 deletions website_sale_product_reference_displayed/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- [Tecnativa](https://www.tecnativa.com):
- David Vidal
- Carlos Roca
- [Onestein](https://www.onestein.nl):
- Anjeel Haria
- [Kencove](https://www.kencove.com/):
- Mohamed Alkobrosli
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module extends the `website_sale` views to display the product's
full display name, with its product reference included.
8 changes: 8 additions & 0 deletions website_sale_product_reference_displayed/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Just install and the products will be shown with their full display
name.

You can enable or disable for each template and website in the
*Customize* frontend menu setting the *Display product reference* option
on or off.

![](../static/description/enable-product-reference.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading