Remove "Lots By Warehouse" relate
It is not very useful and the same view can be opened from the stock location relate.
This commit is contained in:
1 parent
ca6bb39948
commit
26f1f8fda6
4 files changed
-80
No files matched your search
@@ -15,7 +15,6 @@ def register():
|
||||
stock.LotTrace,
|
||||
stock.LotByLocationContext,
|
||||
stock.LotsByLocations,
|
||||
stock.LotByWarehouseContext,
|
||||
stock.Location,
|
||||
stock.Move,
|
||||
stock.MoveAddLotsStart,
|
||||
|
||||
@@ -405,38 +405,6 @@ class LotsByLocations(ModelSQL, ModelView):
|
||||
return [('lot.' + name + nested, *clause[1:])]
|
||||
|
||||
|
||||
class LotByWarehouseContext(LotByLocationContext):
|
||||
"Lot by Warehouse"
|
||||
__name__ = 'stock.lots_by_warehouse.context'
|
||||
warehouse = fields.Many2One(
|
||||
'stock.location', "Warehouse", required=True,
|
||||
domain=[
|
||||
('type', '=', 'warehouse'),
|
||||
],
|
||||
)
|
||||
stock_skip_warehouse = fields.Boolean(
|
||||
"Only storage zone",
|
||||
help="Check to use only the quantity of the storage zone.")
|
||||
locations = fields.Function(
|
||||
fields.Many2Many('stock.location', None, None, "Locations"),
|
||||
'on_change_with_locations')
|
||||
|
||||
@classmethod
|
||||
def default_warehouse(cls):
|
||||
return Pool().get('stock.location').get_default_warehouse()
|
||||
|
||||
@classmethod
|
||||
def default_stock_skip_warehouse(cls):
|
||||
return Transaction().context.get('stock_skip_warehouse')
|
||||
|
||||
@fields.depends('warehouse')
|
||||
def on_change_with_locations(self, name=None):
|
||||
locations = []
|
||||
if self.warehouse:
|
||||
locations.append(self.warehouse)
|
||||
return locations
|
||||
|
||||
|
||||
class Location(metaclass=PoolMeta):
|
||||
__name__ = 'stock.location'
|
||||
|
||||
|
||||
@@ -235,39 +235,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="action" ref="act_lots_by_locations_relate"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="lots_by_warehouse_context_view_form">
|
||||
<field name="model">stock.lots_by_warehouse.context</field>
|
||||
<field name="inherit" ref="lots_by_location_context_view_form"/>
|
||||
<field name="name">lot_by_warehouse_context_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_lots_by_warehouse_relate">
|
||||
<field name="name">Lots By Warehouse</field>
|
||||
<field name="res_model">stock.lots_by_locations</field>
|
||||
<field
|
||||
name="domain"
|
||||
eval="[If(Eval('active_ids', []) == [Eval('active_id')], (If(Eval('active_model') == 'product.template', 'product.template', 'product'), '=', Eval('active_id', -1)), (If(Eval('active_model') == 'product.template', 'product.template', 'product'), 'in', Eval('active_ids', []))), ['OR', ('quantity', '!=', 0.0), ('forecast_quantity', '!=', 0.0)]]"
|
||||
pyson="1"/>
|
||||
<field name="search_value"
|
||||
eval="None" />
|
||||
<field name="context_model">stock.lots_by_warehouse.context</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_lots_by_warehouse_relate_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="lots_by_locations_view_list"/>
|
||||
<field name="act_window" ref="act_lots_by_warehouse_relate"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_lots_by_warehouse_relate_keyword1">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.template,-1</field>
|
||||
<field name="action" ref="act_lots_by_warehouse_relate"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_lots_by_warehouse_relate_keyword2">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.product,-1</field>
|
||||
<field name="action" ref="act_lots_by_warehouse_relate"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_location_quantity_tree">
|
||||
<field name="name">Stock Locations Tree</field>
|
||||
<field name="res_model">stock.location</field>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="//label[@name='forecast_date']" position="before">
|
||||
<label name="warehouse"/>
|
||||
<field name="warehouse"/>
|
||||
<label name="stock_skip_warehouse"/>
|
||||
<field name="stock_skip_warehouse"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='stock_date_end']" position="before">
|
||||
<field name="locations" invisible="1" colspan="4"/>
|
||||
</xpath>
|
||||
</data>
|
||||
Reference in new issue
Block a user