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_minimal_price: Migration to 17.0 #938

Open
wants to merge 39 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
39 commits
Select commit Hold shift + click to select a range
2f67a94
[11.0][NEW] website_sale_product_minimal_price: New module (#283)
sergio-teruel May 28, 2019
40d8b1f
[MIG] website_sale_product_minimal_price: Migration to v12.0
sergio-teruel Dec 11, 2019
6c0ac08
[FIX] website_sale_product_minimal_price: combination does not exist …
sergio-teruel Jan 13, 2020
85da9f8
website_sale_product_minimal_price 12.0.1.1.0
OCA-git-bot Jan 28, 2020
be734fe
[UPD] Update website_sale_product_minimal_price.pot
oca-travis Apr 5, 2020
e820bf6
[IMP] website_sale_product_minimal_price: black, isort, prettier
CarlosRoca13 Jun 4, 2020
f5d7726
[MIG] website_sale_product_minimal_price: Migration to v13
CarlosRoca13 Jun 5, 2020
5b0ad56
Update translation files
oca-transbot Jun 25, 2020
6257492
[IMP] website_sale_product_minimal_price: Removed the async/await for…
CarlosRoca13 Jun 29, 2020
32a57f6
website_sale_product_minimal_price 13.0.1.0.1
OCA-git-bot Jul 1, 2020
a1936af
Added translation using Weblate (Dutch)
bosd Dec 15, 2020
c2c71b9
Translated using Weblate (Dutch)
bosd Dec 15, 2020
afb1317
Added translation using Weblate (Catalan)
claudiagn Feb 25, 2021
a2f6616
Translated using Weblate (Spanish)
claudiagn Feb 25, 2021
6a6dd30
Translated using Weblate (Catalan)
claudiagn Feb 25, 2021
0593da6
[FIX] website_sale_product_minimal_price: Fix tests
joao-p-marques Mar 30, 2021
3ea5f71
website_sale_product_minimal_price 13.0.1.0.2
OCA-git-bot Mar 30, 2021
168323d
[IMP] website_sale_product_minimal_price: Forward port of improvement…
CarlosRoca13 May 17, 2021
f7f5235
[FIX] website_sale_product_minimal_price: Take into account all price…
CarlosRoca13 Jul 12, 2021
9980307
website_sale_product_minimal_price 13.0.1.1.0
OCA-git-bot Jul 12, 2021
bcc90ee
[IMP] website_sale_product_minimal_price: black, isort, prettier
miguel-S73 Jul 14, 2021
b35ca1a
[MIG] website_sale_product_minimal_price: Migration to 14.0
miguel-S73 Jul 15, 2021
3aeee50
Added translation using Weblate (Portuguese)
pedrocs-exo Aug 22, 2022
5ffc584
Translated using Weblate (Portuguese)
pedrocs-exo Aug 22, 2022
1095d41
[MIG] website_sale_product_minimal_price: Migration to version 15.0
pilarvargas-tecnativa Feb 24, 2023
2a78bc2
[UPD] Update website_sale_product_minimal_price.pot
Mar 23, 2023
256ab6f
[UPD] README.rst
OCA-git-bot Mar 23, 2023
c5e33dd
Update translation files
weblate Mar 23, 2023
c59be50
Added translation using Weblate (French)
benj-filament Aug 22, 2023
2149d14
[UPD] README.rst
OCA-git-bot Sep 3, 2023
fd406b6
Translated using Weblate (French)
benj-filament Aug 22, 2023
0c71700
[16.0][MIG]website_sale_product_minimal_price: Migration to 16.0
sbiosca-s73 Oct 16, 2023
c51cbfb
[UPD] Update website_sale_product_minimal_price.pot
Mar 4, 2024
580c0ee
[BOT] post-merge updates
OCA-git-bot Mar 4, 2024
2c01708
Update translation files
weblate Mar 4, 2024
3e21ce6
Added translation using Weblate (Italian)
mymage May 8, 2024
80ecf01
Translated using Weblate (Italian)
mymage May 8, 2024
a94c904
[IMP] website_sale_product_minimal_price: pre-commit auto fixes
Jun 24, 2024
50de695
[MIG] website_sale_product_minimal_price: Migration to 17.0
Jul 3, 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
109 changes: 109 additions & 0 deletions website_sale_product_minimal_price/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
==================================
Website Sale Product Minimal Price
==================================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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_minimal_price
: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_minimal_price
: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 functionality of website sale module to allow to
display the minimal price in '/shop' view when product has distinct
variants price and set order by minimal price in product's view.

**Table of contents**

.. contents::
:local:

Configuration
=============

1. Go to *Website > Configuration > Settings > Shop - Products* and
active the option *Multiple Prices per Product*, for use the
pricelists.

Usage
=====

1. Go to backend and set a product with variants and extra price by
attribute value or define a distinct prices in public price list for
this variant.
2. Go to Website Shop.
3. You will see that in main products view appears the text "From " with
minimal price if the product has a distinct prices by attribute.
4. Click on product, the price displayed is the minimal variant price.

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_minimal_price%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>`__:

- Sergio Teruel
- Carlos Roca
- Pedro M. Baeza
- Pilar Vargas

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-sergio-teruel| image:: https://github.com/sergio-teruel.png?size=40px
:target: https://github.com/sergio-teruel
:alt: sergio-teruel

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-sergio-teruel|

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/17.0/website_sale_product_minimal_price>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions website_sale_product_minimal_price/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import controllers
from . import models
27 changes: 27 additions & 0 deletions website_sale_product_minimal_price/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Product Minimal Price",
"summary": "Display minimal price for products that has variants",
"version": "17.0.1.0.0",
"development_status": "Production/Stable",
"maintainers": ["sergio-teruel"],
"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": ["views/templates.xml"],
"assets": {
"web.assets_frontend": [
"/web/static/src/views/fields/formatters.js",
"/website_sale_product_minimal_price/static/src/xml/website_sale_product_price_scale.xml",
"/website_sale_product_minimal_price/static/src/js/website_sale_product_price_scale.esm.js",
],
"web.assets_tests": [
"/website_sale_product_minimal_price/static/src/js/tours/*.js"
],
},
}
1 change: 1 addition & 0 deletions website_sale_product_minimal_price/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
41 changes: 41 additions & 0 deletions website_sale_product_minimal_price/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import http
from odoo.http import request

from odoo.addons.website_sale.controllers.variant import WebsiteSaleVariantController


class WebsiteSaleVariantController(WebsiteSaleVariantController):
@http.route(
["/website_sale/get_combination_info_pricelist_atributes"],
type="json",
auth="public",
website=True,
)
def get_combination_info_pricelist_atributes(self, product_id, **kwargs):
"""Special route to use website logic in get_combination_info override.
This route is called in JS by appending _website to the base route.
"""
# Copied from _get_combination_info
# /odoo/addons/website_sale/models/product_template.py
website = (
request.env["website"]
.get_current_website()
.with_context(**request.env.context)
)
pricelist = website.pricelist_id
product = (
request.env["product.product"]
.browse(product_id)
.with_context(pricelist=pricelist.id)
)
# Getting all min_quantity of the current product to compute the possible
# price scale.
qty_list = request.env["product.pricelist.item"].search(
product._get_product_pricelist_item_domain()
)
qty_list = sorted(set(qty_list.mapped("min_quantity")))

return product._get_product_price_scale(qty_list)
40 changes: 40 additions & 0 deletions website_sale_product_minimal_price/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_minimal_price
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-17 14:53+0000\n"
"PO-Revision-Date: 2021-05-17 16:54+0200\n"
"Last-Translator: Carlos <[email protected]>\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 2.0.6\n"

#. module: website_sale_product_minimal_price
#: model_terms:ir.ui.view,arch_db:website_sale_product_minimal_price.products_item
msgid "From"
msgstr "De"

#. module: website_sale_product_minimal_price
#. odoo-javascript
#: code:addons/website_sale_product_minimal_price/static/src/xml/website_sale_product_price_scale.xml:0
#, python-format
msgid "Prices per quantity ("
msgstr "Preus per quantitat ("

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_template
msgid "Product"
msgstr ""

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_product
msgid "Product Variant"
msgstr ""
40 changes: 40 additions & 0 deletions website_sale_product_minimal_price/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_minimal_price
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-17 14:53+0000\n"
"PO-Revision-Date: 2021-05-17 16:54+0200\n"
"Last-Translator: Carlos <[email protected]>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 2.0.6\n"

#. module: website_sale_product_minimal_price
#: model_terms:ir.ui.view,arch_db:website_sale_product_minimal_price.products_item
msgid "From"
msgstr "Desde"

#. module: website_sale_product_minimal_price
#. odoo-javascript
#: code:addons/website_sale_product_minimal_price/static/src/xml/website_sale_product_price_scale.xml:0
#, python-format
msgid "Prices per quantity ("
msgstr "Precios por cantidad ("

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_template
msgid "Product"
msgstr ""

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_product
msgid "Product Variant"
msgstr ""
39 changes: 39 additions & 0 deletions website_sale_product_minimal_price/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_minimal_price
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-09-03 13:35+0000\n"
"Last-Translator: benj-filament <[email protected]>\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"
"X-Generator: Weblate 4.17\n"

#. module: website_sale_product_minimal_price
#: model_terms:ir.ui.view,arch_db:website_sale_product_minimal_price.products_item
msgid "From"
msgstr "À partir de"

#. module: website_sale_product_minimal_price
#. odoo-javascript
#: code:addons/website_sale_product_minimal_price/static/src/xml/website_sale_product_price_scale.xml:0
#, python-format
msgid "Prices per quantity ("
msgstr "Prix par quantité ("

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_template
msgid "Product"
msgstr ""

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_product
msgid "Product Variant"
msgstr ""
39 changes: 39 additions & 0 deletions website_sale_product_minimal_price/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_minimal_price
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-05-08 16:34+0000\n"
"Last-Translator: mymage <[email protected]>\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_minimal_price
#: model_terms:ir.ui.view,arch_db:website_sale_product_minimal_price.products_item
msgid "From"
msgstr "Dal"

#. module: website_sale_product_minimal_price
#. odoo-javascript
#: code:addons/website_sale_product_minimal_price/static/src/xml/website_sale_product_price_scale.xml:0
#, python-format
msgid "Prices per quantity ("
msgstr "Prezzi per quantità ("

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_template
msgid "Product"
msgstr ""

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_product
msgid "Product Variant"
msgstr ""
40 changes: 40 additions & 0 deletions website_sale_product_minimal_price/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_minimal_price
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-17 14:53+0000\n"
"PO-Revision-Date: 2021-05-17 16:55+0200\n"
"Last-Translator: Carlos <[email protected]>\n"
"Language-Team: none\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 2.0.6\n"

#. module: website_sale_product_minimal_price
#: model_terms:ir.ui.view,arch_db:website_sale_product_minimal_price.products_item
msgid "From"
msgstr "Van"

#. module: website_sale_product_minimal_price
#. odoo-javascript
#: code:addons/website_sale_product_minimal_price/static/src/xml/website_sale_product_price_scale.xml:0
#, python-format
msgid "Prices per quantity ("
msgstr "Prijzen per hoeveelheid ("

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_template
msgid "Product"
msgstr ""

#. module: website_sale_product_minimal_price
#: model:ir.model,name:website_sale_product_minimal_price.model_product_product
msgid "Product Variant"
msgstr ""
Loading
Loading