mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
@@ -12,6 +12,7 @@ class StockDemandEstimate(models.Model):
|
||||
_name = "stock.demand.estimate"
|
||||
_description = "Stock Demand Estimate Line"
|
||||
|
||||
active = fields.Boolean(default=True)
|
||||
date_from = fields.Date(
|
||||
compute="_compute_dates", string="From (computed)", store=True
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<field name="name">stock.demand.estimate.tree</field>
|
||||
<field name="model">stock.demand.estimate</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<tree decoration-muted="active == False">
|
||||
<field name="date_from" string="Date From" />
|
||||
<field name="date_to" string="Date To" />
|
||||
<field name="product_id" />
|
||||
@@ -13,6 +13,7 @@
|
||||
<field name="product_uom" />
|
||||
<field name="product_qty" />
|
||||
<field name="daily_qty" />
|
||||
<field name="active" invisible="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -22,6 +23,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<group>
|
||||
<group name="dates_read" class="oe_read_only">
|
||||
<field name="date_from" string="Date From" />
|
||||
@@ -39,6 +46,7 @@
|
||||
<field name="product_uom_qty" />
|
||||
<field name="product_uom" />
|
||||
<field name="daily_qty" />
|
||||
<field name="active" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
@@ -76,6 +84,11 @@
|
||||
<search string="Search Stock Demand Estimates">
|
||||
<field name="product_id" />
|
||||
<field name="location_id" />
|
||||
<filter
|
||||
string="All (Active/Inactive)"
|
||||
name="all"
|
||||
domain="['|', ('active', '=', False), ('active', '=', True)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
name="expired"
|
||||
|
||||
Reference in New Issue
Block a user