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