Skip to content

Commit

Permalink
[IMP] stock_by_warehouse: Enhance stock visibility for warehouse-Wizard
Browse files Browse the repository at this point in the history
To enhance user comprehension by improving the visibility of stock levels
across different warehouses, especially when creating a sale and checking
stock availability. This feature is particularly useful for managing stock
across multiple locations. Additionally, conditional help tooltips have
been added to assist in correctly interpreting the values, and translation
terms have been updated.
  • Loading branch information
TeposteAJ committed Oct 22, 2024
1 parent 8dc846c commit 65c8b9f
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 52 deletions.
70 changes: 60 additions & 10 deletions stock_by_warehouse/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,44 @@ msgstr "... ver todos los almacenes .."
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "Available now but not necessarily what I can sale"
msgstr "Cantidad disponible pero no necesariamente puede ser vendida"
msgid "A limited quantity (less than 3) will be available soon."
msgstr "Una cantidad limitada (menor a 3) estará disponible pronto."

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "I can sale this quantity now and deliver it immediately"
msgstr "Puedo vender esta cantidad ahora y entregarla inmediatamente"
msgid "Available"
msgstr "Disponible"

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "Is coming in"
msgstr "Esta llegando"
msgid "Available now, but not necessarily for sale"
msgstr "Disponible ahora, pero no necesariamente para vender"

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "Incoming"
msgstr "Entrante"

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "Incoming stock may not cover or will barely meet demand."
msgstr ""
"Es posible que el stock entrante no cubra o apenas satisfaga la demanda."

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "It is coming in. It will be available soon."
msgstr "Está en camino. Estará disponible pronto."

#. module: stock_by_warehouse
#. odoo-javascript
Expand All @@ -57,6 +79,20 @@ msgstr "Ubicación"
msgid "Locations:"
msgstr "Ubicaciones:"

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "No quantities are coming in."
msgstr "No hay unidades por llegar."

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "On Hand"
msgstr "A mano"

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
Expand Down Expand Up @@ -131,15 +167,29 @@ msgstr "El producto está disponible en:"
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "This is real(on hand) quantity minus reserved quantity"
msgstr "Esta es la cantidad real (en mano) menos la cantidad reservada"
msgid ""
"There is a deficit. The reserved quantity is greater than the available "
"stock."
msgstr ""
"Hay un déficit. La cantidad reservada es mayor que el inventario disponible."

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid ""
"This quantity is available for immediate sale and delivery.\n"
"This represents on hand quantity minus the reserved stock."
msgstr ""
"Esta cantidad está disponible para venta y entrega inmediata.\n"
"Esto representa la cantidad en existencia menos el inventario reservado."

#. module: stock_by_warehouse
#. odoo-javascript
#: code:addons/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml:0
#, python-format
msgid "This will be available next"
msgstr "Esto estará disponible pronto"
msgid "Warehouse"
msgstr "Almacén"

#. module: stock_by_warehouse
#. odoo-javascript
Expand Down
115 changes: 73 additions & 42 deletions stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,61 +27,92 @@
<t t-name="stock_by_warehouse.ProductWarehousePopOver">
<h3 t-if="this.props.title" class="popover-header d-flex justify-content-center" t-out="this.props.title" />
<div class="popover-body stock-by-warehouse-widget">
<div class="panel clearfix container">
<div class="list-group">
<table class="table" style="border-collapse: collapse;">
<thead style="position: sticky; top: 0; background-color: #017E84; z-index: 1;">
<tr style="text-align: center; background-color: #017E84; color: white;">
<th id="th_warehouse">Warehouse</th>
<th id="th_onhand">On Hand</th>
<th id="th_outgoing">Outgoing</th>
<th id="th_available">Available</th>
<th id="th_incoming">Incoming</th>
</tr>
</thead>
<tbody>
<t t-foreach="this.props.lines" t-as="line" t-key="line_index">
<div
<t
t-if="
line.available_not_res &gt; 0
or line.available &gt; 0
or line.outgoing &gt; 0
or line.saleable &gt; 0
or line.incoming &gt; 0
or line.virtual &gt; 0
line.available gt 0
or line.outgoing gt 0
or line.saleable gt 0
or line.incoming gt 0
or line.virtual gt 0
"
class="list-group-item row"
>
<div name="warehouse_widget" class="d-flex justify-content-between">
<b class="text-left" t-att-title="'Warehouse Name: ' + line.warehouse">
<t t-out="line.warehouse_short"> | </t>
</b>
<div class="text-right">
<span
title="This is real(on hand) quantity minus reserved quantity"
class="text-muted"
t-out="line.available_not_res_formatted"
<tr>
<td style="text-align: center;">
<b
class="text-left"
t-att-title="'Warehouse Name: ' + line.warehouse"
t-out="line.warehouse_short"
/>
<br />
</td>
<td style="text-align: center;">
<span
title="Available now but not necessarily what I can sale"
class="text-muted"
title="Available now, but not necessarily for sale"
t-out="line.available_formatted"
/>
<br />
- <span title="Outgoing" class="text-danger" t-out="line.outgoing_formatted" />
<br />
= <span
title="I can sale this quantity now and deliver it immediately"
class="text-muted"
</td>
<td style="text-align: center;">
<span class="text-muted" title="Outgoing" t-out="line.outgoing_formatted" />
</td>
<td style="text-align: center;">
<t t-if="line.virtual gt 0" t-set="saleable_qty_title_message">
This quantity is available for immediate sale and delivery.
This represents on hand quantity minus the reserved stock.
</t>
<t t-else="" t-set="saleable_qty_title_message">
There is a deficit. The reserved quantity is greater than the available stock.
</t>
<span
t-att-title="saleable_qty_title_message"
t-att-class="line.saleable gt 0 ? 'text-success' : 'text-danger'"
t-out="line.saleable_formatted"
/>
<br />
+ <span
title="Is coming in"
class="text-success"
</td>
<td style="text-align: center;">
<t
t-if="line.virtual gt 3 and line.incoming gt 0"
t-set="incoming_qty_title_message"
>
It is coming in. It will be available soon.
</t>
<t
t-elif="line.virtual lt 1 and line.incoming gt 0"
t-set="incoming_qty_title_message"
>
Incoming stock may not cover or will barely meet demand.
</t>
<t t-elif="line.incoming lt 1" t-set="incoming_qty_title_message">
No quantities are coming in.
</t>
<t t-else="" t-set="incoming_qty_title_message">
A limited quantity (less than 3) will be available soon.
</t>
<span
t-att-title="incoming_qty_title_message"
t-att-class="
line.virtual gt 3 ? '' :
(line.virtual gt 0 ? 'text-warning' : 'text-danger')
"
t-out="line.incoming_formatted"
/>
<br />
= <span
title="This will be available next"
class="text-muted"
t-out="line.virtual_formatted"
/>
</div>
</div>
</div>
</td>
</tr>
</t>
</t>
</div>
</div>
</tbody>
</table>
</div>
</t>

Expand Down

0 comments on commit 65c8b9f

Please sign in to comment.