I try to remove line with name "Services" with this method, but no luck.
@api.multi
def remove_line(self):
for line in self.order_line:
if line.name == 'Services':
self.order_line.write({
'line': [(3, self.product_id.id)]
})
Try this
@api.multi
def remove_line(self):
for rec in self:
for line in rec.order_line:
if line.name == 'Services':
line.unlink()