mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[imp] discrpency by product avg
This commit is contained in:
@@ -14,6 +14,7 @@ class StockInventoryLine(models.Model):
|
||||
"theoretical quantity on hand.",
|
||||
digits="Product Unit of Measure",
|
||||
default=0,
|
||||
compute_sudo=True,
|
||||
)
|
||||
discrepancy_percent = fields.Float(
|
||||
string="Discrepancy percent (%)",
|
||||
@@ -21,6 +22,9 @@ class StockInventoryLine(models.Model):
|
||||
digits=(3, 2),
|
||||
help="The discrepancy expressed in percent with theoretical quantity "
|
||||
"as basis",
|
||||
group_operator="avg",
|
||||
store=True,
|
||||
compute_sudo=True,
|
||||
)
|
||||
discrepancy_threshold = fields.Float(
|
||||
string="Threshold (%)",
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
<field name="inherit_id" ref="stock.stock_inventory_line_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_qty" position="after">
|
||||
<field name="discrepancy_qty" />
|
||||
<field name="discrepancy_percent" />
|
||||
<field name="discrepancy_threshold" />
|
||||
<field name="discrepancy_qty" optional="show" />
|
||||
<field name="discrepancy_percent" optional="show" />
|
||||
<field name="discrepancy_threshold" optional="show" />
|
||||
<field name="has_over_discrepancy" invisible="1" />
|
||||
</field>
|
||||
<xpath expr="//tree" position="attributes">
|
||||
|
||||
Reference in New Issue
Block a user