I'm not sure if this is a feature that is implemented or not but currently the model names like:
def _compute_stock_info(self):
for rec in self:
if rec.location_id:
quants = self.env['stock.quant'].search([('location_id', '=', rec.location_id.id), ('quantity', '>', 0)])
if quants:
rec.total_quantity = sum(quants.mapped('quantity'))
rec.product_id = quants[0].product_id.id
else:
rec.total_quantity = 0.0
rec.product_id = False
else:
rec.total_quantity = 0.0
rec.product_id = False
typin self.env['stock.qu does not complete the model.
currently using Odoo zed extension v1.0.4 with Odoo 18.
I'm not sure if this is a feature that is implemented or not but currently the model names like:
typin self.env['stock.qu does not complete the model.
currently using Odoo zed extension v1.0.4 with Odoo 18.