mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] it should be possible to delete quants after the revaluation has been posted.
This commit is contained in:
committed by
Jordi Ballester Alomar
parent
b72c1a703a
commit
b7b36ca09b
@@ -425,7 +425,7 @@ class StockInventoryRevaluationQuant(models.Model):
|
||||
readonly=True)
|
||||
|
||||
quant_id = fields.Many2one('stock.quant', 'Quant', required=True,
|
||||
readonly=True,
|
||||
readonly=True, ondelete='cascade',
|
||||
domain=[('product_id.type', '=', 'product')])
|
||||
|
||||
product_id = fields.Many2one('product.product', 'Product',
|
||||
|
||||
@@ -234,6 +234,12 @@ class TestStockInventoryRevaluation(TransactionCase):
|
||||
'Incorrect inventory revaluation for '
|
||||
'type Price Change.')
|
||||
|
||||
quants = self.env['stock.quant'].search([('product_id', '=',
|
||||
self.product_real_1.id)])
|
||||
|
||||
# We should be able to delete the quants afterwards
|
||||
quants.with_context(force_unlink=True).unlink()
|
||||
|
||||
def create_inventory_revaluation_price_change_average(self):
|
||||
revaluation_type = 'price_change'
|
||||
# Create an Inventory Revaluation for average cost product
|
||||
|
||||
Reference in New Issue
Block a user