diff --git a/purchase_order_product_recommendation_supermarket/__manifest__.py b/purchase_order_product_recommendation_supermarket/__manifest__.py index 880934c..27a1a9b 100644 --- a/purchase_order_product_recommendation_supermarket/__manifest__.py +++ b/purchase_order_product_recommendation_supermarket/__manifest__.py @@ -13,14 +13,7 @@ "security/ir.model.access.csv", "wizards/purchase_order_recommendation.xml", "views/product_template_view.xml", - "views/product_stock_out_period_menu.xml", "data/stock_out_cron.xml", ], - "assets": { - "web.assets_backend": [ - "purchase_order_product_recommendation_supermarket/static/src/scss/sticky_recommendation.scss", - # "purchase_order_product_recommendation_supermarket/static/src/js/sticky_recommendation.js", - ], - }, "demo": [], } diff --git a/purchase_order_product_recommendation_supermarket/i18n/es.po b/purchase_order_product_recommendation_supermarket/i18n/es.po index 7a1005f..b05b268 100644 --- a/purchase_order_product_recommendation_supermarket/i18n/es.po +++ b/purchase_order_product_recommendation_supermarket/i18n/es.po @@ -165,48 +165,6 @@ msgstr "" "Cantidad de productos en stock + Cantidad de producto por venir (pedidos " "confirmados)" -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_form -msgid "Stock-out Period" -msgstr "Periodo sin stock" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_tree -#: model:ir.actions.act_window,name:purchase_order_product_recommendation_supermarket.action_product_stock_out_period -#: model:ir.ui.menu,name:purchase_order_product_recommendation_supermarket.menu_product_stock_out_period -msgid "Stock-out Periods" -msgstr "Periodos sin stock" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_search -msgid "Open" -msgstr "Abierto" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_search -msgid "Closed" -msgstr "Cerrado" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_search -msgid "Search Stock-out Periods" -msgstr "Buscar periodos sin stock" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_search -msgid "Open State" -msgstr "Estado (abierto)" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_search -msgid "Product" -msgstr "Producto" - -#. module: purchase_order_product_recommendation_supermarket -#: model:ir.actions.act_window,help:purchase_order_product_recommendation_supermarket.action_product_stock_out_period -msgid "List of computed periods where a product template had zero stock. Open periods are still ongoing." -msgstr "Listado de periodos calculados en los que una plantilla de producto estuvo sin stock. Los periodos abiertos siguen en curso." - #. module: purchase_order_product_recommendation_supermarket #: model:ir.model.fields,help:purchase_order_product_recommendation_supermarket.field_purchase_order_recommendation__ignore_zero_stock_days msgid "" diff --git a/purchase_order_product_recommendation_supermarket/i18n/purchase_order_product_recommendation_supermarket.pot b/purchase_order_product_recommendation_supermarket/i18n/purchase_order_product_recommendation_supermarket.pot index ed2134e..c2dd1d3 100644 --- a/purchase_order_product_recommendation_supermarket/i18n/purchase_order_product_recommendation_supermarket.pot +++ b/purchase_order_product_recommendation_supermarket/i18n/purchase_order_product_recommendation_supermarket.pot @@ -468,40 +468,3 @@ msgstr "" #: model:ir.model.fields,field_description:purchase_order_product_recommendation_supermarket.field_purchase_order_recommendation_line__units_virtual_available msgid "Units Virtual Available" msgstr "" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_form -msgid "Stock-out Period" -msgstr "" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_tree -#: model:ir.actions.act_window,name:purchase_order_product_recommendation_supermarket.action_product_stock_out_period -#: model:ir.ui.menu,name:purchase_order_product_recommendation_supermarket.menu_product_stock_out_period -msgid "Stock-out Periods" -msgstr "" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_search -msgid "Open" -msgstr "" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_search -msgid "Closed" -msgstr "" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_search -msgid "Search Stock-out Periods" -msgstr "" - -#. module: purchase_order_product_recommendation_supermarket -#: model_terms:ir.ui.view,arch_db:purchase_order_product_recommendation_supermarket.view_product_stock_out_period_search -msgid "Open State" -msgstr "" - -#. module: purchase_order_product_recommendation_supermarket -#: model:ir.actions.act_window,help:purchase_order_product_recommendation_supermarket.action_product_stock_out_period -msgid "List of computed periods where a product template had zero stock. Open periods are still ongoing." -msgstr "" diff --git a/purchase_order_product_recommendation_supermarket/static/src/scss/sticky_recommendation.scss b/purchase_order_product_recommendation_supermarket/static/src/scss/sticky_recommendation.scss deleted file mode 100644 index 3a87f8d..0000000 --- a/purchase_order_product_recommendation_supermarket/static/src/scss/sticky_recommendation.scss +++ /dev/null @@ -1,104 +0,0 @@ -/* Sticky header for purchase recommendation lines tree view */ -/* Make the tree container scrollable so position:sticky works inside */ -.o_purchase_recommendation_tree.o_list_view, /* defensive if Odoo adds class */ -.o_purchase_recommendation_tree { - max-height: 85vh; /* adjustable */ - overflow-y: auto; - position: relative; -} - -/* Target Odoo list table header cells */ -.o_purchase_recommendation_tree table thead th, -.o_purchase_recommendation_tree .o_list_table thead th, -.o_purchase_recommendation_tree table thead th > div, -.o_purchase_recommendation_tree .o_list_table thead th > div { - position: sticky !important; - top: 0 !important; - z-index: 7 !important; /* above possible indicators */ - background: var(--o-view-background-color, #f8f9fa) !important; - line-height: 1.2rem; - box-sizing: border-box; -} - -/* Extra background for nested inner elements */ -.o_purchase_recommendation_tree table thead th > div { - background: inherit; -} - -/* Subtle bottom border / shadow */ -.o_purchase_recommendation_tree table thead th::after { - content: ''; - position: absolute; - left: 0; - right: 0; - bottom: 0; - height: 1px; - background: rgba(0,0,0,0.15); - pointer-events: none; -} - -/* Prevent collapse issues that sometimes break sticky in Firefox */ -.o_purchase_recommendation_tree table { - border-collapse: separate !important; - border-spacing: 0; - width: 100%; -} - -/* Row separators (avoid double borders) */ -.o_purchase_recommendation_tree table tbody tr { - border-bottom: 1px solid #8f8d8d; -} -// .o_purchase_recommendation_tree table tbody tr:last-child { -// border-bottom: 0; -// } -// /* Remove previous cell-level borders */ -// .o_purchase_recommendation_tree table td, -// .o_purchase_recommendation_tree table th { -// border-bottom: none; -// } - -/* Zebra striping: only apply to rows without state-driven bg (avoid overriding decoration-* classes) */ -.o_purchase_recommendation_tree table tbody tr:nth-child(odd):not([class*='o_data_row_selected']):not(.o_list_view_group_header) td { - background-color: #ebe6e6; - border-bottom: 1px solid #8f8d8d; -} -.o_purchase_recommendation_tree table tbody tr:nth-child(even):not([class*='o_data_row_selected']):not(.o_list_view_group_header) td { - background-color: #ffffff; - border-bottom: 1px solid #8f8d8d; -} - -/* Keep Odoo decoration colors dominant (info/success/danger/muted) */ -.o_purchase_recommendation_tree table tbody tr[decoration-info] td, -.o_purchase_recommendation_tree table tbody tr[decoration-success] td, -.o_purchase_recommendation_tree table tbody tr[decoration-danger] td, -.o_purchase_recommendation_tree table tbody tr[decoration-muted] td { - background-color: inherit; -} - -/* Hover highlight (soft) */ -.o_purchase_recommendation_tree table tbody tr:hover td { - background-color: #eef6ff; -} -.o_purchase_recommendation_tree table tbody tr.o_data_row_selected td { - background-color: #d9ecff !important; -} - -/* Stronger text color for better contrast over zebra backgrounds */ -/* Force stronger text color (override potential nested span styles) */ -.o_purchase_recommendation_tree table tbody tr td, -.o_purchase_recommendation_tree table tbody tr td span, -.o_purchase_recommendation_tree table tbody tr td div { - color: #1b1b1b !important; -} - -/* Optional: indicate scroll with gradient at top when not at start */ -.o_purchase_recommendation_tree.is-scrolled::before { - content: ''; - position: sticky; - top: 0; - height: 0.35rem; - display: block; - background: linear-gradient(var(--o-view-background-color, #f8f9fa), rgba(248,249,250,0)); - z-index: 6; - pointer-events: none; -} diff --git a/purchase_order_product_recommendation_supermarket/views/product_stock_out_period_menu.xml b/purchase_order_product_recommendation_supermarket/views/product_stock_out_period_menu.xml deleted file mode 100644 index 8a45cb6..0000000 --- a/purchase_order_product_recommendation_supermarket/views/product_stock_out_period_menu.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - product.stock.out.period.tree - product.stock.out.period - - - - - - - - - - - - - - product.stock.out.period.form - product.stock.out.period - -
- - - - - - - - - -
-
-
- - - - product.stock.out.period.search - product.stock.out.period - - - - - - - - - - - - - - - - Stock-out Periods - product.stock.out.period - tree,form - - {"search_default_filter_open": 1} - -

List of computed periods where a product template had zero stock. Open periods are still ongoing.

-
-
- - - -
\ No newline at end of file diff --git a/purchase_order_product_recommendation_supermarket/wizards/purchase_order_recommendation.xml b/purchase_order_product_recommendation_supermarket/wizards/purchase_order_recommendation.xml index 26089f4..f62749b 100644 --- a/purchase_order_product_recommendation_supermarket/wizards/purchase_order_recommendation.xml +++ b/purchase_order_product_recommendation_supermarket/wizards/purchase_order_recommendation.xml @@ -15,9 +15,6 @@ context="{'no_return_action': True}"/> - - o_purchase_recommendation_tree - diff --git a/stock_inventory_category_concurrency/__manifest__.py b/stock_inventory_category_concurrency/__manifest__.py index d92e23d..3cefe03 100644 --- a/stock_inventory_category_concurrency/__manifest__.py +++ b/stock_inventory_category_concurrency/__manifest__.py @@ -7,8 +7,6 @@ "license": "AGPL-3", "author": "Criptomart", "depends": ["stock_inventory"], - "data": [ - "views/stock_quant_view.xml", - ], + "data": [], "installable": True, } diff --git a/stock_inventory_category_concurrency/i18n/es.po b/stock_inventory_category_concurrency/i18n/es.po deleted file mode 100644 index 102eb94..0000000 --- a/stock_inventory_category_concurrency/i18n/es.po +++ /dev/null @@ -1,18 +0,0 @@ -# Traducciones para stock_inventory_category_concurrency -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-07 00:00+0000\n" -"PO-Revision-Date: 2025-10-07 00:00+0000\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: stock_inventory_category_concurrency -#: model_terms:ir.ui.view,arch_db:stock_inventory_category_concurrency.stock_quant_search_category_filter -msgid "Product Category" -msgstr "Categoría de producto" diff --git a/stock_inventory_category_concurrency/i18n/stock_inventory_category_concurrency.pot b/stock_inventory_category_concurrency/i18n/stock_inventory_category_concurrency.pot deleted file mode 100644 index d2e1655..0000000 --- a/stock_inventory_category_concurrency/i18n/stock_inventory_category_concurrency.pot +++ /dev/null @@ -1,18 +0,0 @@ -# Translation template for stock_inventory_category_concurrency -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-07 00:00+0000\n" -"PO-Revision-Date: 2025-10-07 00:00+0000\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: stock_inventory_category_concurrency -#: model_terms:ir.ui.view,arch_db:stock_inventory_category_concurrency.stock_quant_search_category_filter -msgid "Product Category" -msgstr "" diff --git a/stock_inventory_category_concurrency/models/stock_inventory.py b/stock_inventory_category_concurrency/models/stock_inventory.py index 4b83067..93f8f33 100644 --- a/stock_inventory_category_concurrency/models/stock_inventory.py +++ b/stock_inventory_category_concurrency/models/stock_inventory.py @@ -1,23 +1,18 @@ -from odoo import _, models, fields +from odoo import _, models from odoo.exceptions import ValidationError -class StockQuant(models.Model): - _inherit = "stock.quant" - - product_categ_id = fields.Many2one( - related="product_tmpl_id.categ_id", - store=True, - index=True, - string="Product Category", - ) - - class InventoryAdjustmentsGroup(models.Model): _inherit = "stock.inventory" def action_state_to_in_progress(self): + """ + Relaja el bloqueo por categoría: si el ajuste actual es por categoría, + solo bloquea otros ajustes en progreso que afecten a la MISMA categoría exacta, + no a categorías hermanas distintas ni a todas sus hijas. + """ self.ensure_one() + # Reusar la lógica original, pero parchear el caso de category search_filter = [ ( "location_id", diff --git a/stock_inventory_category_concurrency/views/stock_quant_view.xml b/stock_inventory_category_concurrency/views/stock_quant_view.xml deleted file mode 100644 index 92baaf4..0000000 --- a/stock_inventory_category_concurrency/views/stock_quant_view.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - stock.quant.search.category.filter - stock.quant - - - - - - - - \ No newline at end of file