mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
@@ -17,8 +17,6 @@ class StockQuant(models.Model):
|
||||
@api.depends("inventory_diff_quantity", "product_id.standard_price")
|
||||
def _compute_adjustment_cost(self):
|
||||
for record in self:
|
||||
record.adjustment_cost = False
|
||||
if record.inventory_diff_quantity:
|
||||
record.adjustment_cost = (
|
||||
record.inventory_diff_quantity * record.product_id.standard_price
|
||||
)
|
||||
record.adjustment_cost = (
|
||||
record.inventory_diff_quantity * record.product_id.standard_price
|
||||
)
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="inventory_diff_quantity" position="after">
|
||||
<field name="currency_id" invisible="1" />
|
||||
<field name="adjustment_cost" sum="Total" optional="show" />
|
||||
<field
|
||||
name="adjustment_cost"
|
||||
sum="Total"
|
||||
optional="show"
|
||||
attrs="{'invisible': [('inventory_quantity_set', '=', False)]}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user