i have custom module of creating a sale order and validate delivery challan this is my code
new_sale_order.action_confirm()
if new_sale_order.picking_ids:
for picking in new_sale_order.picking_ids:
print('picking', picking)
print('picking.id', picking.id)
if picking.state not in ('done', 'cancel'):
# picking.action_confirm()
# picking.action_assign()
try:
picking.button_validate()
print(f'Successfully validated picking with ID {picking.id}')
except Exception as e:
print(f'Error validating picking with ID {picking.id}: {e}')
error
picking stock.picking(145,)
ERROR: operator does not exist: integer = boolean