[IMP] stock: quant views from product cleanup

This commit is contained in:
Arnaud Baes
2019-08-14 13:12:58 +00:00
parent 9477e87ec1
commit bee938e03d
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -490,7 +490,9 @@ class Product(models.Model):
)
else:
self = self.with_context(product_tmpl_id=self.product_tmpl_id.id)
return self.env['stock.quant']._get_quants_action(domain)
ctx = dict(self.env.context)
ctx.update({'no_at_date': True})
return self.env['stock.quant'].with_context(ctx)._get_quants_action(domain)
def action_update_quantity_on_hand(self):
return self.product_tmpl_id.with_context({'default_product_id': self.id}).action_update_quantity_on_hand()
+1 -1
View File
@@ -567,7 +567,7 @@ class StockQuant(models.Model):
"""
self._quant_tasks()
action = {
'name': _('Stock On Hand'),
'name': _('Update Quantity'),
'view_type': 'tree',
'view_mode': 'list',
'res_model': 'stock.quant',