mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Add button on locations to fetch the tray
This commit is contained in:
@@ -154,3 +154,9 @@ class StockLocation(models.Model):
|
||||
% (self.name,)
|
||||
)
|
||||
return True
|
||||
|
||||
def button_fetch_vertical_lift_tray(self):
|
||||
self.ensure_one()
|
||||
if self.vertical_lift_kind in ("cell", "tray"):
|
||||
self.fetch_vertical_lift_tray()
|
||||
return True
|
||||
|
||||
@@ -6,6 +6,15 @@
|
||||
<field name="model">stock.location</field>
|
||||
<field name="inherit_id" ref="stock_location_tray.view_location_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button name="button_fetch_vertical_lift_tray"
|
||||
string="Fetch Shuttle Tray"
|
||||
type="object"
|
||||
groups="stock.group_stock_manager"
|
||||
class="oe_stat_button"
|
||||
icon="fa-hand-paper-o"
|
||||
attrs="{'invisible': [('vertical_lift_kind', 'not in', ('tray', 'cell'))]}"/>
|
||||
</div>
|
||||
<field name="return_location" position="after">
|
||||
<field name="vertical_lift_location"
|
||||
attrs="{'invisible': [('vertical_lift_kind', '!=', False), ('vertical_lift_kind', '!=', 'view')]}"
|
||||
|
||||
Reference in New Issue
Block a user