Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b81b095
[ADD] website_sale_stock_provisioning_date: new module.
Sep 23, 2020
3958173
[IMP] website_sale_stock_provisioning_date: black, isort, prettier
Apr 8, 2021
21d5d13
[MIG] website_sale_stock_provisioning_date: Migration to 13.0
Apr 8, 2021
3bd2b2a
[IMP] website_sale_stock_provisioning_date: black, isort, prettier
miguel-S73 Jul 27, 2021
eae0e1a
[MIG][14.0] website_sale_stock_provisioning_date: Migration to 14.0
miguel-S73 Jul 27, 2021
391d7cb
[IMP] website_sale_stock_provisioning_date: format date
miguel-S73 Nov 4, 2021
476047b
[MIG] website_sale_stock_provisioning_date: Migration to 15.0
CarlosRoca13 Jan 12, 2023
2091e34
[MIG] website_sale_stock_provisioning_date: Migration to 16.0
ernesto-garcia-tecnativa Sep 18, 2023
1cf5d29
[UPD] Update website_sale_stock_provisioning_date.pot
Sep 18, 2023
ca131db
Update translation files
weblate Sep 20, 2023
9e928da
Translated using Weblate (Spanish)
Ivorra78 Sep 24, 2023
9209a73
Added translation using Weblate (Italian)
mymage May 8, 2024
bb16a1d
Translated using Weblate (Italian)
mymage May 8, 2024
a55120d
[IMP] website_sale_stock_provisioning_date: pre-commit auto fixes
arantxa-s73 Jul 8, 2024
c089566
[MIG] website_sale_stock_provisioning_date: Migration to 17.0
arantxa-s73 Jul 9, 2024
8ae6af0
[UPD] Update website_sale_stock_provisioning_date.pot
May 15, 2025
d8d1471
[BOT] post-merge updates
OCA-git-bot May 15, 2025
dbebb1a
[MIG] website_sale_stock_provisioning_date: Migration to 18.0
sergioM-S73 Aug 14, 2025
0c8be67
[UPD] Update website_sale_stock_provisioning_date.pot
Oct 8, 2025
3a2b9b6
[BOT] post-merge updates
OCA-git-bot Oct 8, 2025
7b4bf76
[MIG] website_sale_stock_provisioning_date
Alexgars73 Feb 16, 2026
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
111 changes: 111 additions & 0 deletions website_sale_stock_provisioning_date/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

====================================
Website Sale Stock Provisioning Date
====================================

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

.. |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/license-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/19.0/website_sale_stock_provisioning_date
: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-19-0/e-commerce-19-0-website_sale_stock_provisioning_date
: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=19.0
:alt: Try me on Runboat

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

This module extends the functionality of website to show you the future
provisioning date closest to the current date for a product in the
eCommerce.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Go to *Sales > Products > Products*, create a new product or edit an
existing one.
2. Check 'Show Next Provisioning Date' field under eCommerce tab.
3. Go to Website Shop.
4. Click on a product that have 'Show Next Provisioning Date' checked.
5. If it is true for that product that 'quantity on hand' - 'outgoing
quantity' <= 0, then you will see the future provisioning date
closest to the current date for this product under the 'Add to Cart'
button (If there is such a date).

Note: The closest future provisioning date is the date of the future
stock movement and the closest to the current date. This can be
generated after confirming a purchase order to receive the product on a
date after the current date.

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_provisioning_date%0Aversion:%2019.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
- Sergio Teruel
- Carlos Roca

- `Studio73 <https://www.studio73.es>`__:

- Alex Garcia

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/19.0/website_sale_stock_provisioning_date>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions website_sale_stock_provisioning_date/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models
22 changes: 22 additions & 0 deletions website_sale_stock_provisioning_date/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Stock Provisioning Date",
"summary": "Display provisioning date for a product in shop online",
"version": "19.0.1.0.0",
"development_status": "Production/Stable",
"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_stock"],
"data": ["views/product_template_views.xml"],
"assets": {
"web.assets_frontend": [
"website_sale_stock_provisioning_date/static/src/xml/*"
],
"web.assets_tests": ["/website_sale_stock_provisioning_date/static/src/js/*"],
},
}
58 changes: 58 additions & 0 deletions website_sale_stock_provisioning_date/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_stock_provisioning_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-23 20:14+0000\n"
"PO-Revision-Date: 2023-10-08 22:54+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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: Weblate 4.17\n"

#. module: website_sale_stock_provisioning_date
#. odoo-javascript
#: code:addons/website_sale_stock_provisioning_date/static/src/xml/website_sale_stock_product_availability.xml:0
#, python-format
msgid "Next provisioning date:"
msgstr "Fecha de aprovisionamiento:"

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

#. module: website_sale_stock_provisioning_date
#: model:ir.model,name:website_sale_stock_provisioning_date.model_product_product
msgid "Product Variant"
msgstr "Variante del Producto"

#. module: website_sale_stock_provisioning_date
#: model:ir.model.fields,field_description:website_sale_stock_provisioning_date.field_product_product__show_next_provisioning_date
#: model:ir.model.fields,field_description:website_sale_stock_provisioning_date.field_product_template__show_next_provisioning_date
msgid "Show Next Provisioning Date"
msgstr "Mostrar fecha de aprovisionamiento"

#. module: website_sale_stock_provisioning_date
#: model:ir.model.fields,help:website_sale_stock_provisioning_date.field_product_product__show_next_provisioning_date
#: model:ir.model.fields,help:website_sale_stock_provisioning_date.field_product_template__show_next_provisioning_date
msgid ""
"Shows the next provisioning date in the website shop if the product is out "
"of stock. This option may not make sense if you don't select an "
"'Availability' option that shows the inventory of the product in the website "
"shop."
msgstr ""
"Muestra en la tienda online la fecha de aprovisionamiento prevista si el "
"producto está sin existencias. Esta opción puede no tener sentido si usted "
"no selecciona una opción de disponibilidad que muestre el inventario del "
"producto en la tienda online."

#~ msgid "Product Template"
#~ msgstr "Plantilla de producto"
54 changes: 54 additions & 0 deletions website_sale_stock_provisioning_date/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_stock_provisioning_date
#
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 <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_stock_provisioning_date
#. odoo-javascript
#: code:addons/website_sale_stock_provisioning_date/static/src/xml/website_sale_stock_product_availability.xml:0
#, python-format
msgid "Next provisioning date:"
msgstr "Data prossima fornitura:"

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

#. module: website_sale_stock_provisioning_date
#: model:ir.model,name:website_sale_stock_provisioning_date.model_product_product
msgid "Product Variant"
msgstr "Variante prodotto"

#. module: website_sale_stock_provisioning_date
#: model:ir.model.fields,field_description:website_sale_stock_provisioning_date.field_product_product__show_next_provisioning_date
#: model:ir.model.fields,field_description:website_sale_stock_provisioning_date.field_product_template__show_next_provisioning_date
msgid "Show Next Provisioning Date"
msgstr "Visualizza prossima data fornitura"

#. module: website_sale_stock_provisioning_date
#: model:ir.model.fields,help:website_sale_stock_provisioning_date.field_product_product__show_next_provisioning_date
#: model:ir.model.fields,help:website_sale_stock_provisioning_date.field_product_template__show_next_provisioning_date
msgid ""
"Shows the next provisioning date in the website shop if the product is out "
"of stock. This option may not make sense if you don't select an "
"'Availability' option that shows the inventory of the product in the website"
" shop."
msgstr ""
"Visualizza la prossima data fornitura nel negosio del sito web se il "
"prodotto è esaurito. Questa opzione può non avere senso se non si seleziona "
"una opzione 'Disponibilità\" che visualizza la giacenza del prodotto nel "
"negozio del sito web."
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_stock_provisioning_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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_stock_provisioning_date
#: model:ir.model.fields,field_description:website_sale_stock_provisioning_date.field_product_template__free_qty
msgid "Free To Use Quantity "
msgstr ""

#. module: website_sale_stock_provisioning_date
#. odoo-javascript
#: code:addons/website_sale_stock_provisioning_date/static/src/xml/website_sale_stock_product_availability.xml:0
msgid "Next provisioning date:"
msgstr ""

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

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

#. module: website_sale_stock_provisioning_date
#: model:ir.model.fields,field_description:website_sale_stock_provisioning_date.field_product_product__show_next_provisioning_date
#: model:ir.model.fields,field_description:website_sale_stock_provisioning_date.field_product_template__show_next_provisioning_date
msgid "Show Next Provisioning Date"
msgstr ""

#. module: website_sale_stock_provisioning_date
#: model:ir.model.fields,help:website_sale_stock_provisioning_date.field_product_product__show_next_provisioning_date
#: model:ir.model.fields,help:website_sale_stock_provisioning_date.field_product_template__show_next_provisioning_date
msgid ""
"Shows the next provisioning date in the website shop if the product is out "
"of stock. This option may not make sense if you don't select an "
"'Availability' option that shows the inventory of the product in the website"
" shop."
msgstr ""
3 changes: 3 additions & 0 deletions website_sale_stock_provisioning_date/models/__init__.py
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 product_product
from . import product_template
19 changes: 19 additions & 0 deletions website_sale_stock_provisioning_date/models/product_product.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2019 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models


class ProductProduct(models.Model):
_inherit = "product.product"

def _get_next_provisioning_date(self, company):
domain = [
("company_id", "=", company.id),
("product_id", "in", self.ids),
("state", "not in", ["draft", "done", "cancel"]),
("location_id.usage", "=", "supplier"),
("location_dest_id.usage", "=", "internal"),
("date", ">=", fields.Datetime.now()),
]
move = self.env["stock.move"].sudo().search(domain, order="date", limit=1)
return move and move.date.date() or False
Loading