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

[MIG] website_sale_product_reference_displayed: Migration to 17.0 #929

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
19d0fcc
[ADD][11.0] website_sale_product_reference_displayed: New module
chienandalu Jan 8, 2020
904ac88
[MIG] website_sale_product_reference_displayed: Migration to 12.0
chienandalu Jun 25, 2020
9af8f5c
Added translation using Weblate (Spanish)
claudiagn Nov 3, 2020
ad6aca2
Added translation using Weblate (French)
ypapouin Nov 23, 2020
60cb40f
Added translation using Weblate (Catalan)
claudiagn Jan 20, 2021
291c945
[IMP] website_sale_product_reference_displayed: black, isort
CarlosRoca13 Apr 9, 2021
efaeeb2
[MIG] website_sale_product_reference_displayed: Migration to v13.0
CarlosRoca13 Apr 9, 2021
9d1dec9
[UPD] Update website_sale_product_reference_displayed.pot
oca-travis Apr 12, 2021
f786f0e
[UPD] README.rst
OCA-git-bot Apr 12, 2021
a2e66a5
[MIG] website_sale_product_reference_displayed: Migration to 15.0
willytal Jul 15, 2022
139b54a
[UPD] Update website_sale_product_reference_displayed.pot
Jul 24, 2022
76a3d8c
[UPD] README.rst
OCA-git-bot Jul 24, 2022
525a7c7
[MIG] website_sale_product_reference_displayed: Migration to 16.0
bvanjeelharia Dec 21, 2022
85e3e20
[UPD] Update website_sale_product_reference_displayed.pot
Dec 21, 2022
35190e1
[UPD] README.rst
OCA-git-bot Dec 21, 2022
5b76c56
Update translation files
weblate Dec 21, 2022
94f1766
Adding contributor in README.rst
bvanjeelharia Jan 2, 2023
389b9e5
[UPD] README.rst
OCA-git-bot Jan 2, 2023
c977670
website_sale_product_reference_displayed 16.0.1.0.1
OCA-git-bot Jan 2, 2023
048788a
Adding contributors in readme.rst
bvanjeelharia Jan 2, 2023
09064ff
[UPD] README.rst
OCA-git-bot Jan 6, 2023
c1bbca8
website_sale_product_reference_displayed 16.0.1.0.2
OCA-git-bot Jan 6, 2023
dd9403a
Translated using Weblate (Spanish)
Ivorra78 Aug 3, 2023
e6b9fb5
[UPD] README.rst
OCA-git-bot Sep 3, 2023
5f4101e
Added translation using Weblate (Italian)
mymage May 8, 2024
ee1b79a
Translated using Weblate (Italian)
mymage May 8, 2024
813edd3
[IMP] website_sale_product_reference_displayed: pre-commit execution
jdidderen-nsi May 30, 2024
6dcf7cb
[MIG] website_sale_product_reference_displayed: Migration to 17.0
jdidderen-nsi May 30, 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
98 changes: 98 additions & 0 deletions website_sale_product_reference_displayed/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
=======================================
Display product reference in e-commerce
=======================================

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

.. |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/17.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-17-0/e-commerce-17-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=17.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/17.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:%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>`__:

- David Vidal
- Carlos Roca

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

- Anjeel Haria

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/17.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": "17.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 16.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,5 @@
- [Tecnativa](https://www.tecnativa.com):
- David Vidal
- Carlos Roca
- [Onestein](https://www.onestein.nl):
- Anjeel Haria
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