diff --git a/sale_stock_available_info_popup/README.rst b/sale_stock_available_info_popup/README.rst index bedbabc3f..d55205cd2 100644 --- a/sale_stock_available_info_popup/README.rst +++ b/sale_stock_available_info_popup/README.rst @@ -14,13 +14,13 @@ Sale Stock Available Info Popup :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github - :target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/sale_stock_available_info_popup + :target: https://github.com/OCA/stock-logistics-warehouse/tree/15.0/sale_stock_available_info_popup :alt: OCA/stock-logistics-warehouse .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-sale_stock_available_info_popup + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-sale_stock_available_info_popup :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/153/13.0 + :target: https://runbot.odoo-community.org/runbot/153/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -50,7 +50,7 @@ quantity of the corresponding product instead of 'Forecast Quantity'. If that quantity is less than the quantity to deliver, the color of the icon will be red, indicating an alert; otherwise it will be blue. -.. |fa_info_circle| image:: https://raw.githubusercontent.com/OCA/stock-logistics-warehouse/13.0/sale_stock_available_info_popup/static/src/img/info-circle-solid.png +.. |fa_info_circle| image:: https://raw.githubusercontent.com/OCA/stock-logistics-warehouse/15.0/sale_stock_available_info_popup/static/src/img/info-circle-solid.png :width: 10px Bug Tracker @@ -59,7 +59,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -94,6 +94,6 @@ 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/stock-logistics-warehouse `_ project on GitHub. +This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_stock_available_info_popup/__manifest__.py b/sale_stock_available_info_popup/__manifest__.py index a8a054d95..a39fc4417 100644 --- a/sale_stock_available_info_popup/__manifest__.py +++ b/sale_stock_available_info_popup/__manifest__.py @@ -7,10 +7,14 @@ "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/stock-logistics-warehouse", "category": "Warehouse Management", - "version": "13.0.1.0.3", + "version": "15.0.1.0.0", "license": "AGPL-3", "depends": ["sale_stock", "stock_available"], "data": ["views/sale_order_views.xml"], - "qweb": ["static/src/xml/qty_at_date.xml"], + "assets": { + "web.assets_qweb": [ + "sale_stock_available_info_popup/static/src/xml/qty_at_date.xml", + ], + }, "installable": True, } diff --git a/sale_stock_available_info_popup/i18n/es.po b/sale_stock_available_info_popup/i18n/es.po index 25b0ad26f..c8c91c8cd 100644 --- a/sale_stock_available_info_popup/i18n/es.po +++ b/sale_stock_available_info_popup/i18n/es.po @@ -42,6 +42,3 @@ msgid "" "widget.data.immediately_usable_qty_today < widget.data.qty_to_deliver and !" "widget.data.is_mto" msgstr "" - -#~ msgid "Product Template" -#~ msgstr "Plantilla de producto" diff --git a/sale_stock_available_info_popup/models/sale_order.py b/sale_stock_available_info_popup/models/sale_order.py index ccb134b6e..3bdf64153 100644 --- a/sale_stock_available_info_popup/models/sale_order.py +++ b/sale_stock_available_info_popup/models/sale_order.py @@ -16,7 +16,7 @@ class SaleOrderLine(models.Model): @api.depends( "product_id", "product_uom_qty", - "order_id.commitment_date", + "scheduled_date", "order_id.date_order", "warehouse_id", ) @@ -24,14 +24,10 @@ class SaleOrderLine(models.Model): qty_processed_per_product = defaultdict(lambda: 0) self.immediately_usable_qty_today = False for line in self.sorted(key=lambda r: r.sequence): - if line.order_id.commitment_date: - date = line.order_id.commitment_date - else: - date = line._expected_date() if not line.display_qty_widget: continue product = line.product_id.with_context( - to_date=date, warehouse=line.warehouse_id.id + to_date=line.scheduled_date, warehouse=line.warehouse_id.id ) qty_processed = qty_processed_per_product[product.id] line.immediately_usable_qty_today = ( diff --git a/sale_stock_available_info_popup/static/description/index.html b/sale_stock_available_info_popup/static/description/index.html index 9b0201251..3cea3e651 100644 --- a/sale_stock_available_info_popup/static/description/index.html +++ b/sale_stock_available_info_popup/static/description/index.html @@ -3,7 +3,7 @@ - + Sale Stock Available Info Popup