'confirm one or more order line, update order status and create new cashmove'

@api.one
def confirm(self):

    if self.user_has_groups('lunch.group_lunch_manager'):
        if (self.state != 'confirmed'):
            values = {'user_id': self.user_id.id, 'amount': (- self.price), 'description': self.product_id.name, 'order_id': self.id, 'state': 'order', 'date': self.date}
        self.env['lunch.cashmove'].create(values)
        self.state = 'confirmed'
    else:
        raise AccessError(_('Only    your    lunch    manager    sets    the    orders    as    received.'))
