Hi. I have installed the module from OCA on version 15 EE that allows me to archive serial number. My serial numbers have an extra field called condition_id. Im trying to search for condition ilike Good and Quantity 0 and then what ever the search finds i want to get archived. Here is my Code
ser_lots = env['stock.production.lot'].search([('product_qty', '=', 0),('condition_id','ilike','Good')])
for lots in ser_lots:
lots.write({'active': False})
apparently im doing something wrong because when i run it it archives all the Good serials. I want it to archive the Good with Qty 0