Skip to content

Commit

Permalink
TA#66873 [IMP][16.0] stock_move_origin_link (#192)
Browse files Browse the repository at this point in the history
Co-authored-by: Lanto Razafindrabe <[email protected]>
Co-authored-by: majouda <[email protected]>
  • Loading branch information
3 people authored Nov 4, 2024
1 parent 0560433 commit 726116c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
3 changes: 2 additions & 1 deletion stock_move_origin_link/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ form view of the production order.

Stock Pickings
--------------
The feature is available for all stock picking list views.
The feature is available for all stock picking list and form views .
Here is an example with the list view of delivery orders.

.. image:: static/description/delivery_order_list.png


When clicking on `SO020`, the user is redirected to the sale order.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion stock_move_origin_link/static/src/char_field.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ patch(CharField.prototype, 'stock_move_origin_link_charfield', {
const originUrl = originRecord ? `#id=${originRecord.id}&model=${originRecord.model}` : null;
this.props.originRecord = originRecord;
this.props.originUrl = originUrl;

if (originRecord) {
originCache.set(record.id, { record: originRecord, url: originUrl });
}
Expand Down
24 changes: 23 additions & 1 deletion stock_move_origin_link/static/src/char_fiield.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,27 @@
<span t-esc="formattedValue" />
</t>
</xpath>
<xpath expr="//input" position="replace">
<div class="oe_inline" style="display: flex; align-items: center; gap: 8px;">
<input
class="o_input"
t-att-class="{'o_field_translate': props.isTranslatable}"
t-att-id="props.id"
t-att-type="props.isPassword ? 'password' : 'text'"
t-att-autocomplete="props.autocomplete or (props.isPassword ? 'new-password' : 'off')"
t-att-maxlength="props.maxLength > 0 and props.maxLength"
t-att-placeholder="props.placeholder"
t-ref="input"
/>
<t t-if="props.hasOrigin and props.originUrl">
<button type="button" class="btn btn-secondary fa o_external_button fa-arrow-right"
aria-label="Internal link"
data-tooltip="Internal link"
title=""
t-on-click.prevent="onLinkClick">
</button>
</t>
</div>
</xpath>
</t>
</templates>
</templates>

0 comments on commit 726116c

Please sign in to comment.