-
-
Notifications
You must be signed in to change notification settings - Fork 502
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
27 changed files
with
1,122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
============================ | ||
Website Sale Stock Available | ||
============================ | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:b0e268e3498507348a1fe49792941c94cf93facf16b3544ed7d902121af4efb3 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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_stock_available | ||
: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_stock_available | ||
: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 the *Product Availability* | ||
module (technical name: ``website_sale_stock``) so that for the | ||
eCommerce the *Available* quantity of a product is taken into account | ||
instead of the *free* quantity. | ||
|
||
Note that in the past the eCommerce availability was based in | ||
*Forecasted quantity*. This isn't true anymore from version 15.0. | ||
|
||
If a product is configured to *prevent sales if not enough stock* (see | ||
configuration section) and its page is accessed in the Website Shop, the | ||
availability messages will be based on the *Available* quantity instead | ||
of *Free* quantity. And also, the eCommerce won't allow you to buy more | ||
products than *Available* quantity (not *Free* quantity isn't taken into | ||
account). | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
1. Go to *Inventory > Products > Products* and edit a product that you | ||
only want to sell in the eCommerce if there is enough stock. | ||
2. Navigate to *Out-of-stock (continue selling)* field in the *Sales* | ||
tab and unset it. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
1. Go to your eCommerce. | ||
2. Select a product that you has been previously configured to *prevent | ||
sales if not enough stock* for the web product page. | ||
3. Odoo doesn't allow you to add the product to the cart if *Available* | ||
quantity (not *Free to use* quantity) is equal or less than zero. | ||
Besides, availability messages will be based on the *Available* | ||
quantity instead of the *Free to use* quantity. | ||
|
||
|Availability message| | ||
|
||
.. |Availability message| image:: https://raw.githubusercontent.com/OCA/e-commerce/17.0/website_sale_stock_available/static/description/availability_message.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_stock_available%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>`__: | ||
|
||
- Ernesto Tejeda | ||
- Pedro M. Baeza | ||
- David Vidal | ||
- Carlos Lopez | ||
|
||
- Iván Todorovich | ||
|
||
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_stock_available>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from . import controllers | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2020 Tecnativa - Ernesto Tejeda | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Website Sale Stock Available", | ||
"summary": "Display 'Available to promise' in shop online instead " | ||
"of 'Free To Use Quantity'", | ||
"version": "17.0.1.0.0", | ||
"category": "Website", | ||
"website": "https://github.com/OCA/e-commerce", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"stock_available", | ||
"website_sale_stock", | ||
], | ||
"data": [], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2020 Tecnativa - David Vidal | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from odoo.http import request, route | ||
|
||
from odoo.addons.website_sale.controllers.main import PaymentPortal | ||
|
||
|
||
class PaymentPortal(PaymentPortal): | ||
@route() | ||
def shop_payment_transaction(self, *args, **kwargs): | ||
"""Inject a context when potential or promised stock is set""" | ||
request.website = request.website.with_context( | ||
website_sale_stock_available=True | ||
) | ||
return super().shop_payment_transaction(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_sale_stock_available | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2021-01-20 20:45+0000\n" | ||
"Last-Translator: claudiagn <[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: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.3.2\n" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_template | ||
msgid "Product" | ||
msgstr "Producte" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_product | ||
msgid "Product Variant" | ||
msgstr "" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "" | ||
|
||
#~ msgid "Product Template" | ||
#~ msgstr "Plantilla de producte" | ||
|
||
#~ msgid "Sale Order" | ||
#~ msgstr "Comanda de venda" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_sale_stock_available | ||
# | ||
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 <[email protected]>\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_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_template | ||
msgid "Product" | ||
msgstr "Producto" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_product | ||
msgid "Product Variant" | ||
msgstr "Variante de Producto" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "Órdenes de venta" | ||
|
||
#~ msgid "Product Template" | ||
#~ msgstr "Plantilla de producto" | ||
|
||
#~ msgid "Sale Order" | ||
#~ msgstr "Pedido de venta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_sale_stock_available | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-03-12 22:23+0000\n" | ||
"Last-Translator: Ignacio Buioli <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: es_AR\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.14.1\n" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_template | ||
msgid "Product" | ||
msgstr "Producto" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_product | ||
msgid "Product Variant" | ||
msgstr "Variante de Producto" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "Pedidos de Ventas" | ||
|
||
#~ msgid "Product Template" | ||
#~ msgstr "Plantilla de Producto" | ||
|
||
#~ msgid "Display Name" | ||
#~ msgstr "Mostrar Nombre" | ||
|
||
#~ msgid "ID" | ||
#~ msgstr "ID" | ||
|
||
#~ msgid "Last Modified on" | ||
#~ msgstr "Última modificación en" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_sale_stock_available | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2020-05-30 05:19+0000\n" | ||
"Last-Translator: Nelson Ramírez Sánchez <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: es_CL\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 3.10\n" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_template | ||
msgid "Product" | ||
msgstr "Producto" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_product | ||
msgid "Product Variant" | ||
msgstr "" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "" | ||
|
||
#~ msgid "Product Template" | ||
#~ msgstr "Plantilla de Producto" | ||
|
||
#~ msgid "Sale Order" | ||
#~ msgstr "Nota de Venta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_sale_stock_available | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2024-08-05 17:58+0000\n" | ||
"Last-Translator: Rémi <[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 5.6.2\n" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_template | ||
msgid "Product" | ||
msgstr "Produit" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_product | ||
msgid "Product Variant" | ||
msgstr "Variante de produit" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "Bon de commande" | ||
|
||
#~ msgid "Product Template" | ||
#~ msgstr "Modèle d'article" | ||
|
||
#~ msgid "Sale Order" | ||
#~ msgstr "Commande client" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_sale_stock_available | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.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_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_template | ||
msgid "Product" | ||
msgstr "Prodotto" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_product_product | ||
msgid "Product Variant" | ||
msgstr "Variante prodotto" | ||
|
||
#. module: website_sale_stock_available | ||
#: model:ir.model,name:website_sale_stock_available.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "Ordine di vendita" |
Oops, something went wrong.