[IMP] stock: quant views from product cleanup
This commit is contained in:
@@ -490,7 +490,9 @@ class Product(models.Model):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self = self.with_context(product_tmpl_id=self.product_tmpl_id.id)
|
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):
|
def action_update_quantity_on_hand(self):
|
||||||
return self.product_tmpl_id.with_context({'default_product_id': self.id}).action_update_quantity_on_hand()
|
return self.product_tmpl_id.with_context({'default_product_id': self.id}).action_update_quantity_on_hand()
|
||||||
|
|||||||
@@ -567,7 +567,7 @@ class StockQuant(models.Model):
|
|||||||
"""
|
"""
|
||||||
self._quant_tasks()
|
self._quant_tasks()
|
||||||
action = {
|
action = {
|
||||||
'name': _('Stock On Hand'),
|
'name': _('Update Quantity'),
|
||||||
'view_type': 'tree',
|
'view_type': 'tree',
|
||||||
'view_mode': 'list',
|
'view_mode': 'list',
|
||||||
'res_model': 'stock.quant',
|
'res_model': 'stock.quant',
|
||||||
|
|||||||
Reference in New Issue
Block a user